mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 16:08:52 +01:00
fix code,sound,brightness,update
This commit is contained in:
parent
92417db7ad
commit
620ae33593
@ -3,6 +3,7 @@ package main
|
||||
import(
|
||||
"fmt"
|
||||
|
||||
"io/ioutil"
|
||||
"strconv"
|
||||
"github.com/cuu/gogame/event"
|
||||
"github.com/cuu/LauncherGoDev/sysgo"
|
||||
@ -17,22 +18,22 @@ type SliderIcon struct {
|
||||
|
||||
}
|
||||
func NewSliderIcon() *SliderIcon {
|
||||
p := &UI.SliderIcon{}
|
||||
p.MyType = ICON_TYPES["EXE"]
|
||||
p.Align = ALIGN["VCenter"]
|
||||
p := &SliderIcon{}
|
||||
p.MyType = UI.ICON_TYPES["EXE"]
|
||||
p.Align = UI.ALIGN["VCenter"]
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
type SliderMultiIcon struct {
|
||||
UI.MultiIconItem
|
||||
Parent *SoundSlider
|
||||
Parent *BSlider
|
||||
}
|
||||
|
||||
func NewSliderMultiIcon() *SliderMultiIcon {
|
||||
p := &SliderMultiIcon{}
|
||||
p.MyType = ICON_TYPES["EXE"]
|
||||
p.Align = ALIGN["VCenter"]
|
||||
p.MyType = UI.ICON_TYPES["EXE"]
|
||||
p.Align = UI.ALIGN["VCenter"]
|
||||
|
||||
p.IconIndex = 0
|
||||
p.IconWidth = 18
|
||||
@ -47,7 +48,7 @@ type BSlider struct {
|
||||
BGpng *SliderIcon
|
||||
BGwidth int
|
||||
BGheight int
|
||||
NeedleSurf
|
||||
//NeedleSurf
|
||||
Scale *SliderMultiIcon
|
||||
Parent *BrightnessPage
|
||||
|
||||
@ -56,7 +57,7 @@ type BSlider struct {
|
||||
}
|
||||
|
||||
func NewBSlider() *BSlider {
|
||||
p := &SoundSlider{}
|
||||
p := &BSlider{}
|
||||
p.Range = [2]int{0,255}
|
||||
p.Value = 0
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import(
|
||||
"fmt"
|
||||
"github.com/veandco/go-sdl2/sdl"
|
||||
"github.com/cuu/gogame/event"
|
||||
"github.com/cuu/LauncherGoDev/sysgo/UI"
|
||||
)
|
||||
@ -15,8 +16,8 @@ type SliderIcon struct {
|
||||
}
|
||||
func NewSliderIcon() *SliderIcon {
|
||||
p := &SliderIcon{}
|
||||
p.MyType = ICON_TYPES["EXE"]
|
||||
p.Align = ALIGN["VCenter"]
|
||||
p.MyType = UI.ICON_TYPES["EXE"]
|
||||
p.Align = UI.ALIGN["VCenter"]
|
||||
|
||||
return p
|
||||
}
|
||||
@ -28,8 +29,8 @@ type SliderMultiIcon struct {
|
||||
|
||||
func NewSliderMultiIcon() *SliderMultiIcon {
|
||||
p := &SliderMultiIcon{}
|
||||
p.MyType = ICON_TYPES["EXE"]
|
||||
p.Align = ALIGN["VCenter"]
|
||||
p.MyType = UI.ICON_TYPES["EXE"]
|
||||
p.Align = UI.ALIGN["VCenter"]
|
||||
|
||||
p.IconIndex = 0
|
||||
p.IconWidth = 18
|
||||
@ -44,7 +45,7 @@ type SoundSlider struct {
|
||||
BGpng *SliderIcon
|
||||
BGwidth int
|
||||
BGheight int
|
||||
NeedleSurf
|
||||
//NeedleSurf
|
||||
Scale *SliderMultiIcon
|
||||
Parent *SoundPage
|
||||
|
||||
@ -193,7 +194,7 @@ func (self *SoundPage) OnLoadCb() {
|
||||
}
|
||||
|
||||
func (self *SoundPage) WhenSliderDrag(val int) { //value 0 - 100
|
||||
if value <0 || value > 100 {
|
||||
if val <0 || val > 100 {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/cuu/LauncherGoDev/sysgo/UI"
|
||||
)
|
||||
/******************************************************************************/
|
||||
type UpdatePlugin struct {
|
||||
UI.Plugin
|
||||
|
||||
@ -12,10 +12,10 @@ import (
|
||||
"github.com/cuu/gogame/time"
|
||||
// "github.com/cuu/gogame/surface"
|
||||
"github.com/cuu/gogame/event"
|
||||
"github.com/cuu/gogame/rect"
|
||||
"github.com/cuu/gogame/color"
|
||||
//"github.com/cuu/gogame/rect"
|
||||
//"github.com/cuu/gogame/color"
|
||||
// "github.com/cuu/gogame/font"
|
||||
"github.com/cuu/gogame/draw"
|
||||
//"github.com/cuu/gogame/draw"
|
||||
|
||||
"github.com/cuu/LauncherGoDev/sysgo"
|
||||
"github.com/cuu/LauncherGoDev/sysgo/UI"
|
||||
@ -40,18 +40,18 @@ func NewUpdateConfirmPage() *UpdateConfirmPage {
|
||||
p.FootMsg = [5]string{"Nav","","","Cancel","Yes"}
|
||||
p.ConfirmText = "Confirm Update?"
|
||||
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
func (self *UpdateConfirmPage) KeyDown(ev *event.Event) {
|
||||
|
||||
if ev.Data["Key"] == CurKeys["A"] || ev.Data["Key"] == CurKeys["Menu"] {
|
||||
if ev.Data["Key"] == UI.CurKeys["A"] || ev.Data["Key"] == UI.CurKeys["Menu"] {
|
||||
self.ReturnToUpLevelPage()
|
||||
self.Screen.Draw()
|
||||
self.Screen.SwapAndShow()
|
||||
}
|
||||
|
||||
if ev.Data["Key"] == CurKeys["B"] {
|
||||
if ev.Data["Key"] == UI.CurKeys["B"] {
|
||||
if self.GIT == true {
|
||||
cmdpath := fmt.Sprintf("feh --bg-center %s/sys.go/gameshell/wallpaper/updating.png; cd %s ;git pull; git reset --hard %s ; feh --bg-center %s/sys.py/gameshell/wallpaper/loading.png ",
|
||||
launchergo_path,
|
||||
@ -95,7 +95,7 @@ func NewUpdatePage() *UpdatePage {
|
||||
p.SelectedIconTopOffset = 20
|
||||
p.EasingDur = 10
|
||||
|
||||
p.Align = ALIGN["SLeft"]
|
||||
p.Align = UI.ALIGN["SLeft"]
|
||||
p.ListFontObj = UI.Fonts["varela15"]
|
||||
|
||||
return p
|
||||
@ -249,6 +249,8 @@ func (self *UpdatePage) KeyDown(ev *event.Event) {
|
||||
|
||||
func (self *UpdatePage) Draw() {
|
||||
self.ClearCanvas()
|
||||
for
|
||||
for _,v := range self.MyList {
|
||||
v.Draw()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
4
build.sh
4
build.sh
@ -21,11 +21,11 @@ go build -o wifi.so -buildmode=plugin
|
||||
cd -
|
||||
|
||||
cd Menu/GameShell/10_Settings/Sound
|
||||
go build --ldflags="-s -w" o sound.so -buildmode=plugin
|
||||
go build -ldflags="-s -w" -o sound.so -buildmode=plugin
|
||||
cd -
|
||||
|
||||
cd Menu/GameShell/10_Settings/Brightness
|
||||
go build --ldflags="-s -w" o brightness.so -buildmode=plugin
|
||||
go build -ldflags="-s -w" -o brightness.so -buildmode=plugin
|
||||
cd -
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user