mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-27 16:36:02 +03:00
update modal menu prompt
This commit is contained in:
parent
fdac85f7fb
commit
54c1f1ba73
@ -296,6 +296,7 @@ impl UserInput {
|
||||
panic!("set_mode called on both {} and {}", existing_mode, mode);
|
||||
}
|
||||
menu.mark_all_inactive();
|
||||
menu.change_prompt(prompt);
|
||||
} else {
|
||||
if let Some(ref m) = self.modal_state.modes.get(mode) {
|
||||
let mut menu = Menu::new(
|
||||
|
@ -210,4 +210,10 @@ impl<T: Clone> Menu<T> {
|
||||
*active = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Assume that this doesn't vastly affect width.
|
||||
pub fn change_prompt(&mut self, prompt: String) {
|
||||
assert!(self.prompt.is_some());
|
||||
self.prompt = Some(prompt);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user