mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-12 17:58:50 +01:00
add select button to footer
This commit is contained in:
parent
df05604013
commit
a2d8de4535
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.9 KiB |
@ -99,8 +99,7 @@ class RomListPage(Page):
|
|||||||
|
|
||||||
_Icons = {}
|
_Icons = {}
|
||||||
_Selector=None
|
_Selector=None
|
||||||
# TODO: show "AddFav"
|
_FootMsg = ["Nav","Del","Scan","Back","Run","AddFav"]
|
||||||
_FootMsg = ["Nav","Del","Scan","Back","Run"]
|
|
||||||
_MyList = []
|
_MyList = []
|
||||||
_ListFont = fonts["notosanscjk15"]
|
_ListFont = fonts["notosanscjk15"]
|
||||||
_MyStack = None
|
_MyStack = None
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class FootBar(Widget):
|
|||||||
if FileExists(icondir) == False and os.path.isdir(icondir) == False:
|
if FileExists(icondir) == False and os.path.isdir(icondir) == False:
|
||||||
return
|
return
|
||||||
|
|
||||||
keynames = ["nav","x","y","a","b"]
|
keynames = ["nav","x","y","a","b","select"]
|
||||||
|
|
||||||
share_surf = pygame.image.load(icon_base_path+"footbar.png").convert_alpha()
|
share_surf = pygame.image.load(icon_base_path+"footbar.png").convert_alpha()
|
||||||
|
|
||||||
@ -133,11 +133,12 @@ class FootBar(Widget):
|
|||||||
self.Draw()
|
self.Draw()
|
||||||
|
|
||||||
def SetLabelTexts(self,texts):
|
def SetLabelTexts(self,texts):
|
||||||
barr = ["nav","y","x","b","a"]
|
barr = ["nav","y","x","b","a","select"]
|
||||||
|
texts2 = texts + [""] if len(texts) == 5 else texts
|
||||||
|
|
||||||
for idx,x in enumerate(barr):
|
for idx,x in enumerate(barr):
|
||||||
try:
|
try:
|
||||||
self._Icons[x]._Label.SetText(MyLangManager.Tr(texts[idx]))
|
self._Icons[x]._Label.SetText(MyLangManager.Tr(texts2[idx]))
|
||||||
except IndexError:
|
except IndexError:
|
||||||
print("Index "+x+" doesn't exist!")
|
print("Index "+x+" doesn't exist!")
|
||||||
|
|
||||||
@ -169,7 +170,7 @@ class FootBar(Widget):
|
|||||||
if self._State == "normal":
|
if self._State == "normal":
|
||||||
_w=0
|
_w=0
|
||||||
#for i,x in enumerate(("a","b","x","y")):
|
#for i,x in enumerate(("a","b","x","y")):
|
||||||
for i, x in enumerate(("b","a","y","x")):
|
for i, x in enumerate(("b","a","y","x","select")):
|
||||||
if self._Icons[x]._Label._Text!="":
|
if self._Icons[x]._Label._Text!="":
|
||||||
if i==0:
|
if i==0:
|
||||||
_w += self._Icons[x].TotalWidth()
|
_w += self._Icons[x].TotalWidth()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user