mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-12 07:58:51 +01:00
fix
This commit is contained in:
parent
529f1d1b83
commit
2d18c23e89
@ -2,6 +2,7 @@ package MusicPlayer
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"log"
|
||||
"github.com/cuu/gogame/event"
|
||||
"github.com/cuu/gogame/rect"
|
||||
@ -128,8 +129,8 @@ func (self *MusicPlayerPage) SyncList() {
|
||||
li.Init("NoName")
|
||||
}
|
||||
}
|
||||
|
||||
li.Labels["Text"].PosX = 7
|
||||
x,_ := li.Labels["Text"].Coord()
|
||||
li.Labels["Text"].NewCoord(x,7)
|
||||
self.MyList = append(self.MyList, li)
|
||||
}
|
||||
|
||||
@ -143,8 +144,11 @@ func (self *MusicPlayerPage) SyncPlaying() {
|
||||
self.MyList[i].(*MusicPlayPageListItem).Active = false
|
||||
self.MyList[i].(*MusicPlayPageListItem).PlayingProcess = 0
|
||||
}
|
||||
current_song,_ := conn.CurrentSong()
|
||||
if len(current_song) > 0 {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
func (self *MusicPlayerPage) Init() {
|
||||
if self.Screen == nil {
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
|
||||
//"github.com/clockworkpi/LauncherGoDev/sysgo"
|
||||
"github.com/clockworkpi/LauncherGoDev/sysgo/UI"
|
||||
"github.com/cuu/gogame/color"
|
||||
//"github.com/cuu/gogame/color"
|
||||
"github.com/cuu/gogame/draw"
|
||||
//"github.com/cuu/gogame/event"
|
||||
//"github.com/cuu/gogame/rect"
|
||||
@ -46,26 +46,27 @@ func NewMusicPlayPageListItem() *MusicPlayPageListItem {
|
||||
func (self *MusicPlayPageListItem) Draw() {
|
||||
|
||||
x, _ := self.Labels["Text"].Coord()
|
||||
w, h := self.Labels["Text"].Size()
|
||||
_, h := self.Labels["Text"].Size()
|
||||
|
||||
self.Labels["Text"].NewCoord(x, self.PosY+(self.Height-h)/2)
|
||||
|
||||
|
||||
if self.MyType == UI.ICON_TYPES["DIR"] && self.Path != "[..]" {
|
||||
sys_icon := self.Parent.(*MusicPlayerPage).Icons["sys"]
|
||||
sys_icon.IconIndex = 0.
|
||||
sys_icon.NewCoord(self.PosX+12,self.PosY + ( self.Height - sys_icon.Height)/2 + sys_icon.Height /2)
|
||||
_,h := sys_icon.Size()
|
||||
sys_icon.SetIconIndex(0)
|
||||
sys_icon.NewCoord(self.PosX+12,self.PosY + ( self.Height - h)/2 + h/2)
|
||||
sys_icon.Draw()
|
||||
}
|
||||
|
||||
if self.MyType == UI.ICON_TYPES["FILE"] {
|
||||
sys_icon := self.Parent.(*MusicPlayerPage).Icons["sys"]
|
||||
sys_icon.IconIndex = 1
|
||||
sys_icon.NewCoord(self.PosX+12,self.PosY + ( self.Height - sys_icon.Height)/2 + sys_icon.Height /2)
|
||||
_,h := sys_icon.Size()
|
||||
sys_icon.SetIconIndex(1)
|
||||
sys_icon.NewCoord(self.PosX+12,self.PosY + ( self.Height - h)/2 + h /2)
|
||||
sys_icon.Draw()
|
||||
}
|
||||
|
||||
self.Labels["Text"].Active = self.Active
|
||||
|
||||
self.Labels["Text"].NewCoord(x, self.PosY+(self.Height-h)/2)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user