Skip to content

Commit

Permalink
Removing the pregame color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Nov 6, 2021
1 parent 2fbc950 commit f751b7d
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 50 deletions.
3 changes: 0 additions & 3 deletions game/src/lib.rs
Expand Up @@ -212,9 +212,6 @@ fn setup_app(ctx: &mut EventCtx, mut setup: Setup) -> (App, Vec<Box<dyn State<Ap
{
setup.opts.color_scheme = map_gui::colors::ColorSchemeChoice::NightMode;
}
if title {
setup.opts.color_scheme = map_gui::colors::ColorSchemeChoice::Pregame;
}
if setup.mode != Mode::SomethingElse {
setup.opts.color_scheme = map_gui::colors::ColorSchemeChoice::DayMode;
}
Expand Down
2 changes: 1 addition & 1 deletion game/src/sandbox/mod.rs
Expand Up @@ -285,7 +285,7 @@ struct BackToTitleScreen;

impl State<App> for BackToTitleScreen {
fn event(&mut self, ctx: &mut EventCtx, app: &mut App) -> Transition {
app.change_color_scheme(ctx, ColorSchemeChoice::Pregame);
app.change_color_scheme(ctx, ColorSchemeChoice::DayMode);
app.clear_everything(ctx);
Transition::Clear(vec![TitleScreen::new_state(ctx, app)])
}
Expand Down
10 changes: 0 additions & 10 deletions map_gui/src/colors.rs
Expand Up @@ -28,7 +28,6 @@ use crate::tools::{loading_tips, ColorScale};
pub enum ColorSchemeChoice {
DayMode,
NightMode,
Pregame,
Textured,
ClassicDayMode,
}
Expand All @@ -38,7 +37,6 @@ impl ColorSchemeChoice {
vec![
Choice::new("day mode", ColorSchemeChoice::DayMode),
Choice::new("night mode", ColorSchemeChoice::NightMode),
Choice::new("pregame", ColorSchemeChoice::Pregame),
Choice::new("textured", ColorSchemeChoice::Textured),
Choice::new("classic", ColorSchemeChoice::ClassicDayMode),
]
Expand Down Expand Up @@ -153,7 +151,6 @@ impl ColorScheme {
let mut cs = match scheme {
ColorSchemeChoice::DayMode => ColorScheme::day_mode(),
ColorSchemeChoice::NightMode => ColorScheme::night_mode(),
ColorSchemeChoice::Pregame => ColorScheme::pregame(),
ColorSchemeChoice::Textured => ColorScheme::textured(),
ColorSchemeChoice::ClassicDayMode => ColorScheme::classic(),
};
Expand All @@ -162,13 +159,6 @@ impl ColorScheme {
cs
}

// TODO This is still based on classic
fn pregame() -> ColorScheme {
let mut cs = Self::light_background(Style::pregame());
cs.scheme = ColorSchemeChoice::Pregame;
cs
}

fn classic() -> ColorScheme {
let mut cs = Self::light_background(Style::light_bg());
cs.scheme = ColorSchemeChoice::ClassicDayMode;
Expand Down
34 changes: 0 additions & 34 deletions widgetry/src/style/mod.rs
Expand Up @@ -187,40 +187,6 @@ impl Style {
}
}

pub fn pregame() -> Style {
Style {
panel_bg: Color::grey(0.4),
field_bg: Color::grey(0.3),
dropdown_border: Color::WHITE,
section_bg: Color::grey(0.5),
section_outline: (2.0, Color::WHITE),
loading_tips: Text::new(),
icon_fg: Color::WHITE,
primary_fg: AB_ORANGE_1,
text_primary_color: Color::WHITE,
text_secondary_color: Color::WHITE.shade(0.2),
text_hotkey_color: Color::GREEN,
text_tooltip_color: Color::WHITE,
text_destructive_color: hex("#EB3223"),
btn_tab: ButtonStyle {
fg: hex("#4C4C4C").tint(0.2),
fg_disabled: hex("#4C4C4C"),
bg: Color::CLEAR,
bg_hover: hex("#4C4C4C").alpha(0.1),
bg_disabled: Color::WHITE,
outline: (0.0, Color::CLEAR),
},
btn_outline: ButtonStyle::outline_light_fg(),
btn_solid: ButtonStyle::solid_dark_fg(),
btn_plain: ButtonStyle::plain_light_fg(),
btn_floating: ButtonStyle::solid_light_fg(),
btn_solid_destructive: ButtonStyle::solid_destructive(),
btn_plain_destructive: ButtonStyle::plain_destructive(),
btn_solid_primary: ButtonStyle::solid_primary(),
btn_plain_primary: ButtonStyle::plain_primary(),
}
}

pub fn dark_bg() -> Style {
let navy = hex("#003046");
Style {
Expand Down
2 changes: 0 additions & 2 deletions widgetry_demo/src/lib.rs
Expand Up @@ -23,8 +23,6 @@ fn run(mut settings: Settings) {
// TODO The demo loads a .svg file, so to make it work on both native and web, for now we use
// read_svg. But we should have a more minimal example of how to do that here.
widgetry::run(settings, |ctx| {
// TODO: remove Style::pregame and make light_bg the default.
ctx.set_style(widgetry::Style::light_bg());
// TODO: Add a toggle to switch theme in demo (and recreate UI in that new theme)
// ctx.set_style(widgetry::Style::dark_bg());

Expand Down

0 comments on commit f751b7d

Please sign in to comment.