mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-03-19 02:12:46 +01:00
complied,backup
This commit is contained in:
@@ -58,22 +58,24 @@ func Init() {
|
||||
fonts_path["noto"] = fmt.Sprintf("%s/NotoSansMono-Regular.ttf", skinpath)
|
||||
fonts_path["notocjk"] = fmt.Sprintf("%s/NotoSansCJK-Regular.ttf" ,skinpath)
|
||||
|
||||
for i:=12;i<41;i++ {
|
||||
for i:=10;i<41;i++ {
|
||||
keyname := fmt.Sprintf("varela%d",i)
|
||||
Fonts[ keyname ] = font.Font(fonts_path["varela"],i)
|
||||
}
|
||||
|
||||
|
||||
Fonts["varela120"] = font.Font(fonts_path["varela"],120)
|
||||
|
||||
for i:=10;i<26;i++ {
|
||||
keyname := fmt.Sprintf("veramono%d", i)
|
||||
Fonts[keyname] = font.Font(fonts_path["veramono"],i)
|
||||
}
|
||||
|
||||
for i:= 10;i<18;i++ {
|
||||
for i:= 10;i<28;i++ {
|
||||
keyname := fmt.Sprintf("notosansmono%d", i)
|
||||
Fonts[keyname] = font.Font(fonts_path["noto"], i)
|
||||
}
|
||||
|
||||
for i:=10;i<18;i++ {
|
||||
for i:=10;i<28;i++ {
|
||||
keyname := fmt.Sprintf("notosanscjk%d",i)
|
||||
Fonts[keyname] = font.Font(fonts_path["notocjk"],i)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
package UI
|
||||
|
||||
import (
|
||||
|
||||
"fmt"
|
||||
gotime "time"
|
||||
|
||||
"github.com/veandco/go-sdl2/ttf"
|
||||
|
||||
"github.com/cuu/gogame/color"
|
||||
"github.com/cuu/gogame/event"
|
||||
"github.com/cuu/gogame/surface"
|
||||
|
||||
"github.com/cuu/LauncherGoDev/sysgo"
|
||||
|
||||
)
|
||||
type CounterScreen struct {
|
||||
FullScreen
|
||||
@@ -97,7 +104,7 @@ func (self *CounterScreen) StartCounter() {
|
||||
|
||||
self.Counting = true
|
||||
|
||||
self.TheTicker.Start()
|
||||
self.TheTicker = gotime.NewTicker(500 * gotime.Millisecond)
|
||||
|
||||
go self.Interval()
|
||||
|
||||
@@ -136,7 +143,6 @@ func (self *CounterScreen) Init() {
|
||||
number_str := fmt.Sprintf("%d",self.Number)
|
||||
self.NumberLabel.Init(number_str,self.CounterFont,self.FGColor)
|
||||
|
||||
self.TheTicker = gotime.NewTicker(500 * gotime.Millisecond)
|
||||
self.TickerStoped = make(chan bool,1)
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,11 @@ package UI
|
||||
|
||||
import (
|
||||
|
||||
"github.com/veandco/go-sdl2/sdl"
|
||||
"github.com/cuu/gogame/surface"
|
||||
|
||||
"github.com/cuu/gogame/rect"
|
||||
|
||||
)
|
||||
|
||||
type FullScreen struct {
|
||||
|
||||
@@ -9,6 +9,8 @@ import (
|
||||
"github.com/cuu/gogame/rect"
|
||||
"github.com/cuu/gogame/color"
|
||||
"github.com/cuu/gogame/font"
|
||||
"github.com/cuu/gogame/draw"
|
||||
|
||||
)
|
||||
|
||||
type LabelInterface interface {
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"strconv"
|
||||
"bufio"
|
||||
"strings"
|
||||
"os/exec"
|
||||
gotime "time"
|
||||
|
||||
"github.com/veandco/go-sdl2/sdl"
|
||||
@@ -140,7 +141,7 @@ func NewTitleBar() *TitleBar {
|
||||
|
||||
}
|
||||
|
||||
func (t *TitleBar) RoundRobinCheck() {
|
||||
func (self *TitleBar) RoundRobinCheck() {
|
||||
for {
|
||||
|
||||
if self.InLowBackLight < 0 {
|
||||
@@ -166,7 +167,7 @@ func (t *TitleBar) RoundRobinCheck() {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *TitleBar) UpdateWifiStrength() {
|
||||
func (self *TitleBar) UpdateWifiStrength() {
|
||||
self.Draw(self.Title)
|
||||
}
|
||||
|
||||
@@ -213,7 +214,7 @@ func (self *TitleBar) SyncSoundVolume() {
|
||||
}
|
||||
|
||||
// for outside widget to update sound icon
|
||||
func (t *TitleBar) SetSoundVolume(vol int) {
|
||||
func (self *TitleBar) SetSoundVolume(vol int) {
|
||||
|
||||
snd_segs := [][]int{ []int{0,10}, []int{10,30}, []int{30,70},[]int{70,100} }
|
||||
ge := 0
|
||||
|
||||
Reference in New Issue
Block a user