mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 16:08:52 +01:00
add AutoRedraw
This commit is contained in:
parent
79a5f5759d
commit
2d753bf5b0
13
main.go
13
main.go
@ -214,12 +214,20 @@ func InspectionTeam(main_screen *UI.MainScreen) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main_screen.Draw()
|
|
||||||
main_screen.SwapAndShow()
|
|
||||||
gotime.Sleep(gotime.Duration(UI.DT) * gotime.Millisecond)
|
gotime.Sleep(gotime.Duration(UI.DT) * gotime.Millisecond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//power stuff dealer
|
||||||
|
func AutoRedraw(main_screen *UI.MainScreen) {
|
||||||
|
|
||||||
|
for {
|
||||||
|
if main_screen.TitleBar.InLowBackLight < 0 {
|
||||||
|
UI.SwapAndShow()
|
||||||
|
}
|
||||||
|
gotime.Sleep(500 * gotime.Millisecond)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func PreparationInAdv(){
|
func PreparationInAdv(){
|
||||||
|
|
||||||
@ -302,6 +310,7 @@ func run() int {
|
|||||||
go FlashLed1(main_screen)
|
go FlashLed1(main_screen)
|
||||||
go InspectionTeam(main_screen)
|
go InspectionTeam(main_screen)
|
||||||
go main_screen.TitleBar.RoundRobinCheck()
|
go main_screen.TitleBar.RoundRobinCheck()
|
||||||
|
go AutoRedraw(main_screen)
|
||||||
|
|
||||||
running := true
|
running := true
|
||||||
for running {
|
for running {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user