Added ui.RefreshEvent.
- Refresh signal is now propagated to controls.
This commit is contained in:
parent
a6718e335d
commit
c024416702
@ -67,7 +67,7 @@ func (r *Renderer) PushEvents(t ui.EventTarget, wait bool) {
|
|||||||
case *allg5.MouseMoveEvent:
|
case *allg5.MouseMoveEvent:
|
||||||
t.Handle(&ui.MouseMoveEvent{MouseEvent: mouseEvent(e.MouseEvent), MouseWheel: float32(e.DeltaZ)})
|
t.Handle(&ui.MouseMoveEvent{MouseEvent: mouseEvent(e.MouseEvent), MouseWheel: float32(e.DeltaZ)})
|
||||||
case *allg5.UserEvent:
|
case *allg5.UserEvent:
|
||||||
// used to unblock the wait for events.
|
t.Handle(&ui.RefreshEvent{EventBase: eventBase(e)})
|
||||||
}
|
}
|
||||||
ev = r.eq.Get()
|
ev = r.eq.Get()
|
||||||
}
|
}
|
||||||
|
@ -54,3 +54,7 @@ type MouseMoveEvent struct {
|
|||||||
MouseEvent
|
MouseEvent
|
||||||
MouseWheel float32
|
MouseWheel float32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RefreshEvent struct {
|
||||||
|
EventBase
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user