per design, remove separator after title

This commit is contained in:
Michael Kirk 2021-02-25 11:30:10 -08:00 committed by Dustin Carlino
parent 6b8211c3ba
commit 22223d4338
2 changed files with 16 additions and 12 deletions

View File

@ -119,24 +119,26 @@ impl GameplayState for Freeform {
fn recreate_panels(&mut self, ctx: &mut EventCtx, app: &App) {
let rows = vec![
Widget::row(vec![
Line("Sandbox").small_heading().draw(ctx),
Widget::vert_separator(ctx, 50.0),
Widget::custom_row(vec![
Line("Sandbox").small_heading().draw(ctx).margin_right(18),
ctx.style()
.btn_popup_icon_text(
"system/assets/tools/map.svg",
nice_map_name(app.primary.map.get_name()),
)
.hotkey(lctrl(Key::L))
.build_widget(ctx, "change map"),
.build_widget(ctx, "change map")
.margin_right(8),
ctx.style()
.btn_popup_icon_text("system/assets/tools/calendar.svg", "none")
.hotkey(Key::S)
.build_widget(ctx, "change scenario"),
.build_widget(ctx, "change scenario")
.margin_right(8),
ctx.style()
.btn_outline_icon_text("system/assets/tools/pencil.svg", "Edit map")
.hotkey(lctrl(Key::E))
.build_widget(ctx, "edit map"),
.build_widget(ctx, "edit map")
.margin_right(8),
])
.centered(),
Widget::row(vec![

View File

@ -124,24 +124,26 @@ impl GameplayState for PlayScenario {
fn recreate_panels(&mut self, ctx: &mut EventCtx, app: &App) {
let rows = vec![
Widget::row(vec![
Line("Sandbox").small_heading().draw(ctx),
Widget::vert_separator(ctx, 50.0),
Widget::custom_row(vec![
Line("Sandbox").small_heading().draw(ctx).margin_right(18),
ctx.style()
.btn_popup_icon_text(
"system/assets/tools/map.svg",
nice_map_name(app.primary.map.get_name()),
)
.hotkey(lctrl(Key::L))
.build_widget(ctx, "change map"),
.build_widget(ctx, "change map")
.margin_right(8),
ctx.style()
.btn_popup_icon_text("system/assets/tools/calendar.svg", &self.scenario_name)
.hotkey(Key::S)
.build_widget(ctx, "change scenario"),
.build_widget(ctx, "change scenario")
.margin_right(8),
ctx.style()
.btn_outline_icon_text("system/assets/tools/pencil.svg", "Edit map")
.hotkey(lctrl(Key::E))
.build_widget(ctx, "edit map"),
.build_widget(ctx, "edit map")
.margin_right(8),
])
.centered(),
if self.scenario_name != "empty" {