Added display resize event.
This commit is contained in:
parent
ff2ece7d06
commit
c08474a01c
@ -52,6 +52,8 @@ func (r *Renderer) PushEvents(t ui.EventTarget, wait bool) {
|
|||||||
switch e := ev.(type) {
|
switch e := ev.(type) {
|
||||||
case *allg5.DisplayCloseEvent:
|
case *allg5.DisplayCloseEvent:
|
||||||
t.Handle(&ui.DisplayCloseEvent{EventBase: eventBase(e)})
|
t.Handle(&ui.DisplayCloseEvent{EventBase: eventBase(e)})
|
||||||
|
case *allg5.DisplayResizeEvent:
|
||||||
|
t.Handle(&ui.DisplayResizeEvent{EventBase: eventBase(e), Bounds: geom.RectF32(float32(e.X), float32(e.Y), float32(e.X+e.Width), float32(e.Y+e.Height))})
|
||||||
case *allg5.MouseButtonDownEvent:
|
case *allg5.MouseButtonDownEvent:
|
||||||
t.Handle(&ui.MouseButtonDownEvent{MouseEvent: mouseEvent(e.MouseEvent), Button: ui.MouseButton(e.Button)})
|
t.Handle(&ui.MouseButtonDownEvent{MouseEvent: mouseEvent(e.MouseEvent), Button: ui.MouseButton(e.Button)})
|
||||||
case *allg5.MouseButtonUpEvent:
|
case *allg5.MouseButtonUpEvent:
|
||||||
|
@ -6,6 +6,11 @@ type DisplayCloseEvent struct {
|
|||||||
EventBase
|
EventBase
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DisplayResizeEvent struct {
|
||||||
|
EventBase
|
||||||
|
Bounds geom.RectangleF32
|
||||||
|
}
|
||||||
|
|
||||||
type Event interface {
|
type Event interface {
|
||||||
Stamp() float64
|
Stamp() float64
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user