Removing the pregame color scheme

This commit is contained in:
Dustin Carlino 2021-11-06 09:50:44 -07:00
parent 2fbc950da5
commit f751b7d54b
5 changed files with 1 additions and 50 deletions

View File

@ -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;
}

View File

@ -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)])
}

View File

@ -28,7 +28,6 @@ use crate::tools::{loading_tips, ColorScale};
pub enum ColorSchemeChoice {
DayMode,
NightMode,
Pregame,
Textured,
ClassicDayMode,
}
@ -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),
]
@ -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(),
};
@ -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;

View File

@ -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 {

View File

@ -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());