mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-01 02:33:54 +03:00
fix z-level spinner
This commit is contained in:
parent
62ed91925a
commit
ec756b5167
@ -85,6 +85,7 @@ impl WidgetImpl for Spinner {
|
||||
self.current -= 1;
|
||||
}
|
||||
ctx.no_op_event(true, |ctx| self.down.event(ctx, output));
|
||||
return;
|
||||
}
|
||||
|
||||
if let Some(pt) = ctx.canvas.get_cursor_in_screen_space() {
|
||||
@ -92,9 +93,11 @@ impl WidgetImpl for Spinner {
|
||||
if let Some((_, dy)) = ctx.input.get_mouse_scroll() {
|
||||
if dy > 0.0 && self.current != self.high {
|
||||
self.current += 1;
|
||||
output.outcome = Outcome::Changed;
|
||||
}
|
||||
if dy < 0.0 && self.current != self.low {
|
||||
self.current -= 1;
|
||||
output.outcome = Outcome::Changed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -193,13 +193,13 @@ impl Minimap {
|
||||
app.unzoomed_agents.bikes = self.composite.is_checked("Bike");
|
||||
app.unzoomed_agents.buses_and_trains = self.composite.is_checked("Bus");
|
||||
app.unzoomed_agents.peds = self.composite.is_checked("Pedestrian");
|
||||
if self.composite.has_widget("zorder") {
|
||||
app.primary.show_zorder = self.composite.spinner("zorder");
|
||||
}
|
||||
self.composite = make_minimap_panel(ctx, app, self.zoom_lvl);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
if self.composite.has_widget("zorder") {
|
||||
app.primary.show_zorder = self.composite.spinner("zorder");
|
||||
}
|
||||
|
||||
if self.zoomed {
|
||||
let inner_rect = self.composite.rect_of("minimap");
|
||||
|
Loading…
Reference in New Issue
Block a user