Application must now manually call application.Draw in all cases
This behavior is way more consistent, and it makes the drawing code a bit simpler.
This commit is contained in:
@@ -33,14 +33,12 @@ func main () {
|
||||
if err != nil { panic(err) }
|
||||
|
||||
redraw()
|
||||
application.Draw()
|
||||
go tick()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <- tickPing:
|
||||
redraw()
|
||||
application.Draw()
|
||||
|
||||
case event := <- channel:
|
||||
switch event.(type) {
|
||||
@@ -72,6 +70,8 @@ func redraw () {
|
||||
application.SetRune(5, 1, ':')
|
||||
application.SetRune(6, 1, rune(second / 10 + 48))
|
||||
application.SetRune(7, 1, rune(second % 10 + 48))
|
||||
|
||||
application.Draw()
|
||||
}
|
||||
|
||||
func tick () {
|
||||
|
||||
Reference in New Issue
Block a user