GUI not updated/redrawn when mouse is not moved
Closed this issue · 1 comments
powellnorma commented
Is there a way to fix/adjust this? Or to force a re-render? I use the shiny backend on linux.
Here is some example code:
package main
import (
"fmt"
"time"
"github.com/aarzilli/nucular"
"github.com/aarzilli/nucular/style"
)
var count int
func countLoop() {
for {
count += 1
time.Sleep(time.Second)
}
}
func main() {
go countLoop()
wnd := nucular.NewMasterWindow(0, "Counter", updatefn)
wnd.SetStyle(style.FromTheme(style.DarkTheme, 2.0))
wnd.Main()
}
func updatefn(w *nucular.Window) {
w.Row(50).Dynamic(1)
if w.ButtonText(fmt.Sprintf("increment: %d", count)) {
count++
}
}
powellnorma commented
Ok figured it out, MasterWindow.Changed()
triggers a re-render