mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 07:58:51 +01:00
fix title_bar Refresh
This commit is contained in:
parent
ed2454ea64
commit
961ee5dbb0
@ -175,6 +175,7 @@ func (self *TitleBar) UpdateDownloadStatus() {
|
|||||||
|
|
||||||
func (self *TitleBar) RoundRobinCheck() {
|
func (self *TitleBar) RoundRobinCheck() {
|
||||||
for {
|
for {
|
||||||
|
gotime.Sleep(3000 * gotime.Millisecond)
|
||||||
|
|
||||||
if self.InLowBackLight < 0 {
|
if self.InLowBackLight < 0 {
|
||||||
self.CheckBatteryStat()
|
self.CheckBatteryStat()
|
||||||
@ -197,8 +198,6 @@ func (self *TitleBar) RoundRobinCheck() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gotime.Sleep(3000 * gotime.Millisecond)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,7 +217,6 @@ func (self *TitleBar) IsWifiConnectedNow() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *TitleBar) UpdateWifiStrength() {
|
func (self *TitleBar) UpdateWifiStrength() {
|
||||||
self.Draw(self.Title)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TitleBar) GetWifiStrength() int {
|
func (t *TitleBar) GetWifiStrength() int {
|
||||||
@ -533,7 +531,7 @@ func (self *TitleBar) Draw(title string) {
|
|||||||
|
|
||||||
if self.IsWifiConnectedNow() == true {
|
if self.IsWifiConnectedNow() == true {
|
||||||
ge := self.GetWifiStrength()
|
ge := self.GetWifiStrength()
|
||||||
//fmt.Println("wifi ge: ",ge)
|
fmt.Println("wifi ge: ",ge)
|
||||||
if ge > 0 {
|
if ge > 0 {
|
||||||
self.Icons["wifistatus"].SetIconIndex(ge)
|
self.Icons["wifistatus"].SetIconIndex(ge)
|
||||||
self.Icons["wifistatus"].NewCoord(start_x+self.IconWidth+5, self.IconHeight/2+(self.BarHeight-self.IconHeight)/2)
|
self.Icons["wifistatus"].NewCoord(start_x+self.IconWidth+5, self.IconHeight/2+(self.BarHeight-self.IconHeight)/2)
|
||||||
@ -578,6 +576,7 @@ L:
|
|||||||
select {
|
select {
|
||||||
case v:= <- self.updateScreen:
|
case v:= <- self.updateScreen:
|
||||||
if v == true {
|
if v == true {
|
||||||
|
self.Draw(self.Title)
|
||||||
DisplayFlip()
|
DisplayFlip()
|
||||||
}
|
}
|
||||||
if v== false {
|
if v== false {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user