Fixed clock and checkbox
This commit is contained in:
parent
4367bba602
commit
afd543ce92
@ -68,7 +68,7 @@ func (element *Checkbox) HandleMouseUp (x, y int, button tomo.Button) {
|
||||
}
|
||||
|
||||
func (element *Checkbox) HandleMouseMove (x, y int) { }
|
||||
func (element *Checkbox) HandleScroll (x, y int, deltaX, deltaY float64) { }
|
||||
func (element *Checkbox) HandleMouseScroll (x, y int, deltaX, deltaY float64) { }
|
||||
|
||||
func (element *Checkbox) HandleKeyDown (
|
||||
key tomo.Key,
|
||||
|
@ -34,7 +34,7 @@ func (element *AnalogClock) SetTime (newTime time.Time) {
|
||||
element.time = newTime
|
||||
if element.core.HasImage() {
|
||||
element.draw()
|
||||
element.core.PushAll()
|
||||
element.core.DamageAll()
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,11 +67,15 @@ func (element *AnalogClock) draw () {
|
||||
0, 0.7, (second - 15) / 30 * math.Pi)
|
||||
}
|
||||
|
||||
// MinimumHeightFor constrains the clock's minimum size to a 1:1 aspect ratio.
|
||||
func (element *AnalogClock) MinimumHeightFor (width int) (height int) {
|
||||
// FlexibleHeightFor constrains the clock's minimum size to a 1:1 aspect ratio.
|
||||
func (element *AnalogClock) FlexibleHeightFor (width int) (height int) {
|
||||
return width
|
||||
}
|
||||
|
||||
// OnFlexibleHeightChange sets a function to be calle dwhen the parameters
|
||||
// affecting the clock's flexible height change.
|
||||
func (element *AnalogClock) OnFlexibleHeightChange (func ()) { }
|
||||
|
||||
func (element *AnalogClock) radialLine (
|
||||
source artist.Pattern,
|
||||
inner float64,
|
||||
|
Reference in New Issue
Block a user