Dimension setter added.
This commit is contained in:
@@ -34,9 +34,10 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Splash struct {
|
type Splash struct {
|
||||||
bgcolor color.RGBA
|
Dimensions groovy.Area
|
||||||
increment int
|
bgcolor color.RGBA
|
||||||
events map[groovy.SceneEvent]func()
|
increment int
|
||||||
|
events map[groovy.SceneEvent]func()
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetSceneEvents implements groovy.Scene.
|
// GetSceneEvents implements groovy.Scene.
|
||||||
@@ -73,6 +74,11 @@ func (s *Splash) Update() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sets sene dimensions
|
||||||
|
func (s *Splash) SetDimensions(a groovy.Area) {
|
||||||
|
s.Dimensions = a
|
||||||
|
}
|
||||||
|
|
||||||
func (s Splash) SetEventHandler(event groovy.SceneEvent, f func()) {
|
func (s Splash) SetEventHandler(event groovy.SceneEvent, f func()) {
|
||||||
s.events[event] = f
|
s.events[event] = f
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user