diff --git a/ui/allg5ui/renderer.go b/ui/allg5ui/renderer.go index 3ae5738..ec48ca6 100644 --- a/ui/allg5ui/renderer.go +++ b/ui/allg5ui/renderer.go @@ -52,6 +52,8 @@ func (r *Renderer) PushEvents(t ui.EventTarget, wait bool) { switch e := ev.(type) { case *allg5.DisplayCloseEvent: 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: t.Handle(&ui.MouseButtonDownEvent{MouseEvent: mouseEvent(e.MouseEvent), Button: ui.MouseButton(e.Button)}) case *allg5.MouseButtonUpEvent: diff --git a/ui/event.go b/ui/event.go index 79ca566..e31c2fe 100644 --- a/ui/event.go +++ b/ui/event.go @@ -6,6 +6,11 @@ type DisplayCloseEvent struct { EventBase } +type DisplayResizeEvent struct { + EventBase + Bounds geom.RectangleF32 +} + type Event interface { Stamp() float64 }