robust-parenting #12
@ -23,7 +23,7 @@ type AnalogClock struct {
|
||||
func NewAnalogClock (newTime time.Time) (element *AnalogClock) {
|
||||
element = &AnalogClock { }
|
||||
element.theme.Case = theme.C("fun", "clock")
|
||||
element.Core, element.core = core.NewCore(element.draw)
|
||||
element.Core, element.core = core.NewCore(element, element.draw)
|
||||
element.core.SetMinimumSize(64, 64)
|
||||
return
|
||||
}
|
||||
|
@ -53,12 +53,12 @@ func NewPiano (low, high music.Octave) (element *Piano) {
|
||||
}
|
||||
|
||||
element.theme.Case = theme.C("fun", "piano")
|
||||
element.Core, element.core = core.NewCore (func () {
|
||||
element.Core, element.core = core.NewCore (element, func () {
|
||||
element.recalculate()
|
||||
element.draw()
|
||||
})
|
||||
element.FocusableCore,
|
||||
element.focusableControl = core.NewFocusableCore(element.redo)
|
||||
element.focusableControl = core.NewFocusableCore(element.core, element.redo)
|
||||
element.updateMinimumSize()
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user