Remove the last traces of the old orange hovering color.

This commit is contained in:
Dustin Carlino 2021-01-24 12:18:35 -08:00
parent 7d6edbb58c
commit 7d8c818eea
6 changed files with 12 additions and 17 deletions

View File

@ -296,7 +296,7 @@ impl State<App> 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))

View File

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

View File

@ -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),

View File

@ -115,7 +115,7 @@ impl<A: AppLike + 'static, T: MinimapControls<A>> Minimap<A, T> {
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()

View File

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

View File

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