mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 10:18:51 +01:00
FootMsg changes for the buttons layout
This commit is contained in:
parent
0f2cf846eb
commit
badeb13268
@ -15,6 +15,8 @@ from lang_manager import MyLangManager
|
||||
from widget import Widget
|
||||
from skin_manager import MySkinManager
|
||||
|
||||
import config
|
||||
|
||||
icon_base_path = MySkinManager.GiveIcon("gameshell/footbar_icons/")
|
||||
|
||||
class FootBarIcon(MultiIconItem):
|
||||
@ -134,7 +136,10 @@ class FootBar(Widget):
|
||||
self.Draw()
|
||||
|
||||
def SetLabelTexts(self,texts):
|
||||
barr = ["nav","y","x","b","a","select"]
|
||||
if config.ButtonsLayout == "xbox":
|
||||
barr = ["nav","y","x","b","a","select"]
|
||||
else:
|
||||
barr = ["nav","x","y","a","b","select"]
|
||||
texts2 = texts + [""] if len(texts) == 5 else texts
|
||||
|
||||
for idx,x in enumerate(barr):
|
||||
|
||||
@ -6,9 +6,8 @@ from sys import exit
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
from config import CurKeySet
|
||||
|
||||
import config
|
||||
from config import CurKeySet ## read only
|
||||
|
||||
def GetButtonsLayoutMode():
|
||||
lm = "xbox"
|
||||
@ -25,6 +24,7 @@ def SetButtonsLayoutMode(mode):
|
||||
SetXYABButtons(mode)
|
||||
with open(".buttonslayout", "w") as f:
|
||||
f.write(mode)
|
||||
config.ButtonsLayout = mode
|
||||
|
||||
def SetXYABButtons(mode):
|
||||
if mode == "snes":
|
||||
|
||||
@ -19,6 +19,8 @@ VERSION="stable 1.25"
|
||||
|
||||
SKIN=None
|
||||
|
||||
ButtonsLayout="xbox"
|
||||
|
||||
## three timer values in seconds: dim screen, close screen,PowerOff
|
||||
## zero means no action
|
||||
PowerLevels = {}
|
||||
@ -30,7 +32,7 @@ PowerLevels["balance_saving"] = [40,0,0]
|
||||
PowerLevel = "balance_saving"
|
||||
|
||||
def PreparationInAdv():
|
||||
global SKIN
|
||||
global SKIN,ButtonsLayout
|
||||
global PowerLevel
|
||||
|
||||
if SKIN != None:
|
||||
@ -44,7 +46,16 @@ def PreparationInAdv():
|
||||
|
||||
gameshell_skin = gameshell_skin.strip()
|
||||
SKIN= gameshell_skin
|
||||
|
||||
|
||||
if FileExists(".buttonslayout") == True:
|
||||
with open(".buttonslayout") as f:
|
||||
btnlayout = f.read()
|
||||
|
||||
btnlayout = btnlayout.strip()
|
||||
ButtonsLayout = btnlayout
|
||||
if ButtonsLayout != "xbox" and ButtonsLayout != "snes":
|
||||
ButtonsLayout = "xbox"
|
||||
|
||||
if FileExists(".powerlevel") == False:
|
||||
os.system("touch .powerlevel")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user