mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 16:08:52 +01:00
bug fix
This commit is contained in:
parent
6980b93262
commit
1a790ae4d4
@ -76,13 +76,15 @@ func ReunionPagesIcons(self *UI.MainScreen) {
|
||||
}
|
||||
|
||||
var tmpswap []Tup
|
||||
for i,x := range tmp {
|
||||
onlyone := false
|
||||
for _,x := range tmp {
|
||||
if strings.HasPrefix(x.FileName,retro_games_dir) == false{
|
||||
tmpswap = append(tmpswap,x)
|
||||
}
|
||||
|
||||
if strings.HasPrefix(x.FileName,retro_games_dir) == true && i==retro_games_idx[0] {
|
||||
if strings.HasPrefix(x.FileName,retro_games_dir) == true && onlyone == false {
|
||||
tmpswap = append(tmpswap,x)
|
||||
onlyone = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ func (self *Widget) NewCoord(x,y int) {
|
||||
func Init() {
|
||||
font.Init()
|
||||
|
||||
skinpath := "skin/"+sysgo.SKIN+"/truetype"
|
||||
skinpath := sysgo.SKIN+"/truetype"
|
||||
|
||||
Fonts = make(map[string]*ttf.Font)
|
||||
|
||||
|
||||
@ -44,23 +44,28 @@ func Abs(n int) int {
|
||||
|
||||
|
||||
func SkinMap(orig_file_or_dir string) string {
|
||||
DefaultSkin := "default"
|
||||
DefaultSkin := "skin/default"
|
||||
ret := ""
|
||||
skin_dir_prefix:= "skin/"
|
||||
if strings.HasPrefix(orig_file_or_dir, "..") {
|
||||
ret = strings.Replace(orig_file_or_dir,"..",skin_dir_prefix + sysgo.SKIN,-1)
|
||||
lastpad := ""
|
||||
|
||||
if string(orig_file_or_dir[len(orig_file_or_dir)-1]) == "/" {
|
||||
lastpad = string(orig_file_or_dir[len(orig_file_or_dir)-1])
|
||||
}
|
||||
|
||||
if strings.HasPrefix(orig_file_or_dir, "/home/cpi/apps/Menu") {
|
||||
ret = strings.Replace(orig_file_or_dir,"/home/cpi/apps/Menu/", filepath.Join(sysgo.SKIN,"/Menu/GameShell/"),-1)
|
||||
if FileExists(ret) == false {
|
||||
ret = filepath.Join(DefaultSkin,orig_file_or_dir)
|
||||
}
|
||||
}else { // there is no need to add insert "sysgo" in the middle
|
||||
ret = filepath.Join(sysgo.SKIN,orig_file_or_dir)
|
||||
if FileExists(ret) == false {
|
||||
ret = strings.Replace(orig_file_or_dir,"..", skin_dir_prefix + DefaultSkin,-1)
|
||||
}
|
||||
}else {
|
||||
ret = skin_dir_prefix+sysgo.SKIN+"/"+orig_file_or_dir
|
||||
if FileExists(ret) == false {
|
||||
ret = skin_dir_prefix+DefaultSkin+"/"+orig_file_or_dir
|
||||
ret = filepath.Join(DefaultSkin,orig_file_or_dir)
|
||||
}
|
||||
}
|
||||
|
||||
if FileExists(ret) {
|
||||
return ret
|
||||
return ret+lastpad
|
||||
}else { // if not existed both in default or custom skin ,return where it is
|
||||
return orig_file_or_dir
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ var (
|
||||
|
||||
VERSION="0.22"
|
||||
|
||||
SKIN="default"
|
||||
SKIN="skin/default"
|
||||
|
||||
//load from dot files
|
||||
CurPowerLevel= "performance"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user