mirror of
https://github.com/clockworkpi/launcher.git
synced 2026-03-23 12:22:47 +01:00
fix xbox layout UX
This commit is contained in:
@@ -17,7 +17,7 @@ from UI.page import Page,PageSelector
|
||||
from UI.label import Label
|
||||
from UI.fonts import fonts
|
||||
from UI.util_funcs import midRect
|
||||
from UI.keys_def import CurKeys
|
||||
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
|
||||
from UI.icon_item import IconItem
|
||||
from UI.icon_pool import MyIconPool
|
||||
from UI.skin_manager import MySkinManager
|
||||
@@ -265,7 +265,7 @@ class MPDSpectrumPage(Page):
|
||||
|
||||
|
||||
def KeyDown(self,event):
|
||||
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
|
||||
if IsKeyMenuOrB(event.key):
|
||||
try:
|
||||
os.close(self._FIFO)
|
||||
self._FIFO = None
|
||||
@@ -281,13 +281,6 @@ class MPDSpectrumPage(Page):
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
if event.key == CurKeys["Start"]:
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
if event.key == CurKeys["Enter"]:
|
||||
pass
|
||||
|
||||
|
||||
def Draw(self):
|
||||
self.ClearCanvas()
|
||||
|
||||
@@ -11,7 +11,7 @@ from UI.label import Label
|
||||
from UI.fonts import fonts
|
||||
from UI.icon_item import IconItem
|
||||
from UI.util_funcs import midRect
|
||||
from UI.keys_def import CurKeys
|
||||
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
|
||||
from UI.multi_icon_item import MultiIconItem
|
||||
from UI.icon_pool import MyIconPool
|
||||
from UI.scroller import ListScroller
|
||||
@@ -82,7 +82,7 @@ class MusicLibListPage(Page):
|
||||
|
||||
_Icons = {}
|
||||
_Selector=None
|
||||
_FootMsg = ["Nav","Scan","","Back","Add to Playlist"]
|
||||
_FootMsg = ["Nav","","Scan","Back","Add to Playlist"]
|
||||
_MyList = []
|
||||
_SwapMyList = []
|
||||
_ListFont = fonts["notosanscjk15"]
|
||||
@@ -226,7 +226,7 @@ class MusicLibListPage(Page):
|
||||
|
||||
def KeyDown(self,event):
|
||||
|
||||
if event.key == CurKeys["Menu"] or event.key == CurKeys["Left"] or event.key == CurKeys["A"]:
|
||||
if IsKeyMenuOrB(event.key) or event.key == CurKeys["Left"]:
|
||||
|
||||
self.ReturnToUpLevelPage()
|
||||
self._Screen.Draw()
|
||||
@@ -258,7 +258,7 @@ class MusicLibListPage(Page):
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
if event.key == CurKeys["Enter"]:
|
||||
if IsKeyStartOrA(event.key):
|
||||
self.Click()
|
||||
|
||||
def Draw(self):
|
||||
|
||||
@@ -12,7 +12,7 @@ from UI.icon_item import IconItem
|
||||
from UI.label import Label
|
||||
from UI.fonts import fonts
|
||||
from UI.util_funcs import midRect
|
||||
from UI.keys_def import CurKeys
|
||||
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
|
||||
from UI.icon_pool import MyIconPool
|
||||
from UI.skin_manager import MySkinManager
|
||||
from UI.lang_manager import MyLangManager
|
||||
@@ -61,7 +61,7 @@ class PlayListPage(Page):
|
||||
|
||||
_Icons = {}
|
||||
_Selector=None
|
||||
_FootMsg = ["Nav","RTA","Remove","Back","Play/Pause"]
|
||||
_FootMsg = ["Nav","Remove","RTA","Back","Play/Pause"]
|
||||
_MyList = []
|
||||
_ListFont = fonts["notosanscjk15"]
|
||||
|
||||
@@ -252,7 +252,7 @@ class PlayListPage(Page):
|
||||
self.SyncScroll()
|
||||
|
||||
def KeyDown(self,event):
|
||||
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
|
||||
if IsKeyMenuOrB(event.key):
|
||||
if myvars.Poller != None:
|
||||
myvars.Poller.stop()
|
||||
self._CurSongTime=""
|
||||
@@ -283,7 +283,7 @@ class PlayListPage(Page):
|
||||
self._Screen.Draw()
|
||||
self._Screen.SwapAndShow()
|
||||
|
||||
if event.key == CurKeys["Enter"]:
|
||||
if IsKeyStartOrA(event.key):
|
||||
self.Click()
|
||||
|
||||
if event.key == CurKeys["X"]: # start spectrum
|
||||
|
||||
Reference in New Issue
Block a user