mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-01 02:33:54 +03:00
Adjust picker UI
This commit is contained in:
parent
340d61d33e
commit
b8e9155ada
@ -5,8 +5,8 @@ use crate::game::{PopupMsg, State, Transition};
|
||||
use crate::helpers::ID;
|
||||
use crate::sandbox::gameplay::GameplayMode;
|
||||
use ezgui::{
|
||||
hotkey, Btn, Color, Composite, EventCtx, GeomBatch, GfxCtx, HorizontalAlignment, Key, Line,
|
||||
Outcome, VerticalAlignment, Widget,
|
||||
hotkey, hotkeys, Btn, Color, Composite, EventCtx, GeomBatch, GfxCtx, HorizontalAlignment, Key,
|
||||
Line, Outcome, VerticalAlignment, Widget,
|
||||
};
|
||||
use map_model::IntersectionID;
|
||||
use std::collections::BTreeSet;
|
||||
@ -34,7 +34,8 @@ impl SignalPicker {
|
||||
.build(ctx, "close", hotkey(Key::Escape))
|
||||
.align_right(),
|
||||
]),
|
||||
Btn::text_fg("Edit").build_def(ctx, hotkey(Key::E)),
|
||||
// TODO Change label based on number of intersections and disable when 0
|
||||
Btn::text_bg2("Continue").build_def(ctx, hotkeys(vec![Key::Enter, Key::E])),
|
||||
]))
|
||||
.aligned(HorizontalAlignment::Center, VerticalAlignment::Top)
|
||||
.build(ctx),
|
||||
@ -72,7 +73,7 @@ impl State for SignalPicker {
|
||||
"close" => {
|
||||
return Transition::Pop;
|
||||
}
|
||||
"Edit" => {
|
||||
"Continue" => {
|
||||
if self.members.is_empty() {
|
||||
return Transition::Push(PopupMsg::new(
|
||||
ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user