From 7d8c818eea6e0b3b1862e4f3f975f292ade016c2 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Sun, 24 Jan 2021 12:18:35 -0800 Subject: [PATCH] Remove the last traces of the old orange hovering color. --- game/src/devtools/story.rs | 11 ++++------- game/src/info/person.rs | 5 ++++- map_gui/src/colors.rs | 2 -- map_gui/src/tools/minimap.rs | 2 +- santa/src/title.rs | 7 +++---- widgetry/src/style/mod.rs | 2 -- 6 files changed, 12 insertions(+), 17 deletions(-) diff --git a/game/src/devtools/story.rs b/game/src/devtools/story.rs index 69d6db242e..d21c68d870 100644 --- a/game/src/devtools/story.rs +++ b/game/src/devtools/story.rs @@ -296,7 +296,7 @@ impl State for StoryMapEditor { for (idx, m) in self.story.markers.iter().enumerate() { if self.hovering == Some(idx) { - m.draw_hovered(g, app); + m.draw_hovered(g); } else { g.redraw(&m.draw); } @@ -451,14 +451,14 @@ impl Marker { } } - fn draw_hovered(&self, g: &mut GfxCtx, app: &App) { + fn draw_hovered(&self, g: &mut GfxCtx) { let mut batch = GeomBatch::new(); if self.pts.len() == 1 { batch.append( GeomBatch::load_svg(g, "system/assets/timeline/goal_pos.svg") .scale(2.0) .centered_on(self.pts[0]) - .color(RewriteColor::Change(Color::hex("#5B5B5B"), app.cs.hovering)), + .color(RewriteColor::Change(Color::hex("#5B5B5B"), Color::RED)), ); batch.append( Text::from(Line(&self.event)) @@ -468,10 +468,7 @@ impl Marker { .centered_on(self.pts[0]), ); } else { - batch.push( - app.cs.hovering, - Ring::must_new(self.pts.clone()).to_polygon(), - ); + batch.push(Color::RED, Ring::must_new(self.pts.clone()).to_polygon()); // TODO Refactor plz batch.append( Text::from(Line(&self.event)) diff --git a/game/src/info/person.rs b/game/src/info/person.rs index 05188c354c..30842feca5 100644 --- a/game/src/info/person.rs +++ b/game/src/info/person.rs @@ -213,7 +213,10 @@ pub fn trips( .btn_solid_light() .custom_batch(row_btn.clone(), ControlState::Default) .custom_batch( - row_btn.color(RewriteColor::Change(app.cs.inner_panel, app.cs.hovering)), + row_btn.color(RewriteColor::Change( + app.cs.inner_panel, + ctx.style().btn_outline_light.bg_hover, + )), ControlState::Hovered, ) .build_widget( diff --git a/map_gui/src/colors.rs b/map_gui/src/colors.rs index 0e6b0ecdca..09a0189f88 100644 --- a/map_gui/src/colors.rs +++ b/map_gui/src/colors.rs @@ -57,7 +57,6 @@ pub struct ColorScheme { scheme: ColorSchemeChoice, // UI - pub hovering: Color, pub panel_bg: Color, pub section_bg: Color, pub inner_panel: Color, @@ -184,7 +183,6 @@ impl ColorScheme { scheme: ColorSchemeChoice::Standard, // UI - hovering: gui_style.hovering_color, panel_bg: gui_style.panel_bg, section_bg: Color::grey(0.5), inner_panel: gui_style.panel_bg.alpha(1.0), diff --git a/map_gui/src/tools/minimap.rs b/map_gui/src/tools/minimap.rs index 17e561e2b7..e40f189f94 100644 --- a/map_gui/src/tools/minimap.rs +++ b/map_gui/src/tools/minimap.rs @@ -115,7 +115,7 @@ impl> Minimap { let rect = Polygon::rectangle(20.0, 8.0); let default_batch = GeomBatch::from(vec![(color, rect.clone())]); - let hover_batch = GeomBatch::from(vec![(app.cs().hovering, rect)]); + let hover_batch = GeomBatch::from(vec![(color.alpha(0.5), rect)]); let level_btn = ctx .style() diff --git a/santa/src/title.rs b/santa/src/title.rs index 79ae984bb4..adf5310104 100644 --- a/santa/src/title.rs +++ b/santa/src/title.rs @@ -137,10 +137,9 @@ fn locked_level(ctx: &mut EventCtx, app: &App, level: &Level, idx: usize) -> Wid fn unlocked_level(ctx: &mut EventCtx, app: &App, level: &Level, idx: usize) -> Widget { let normal = level_btn(ctx, app, level, idx); - let hovered = normal.clone().color(RewriteColor::Change( - Color::WHITE, - ctx.style().hovering_color, - )); + let hovered = normal + .clone() + .color(RewriteColor::Change(Color::WHITE, Color::WHITE.alpha(0.6))); ButtonBuilder::new() .custom_batch(normal, ControlState::Default) diff --git a/widgetry/src/style/mod.rs b/widgetry/src/style/mod.rs index 5a141c1598..8541002da1 100644 --- a/widgetry/src/style/mod.rs +++ b/widgetry/src/style/mod.rs @@ -8,7 +8,6 @@ pub struct Style { pub outline_color: Color, pub panel_bg: Color, pub hotkey_color: Color, - pub hovering_color: Color, pub loading_tips: Text, pub btn_solid_dark: ButtonStyle, pub btn_outline_dark: ButtonStyle, @@ -36,7 +35,6 @@ impl Style { outline_color: Color::WHITE, panel_bg: Color::grey(0.4), hotkey_color: Color::GREEN, - hovering_color: Color::ORANGE, loading_tips: Text::new(), // Buttons