Skip to content

Commit

Permalink
Move a lot of text texture stuff into its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
CaspianA1 committed Jan 21, 2025
1 parent 56a00de commit edc49d2
Show file tree
Hide file tree
Showing 12 changed files with 235 additions and 212 deletions.
2 changes: 1 addition & 1 deletion src/dashboard_defs/easing_fns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn ease_out_bounce(mut x: f64) -> f64 {
//////////

pub mod scroll {
use crate::texture::pool::TextTextureScrollEaser;
use crate::texture::text::TextTextureScrollEaser;

pub const STAY_PUT: TextTextureScrollEaser = (|_, _| (0.0, true), 1.0);

Expand Down
6 changes: 3 additions & 3 deletions src/dashboard_defs/shared_window_state.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
spinitron::state::SpinitronState,
texture::pool::{FontInfo, TextureCreationInfo},
dashboard_defs::{twilio::TwilioState, clock::ClockHands, error::ErrorState}
spinitron::state::SpinitronState,
texture::{text::FontInfo, pool::TextureCreationInfo},
dashboard_defs::{twilio::TwilioState, clock::ClockHands, error::ErrorState}
};

pub struct SharedWindowState<'a> {
Expand Down
7 changes: 3 additions & 4 deletions src/dashboard_defs/spinitron.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ use crate::{
shared_window_state::SharedWindowState
},

texture::pool::{
DisplayText,
TextDisplayInfo,
TextureCreationInfo
texture::{
pool::TextureCreationInfo,
text::{DisplayText, TextDisplayInfo}
},

utility_types::{
Expand Down
6 changes: 5 additions & 1 deletion src/dashboard_defs/themes/barebones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ use sdl2::{render::BlendMode, ttf::{FontStyle, Hinting}};
use crate::{
themes::shared_utils::*,
spinitron::{model::SpinitronModelName, state::SpinitronState},
texture::pool::{FontInfo, TextureCreationInfo, TexturePool, RemakeTransitionInfo},

texture::{
text::FontInfo,
pool::{TextureCreationInfo, TexturePool, RemakeTransitionInfo}
},

utility_types::{
file_utils,
Expand Down
6 changes: 5 additions & 1 deletion src/dashboard_defs/themes/retro_room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ use sdl2::{render::BlendMode, ttf::{FontStyle, Hinting}};
use crate::{
themes::shared_utils::*,
spinitron::{model::SpinitronModelName, state::SpinitronState},
texture::pool::{FontInfo, TextureCreationInfo, TexturePool, RemakeTransitionInfo},

texture::{
text::FontInfo,
pool::{TextureCreationInfo, TexturePool, RemakeTransitionInfo}
},

utility_types::{
file_utils,
Expand Down
6 changes: 5 additions & 1 deletion src/dashboard_defs/themes/standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ use sdl2::{render::BlendMode, ttf::{FontStyle, Hinting}};
use crate::{
themes::shared_utils::*,
spinitron::{model::SpinitronModelName, state::SpinitronState},
texture::pool::{FontInfo, TextureCreationInfo, TexturePool, RemakeTransitionInfo},

texture::{
text::FontInfo,
pool::{TextureCreationInfo, TexturePool, RemakeTransitionInfo}
},

utility_types::{
file_utils,
Expand Down
3 changes: 2 additions & 1 deletion src/dashboard_defs/twilio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ use crate::{

texture::{
subpool_manager::TextureSubpoolManager,
pool::{FontInfo, DisplayText, TextDisplayInfo, TextureCreationInfo, TextureHandle, TexturePool, RemakeTransitionInfo}
text::{FontInfo, DisplayText, TextDisplayInfo},
pool::{TextureCreationInfo, TextureHandle, TexturePool, RemakeTransitionInfo}
}
};

Expand Down
9 changes: 3 additions & 6 deletions src/dashboard_defs/updatable_text_pattern.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
use std::borrow::Cow;

use crate::{
texture::pool::{
FontInfo,
DisplayText,
TextDisplayInfo,
TextureCreationInfo,
TextTextureScrollEaser
texture::{
pool::TextureCreationInfo,
text::{FontInfo, DisplayText, TextDisplayInfo, TextTextureScrollEaser}
},

window_tree::{
Expand Down
6 changes: 5 additions & 1 deletion src/dashboard_defs/weather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ use std::{collections::HashMap, borrow::Cow};

use crate::{
request,
texture::pool::{DisplayText, TextDisplayInfo, TextureCreationInfo},

texture::{
pool::TextureCreationInfo,
text::{DisplayText, TextDisplayInfo}
},

utility_types::{
vec2f::Vec2f,
Expand Down
1 change: 1 addition & 0 deletions src/texture/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod pool;
pub mod text;
pub mod subpool_manager;
Loading

0 comments on commit edc49d2

Please sign in to comment.