mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Make zooming in then back out return to the previous zoom level
This commit is contained in:
parent
deda202b5a
commit
8922fd949f
@ -308,7 +308,7 @@ impl<'a> Widget for Map<'a> {
|
||||
.map(|scroll| scroll.y)
|
||||
.sum();
|
||||
let new_zoom_lvl = (self.global_state.settings.gameplay.map_zoom
|
||||
* (1.0 + scrolled * 0.05 * PLATFORM_FACTOR))
|
||||
* (scrolled * 0.05 * PLATFORM_FACTOR).exp2())
|
||||
.clamped(0.75, max_zoom / 64.0);
|
||||
events.push(Event::MapZoom(new_zoom_lvl as f64));
|
||||
// Icon settings
|
||||
|
Loading…
Reference in New Issue
Block a user