From f78bc6a5ef311641a2918f54c6a28dab12ef44ce Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Sun, 12 Jan 2020 10:53:32 -0800 Subject: [PATCH] simplify top-center panel in challenge mode --- game/src/common/panels.rs | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/game/src/common/panels.rs b/game/src/common/panels.rs index cf104d6fb5..b527017f4f 100644 --- a/game/src/common/panels.rs +++ b/game/src/common/panels.rs @@ -48,27 +48,16 @@ pub fn tool_panel(ctx: &mut EventCtx, extra_buttons: Vec) -> Comp pub fn edit_map_panel(ctx: &mut EventCtx, ui: &UI, gameplay: GameplayMode) -> Composite { Composite::new( ezgui::Composite::new( - ManagedWidget::row(vec![ - ManagedWidget::col(vec![ - ManagedWidget::draw_text(ctx, Text::from(Line("Sandbox"))), - ManagedWidget::draw_text(ctx, Text::from(Line(ui.primary.map.get_name()))), - ]), - ManagedWidget::col(vec![ - Composite::svg_button( - ctx, - "assets/tools/edit_map.svg", - "edit map", - lctrl(Key::E), - ), - { - let edits = ui.primary.map.get_edits(); - let mut txt = Text::from(Line(&edits.edits_name)); - if edits.dirty { - txt.append(Line("*")); - } - ManagedWidget::draw_text(ctx, txt) - }, - ]), + ManagedWidget::col(vec![ + Composite::svg_button(ctx, "assets/tools/edit_map.svg", "edit map", lctrl(Key::E)), + { + let edits = ui.primary.map.get_edits(); + let mut txt = Text::from(Line(&edits.edits_name)); + if edits.dirty { + txt.append(Line("*")); + } + ManagedWidget::draw_text(ctx, txt) + }, ]) .bg(Color::grey(0.4)), )