robust-parenting #12

Merged
sashakoshka merged 17 commits from robust-parenting into main 2023-03-15 22:34:08 -06:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 275e113e3b - Show all commits

View File

@ -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
}

View File

@ -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
}