mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 07:58:51 +01:00
re-test
This commit is contained in:
parent
6a360f5101
commit
ef5523faf5
@ -407,9 +407,6 @@ func (self *WifiList) ShowBox(msg string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (self *WifiList) HideBox() {
|
func (self *WifiList) HideBox() {
|
||||||
self.Draw()
|
|
||||||
self.ShowingMessageBox = false
|
|
||||||
self.Screen.SwapAndShow()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *WifiList) GenNetworkList() {
|
func (self *WifiList) GenNetworkList() {
|
||||||
@ -739,6 +736,7 @@ func (self *WifiList) KeyDown(ev *event.Event) {
|
|||||||
|
|
||||||
if ev.Data["Key"] == UI.CurKeys["X"] {
|
if ev.Data["Key"] == UI.CurKeys["X"] {
|
||||||
self.Rescan(false)
|
self.Rescan(false)
|
||||||
|
self.Screen.Refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
if ev.Data["Key"] == UI.CurKeys["Y"] {
|
if ev.Data["Key"] == UI.CurKeys["Y"] {
|
||||||
|
|||||||
BIN
skin/default/sysgo/gameshell/titlebar_icons/battery.png
Normal file
BIN
skin/default/sysgo/gameshell/titlebar_icons/battery.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@ -293,7 +293,6 @@ func (self *TitleBar) SetSoundVolume(vol int) {
|
|||||||
func (self *TitleBar) CheckBatteryStat() {
|
func (self *TitleBar) CheckBatteryStat() {
|
||||||
bat_segs := [][]int{[]int{0, 6}, []int{7, 15}, []int{16, 20}, []int{21, 30}, []int{31, 50}, []int{51, 60}, []int{61, 80}, []int{81, 90}, []int{91, 100}}
|
bat_segs := [][]int{[]int{0, 6}, []int{7, 15}, []int{16, 20}, []int{21, 30}, []int{31, 50}, []int{51, 60}, []int{61, 80}, []int{81, 90}, []int{91, 100}}
|
||||||
|
|
||||||
self.Icons["battery"] = self.Icons["battery_unknown"]
|
|
||||||
|
|
||||||
if FileExists(sysgo.Battery) == false {
|
if FileExists(sysgo.Battery) == false {
|
||||||
return
|
return
|
||||||
@ -340,11 +339,9 @@ func (self *TitleBar) CheckBatteryStat() {
|
|||||||
|
|
||||||
if val, ok := bat_uevent["POWER_SUPPLY_STATUS"]; ok {
|
if val, ok := bat_uevent["POWER_SUPPLY_STATUS"]; ok {
|
||||||
if val == "Charging" {
|
if val == "Charging" {
|
||||||
self.Icons["battery_charging"].SetIconIndex(cap_ge)
|
self.Icons["battery"].SetIconIndex(1+cap_ge)
|
||||||
self.Icons["battery"] = self.Icons["battery_charging"]
|
|
||||||
} else {
|
} else {
|
||||||
self.Icons["battery_discharging"].SetIconIndex(cap_ge)
|
self.Icons["battery"].SetIconIndex(1+9+cap_ge)
|
||||||
self.Icons["battery"] = self.Icons["battery_discharging"]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,29 +389,13 @@ func (self *TitleBar) Init(main_screen *MainScreen) {
|
|||||||
|
|
||||||
self.Icons["wifistatus"] = icon_wifi_status
|
self.Icons["wifistatus"] = icon_wifi_status
|
||||||
|
|
||||||
battery_charging := NewTitleBarIconItem()
|
|
||||||
battery_charging.MyType = ICON_TYPES["STAT"]
|
|
||||||
battery_charging.Parent = self
|
|
||||||
battery_charging.ImageName = self.icon_base_path + "withcharging.png"
|
|
||||||
battery_charging.Adjust(start_x+self.IconWidth+self.IconWidth+8, self.IconHeight/2+(self.BarHeight-self.IconHeight)/2, self.IconWidth, self.IconHeight, 0)
|
|
||||||
|
|
||||||
self.Icons["battery_charging"] = battery_charging
|
|
||||||
|
|
||||||
battery_discharging := NewTitleBarIconItem()
|
|
||||||
battery_discharging.MyType = ICON_TYPES["STAT"]
|
|
||||||
battery_discharging.Parent = self
|
|
||||||
battery_discharging.ImageName = self.icon_base_path + "without_charging.png"
|
|
||||||
battery_discharging.Adjust(start_x+self.IconWidth+self.IconWidth+8, self.IconHeight/2+(self.BarHeight-self.IconHeight)/2, self.IconWidth, self.IconHeight, 0)
|
|
||||||
|
|
||||||
self.Icons["battery_discharging"] = battery_discharging
|
|
||||||
|
|
||||||
battery_unknown := NewTitleBarIconItem()
|
battery_unknown := NewTitleBarIconItem()
|
||||||
battery_unknown.MyType = ICON_TYPES["STAT"]
|
battery_unknown.MyType = ICON_TYPES["STAT"]
|
||||||
battery_unknown.Parent = self
|
battery_unknown.Parent = self
|
||||||
battery_unknown.ImageName = self.icon_base_path + "battery_unknown.png"
|
battery_unknown.ImageName = self.icon_base_path + "battery.png"
|
||||||
battery_unknown.Adjust(start_x+self.IconWidth+self.IconWidth+8, self.IconHeight/2+(self.BarHeight-self.IconHeight)/2, self.IconWidth, self.IconHeight, 0)
|
battery_unknown.Adjust(start_x+self.IconWidth+self.IconWidth+8, self.IconHeight/2+(self.BarHeight-self.IconHeight)/2, self.IconWidth, self.IconHeight, 0)
|
||||||
|
|
||||||
self.Icons["battery_unknown"] = battery_unknown
|
self.Icons["battery"] = battery_unknown
|
||||||
|
|
||||||
self.CheckBatteryStat()
|
self.CheckBatteryStat()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user