From 4930557ba37714613ed4dcdf60add98ee2638992 Mon Sep 17 00:00:00 2001 From: iegod Date: Fri, 25 Aug 2023 11:59:41 -0400 Subject: [PATCH] Dimension setter added. --- examples/splashmenu/scenes/splash.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/splashmenu/scenes/splash.go b/examples/splashmenu/scenes/splash.go index 93261e5..7a72a1e 100644 --- a/examples/splashmenu/scenes/splash.go +++ b/examples/splashmenu/scenes/splash.go @@ -34,9 +34,10 @@ func init() { } type Splash struct { - bgcolor color.RGBA - increment int - events map[groovy.SceneEvent]func() + Dimensions groovy.Area + bgcolor color.RGBA + increment int + events map[groovy.SceneEvent]func() } // GetSceneEvents implements groovy.Scene. @@ -73,6 +74,11 @@ func (s *Splash) Update() error { return nil } +// sets sene dimensions +func (s *Splash) SetDimensions(a groovy.Area) { + s.Dimensions = a +} + func (s Splash) SetEventHandler(event groovy.SceneEvent, f func()) { s.events[event] = f }