Fixed handling of mouse wheel for zooming the terrain.
This commit is contained in:
parent
f6a58c4878
commit
b85f4e404d
@ -85,9 +85,9 @@ func (r *terrainRenderer) Handle(ctx ui.Context, event ui.Event) bool {
|
|||||||
r.project.update(ctx.Renderer())
|
r.project.update(ctx.Renderer())
|
||||||
}
|
}
|
||||||
if r.hover != nil {
|
if r.hover != nil {
|
||||||
if e.Y < 0 {
|
if e.MouseWheel < 0 {
|
||||||
r.project.ZoomOut(ctx, r.hover.ToF32())
|
r.project.ZoomOut(ctx, r.hover.ToF32())
|
||||||
} else {
|
} else if e.MouseWheel > 0 {
|
||||||
r.project.ZoomIn(ctx, r.hover.ToF32())
|
r.project.ZoomIn(ctx, r.hover.ToF32())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user