mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-29 12:43:38 +03:00
add tooltip warnings about the status of different maps.
This commit is contained in:
parent
5e85eee935
commit
e9468b8ebf
@ -167,6 +167,10 @@ impl<T: Clone> PopupMenu<T> {
|
||||
txt.add(Line(&choice.label).fg(text::INACTIVE_CHOICE_COLOR));
|
||||
}
|
||||
}
|
||||
if choice.tooltip.is_some() {
|
||||
// TODO Ideally unicode info symbol, but the fonts don't seem to have it
|
||||
txt.append(Line(" ⚠️"));
|
||||
}
|
||||
|
||||
// TODO BG color should be on the TextSpan, so this isn't so terrible?
|
||||
if idx == self.current_idx {
|
||||
|
@ -171,7 +171,17 @@ fn make_load_map(btn: ScreenRectangle, gameplay: GameplayMode) -> Box<dyn State>
|
||||
abstutil::list_all_objects(abstutil::path_all_maps())
|
||||
.into_iter()
|
||||
.filter(|n| n != current_map)
|
||||
.map(|n| Choice::new(nice_map_name(&n), n.clone()))
|
||||
.map(|n| {
|
||||
let c = Choice::new(nice_map_name(&n), n.clone());
|
||||
// Hardcoded list for now.
|
||||
if n == "montlake" || n == "23rd" {
|
||||
c
|
||||
} else {
|
||||
c.tooltip(
|
||||
"This map currently has bugs causing unrealistic traffic jams.",
|
||||
)
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
},
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user