mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-29 17:34:58 +03:00
fix laggy info panel circles
This commit is contained in:
parent
34b1f342a2
commit
cc17d9eafd
@ -214,9 +214,15 @@ impl State for SandboxMode {
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(ref mut s) = self.controls.speed {
|
||||
if let Some(t) = s.event(ctx, ui, Some(&self.gameplay_mode)) {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
// Fragile ordering. Don't call this before all the per_obj actions have been called. But
|
||||
// also let this work before tool_panel, so Key::Escape from the info panel beats the one
|
||||
// to quit.
|
||||
// to quit. And let speed update the sim before we update the info panel.
|
||||
if let Some(ref mut c) = self.controls.common {
|
||||
if let Some(t) = c.event(ctx, ui, self.controls.speed.as_mut()) {
|
||||
return t;
|
||||
@ -227,12 +233,6 @@ impl State for SandboxMode {
|
||||
tp.event(ctx, ui);
|
||||
}
|
||||
|
||||
if let Some(ref mut s) = self.controls.speed {
|
||||
if let Some(t) = s.event(ctx, ui, Some(&self.gameplay_mode)) {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(ref mut tp) = self.controls.tool_panel {
|
||||
match tp.event(ctx, ui) {
|
||||
Some(WrappedOutcome::Transition(t)) => {
|
||||
|
Loading…
Reference in New Issue
Block a user