simplify top-center panel in challenge mode

This commit is contained in:
Dustin Carlino 2020-01-12 10:53:32 -08:00
parent ec1e3f435b
commit f78bc6a5ef

View File

@ -48,18 +48,8 @@ pub fn tool_panel(ctx: &mut EventCtx, extra_buttons: Vec<ManagedWidget>) -> 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),
),
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));
@ -68,7 +58,6 @@ pub fn edit_map_panel(ctx: &mut EventCtx, ui: &UI, gameplay: GameplayMode) -> Co
}
ManagedWidget::draw_text(ctx, txt)
},
]),
])
.bg(Color::grey(0.4)),
)