mirror of
https://github.com/clockworkpi/launcher.git
synced 2026-03-23 04:12:42 +01:00
add languages into settings menu
This commit is contained in:
@@ -14,47 +14,21 @@ from UI.util_funcs import midRect,FileExists
|
||||
from UI.keys_def import CurKeys
|
||||
from UI.scroller import ListScroller
|
||||
from UI.skin_manager import MySkinManager
|
||||
from UI.lang_manager import MyLangManager
|
||||
from UI.info_page_selector import InfoPageSelector
|
||||
|
||||
from list_item import ListItem
|
||||
|
||||
import myvars
|
||||
|
||||
class ListPageSelector(PageSelector):
|
||||
_BackgroundColor = MySkinManager.GiveColor('Front')
|
||||
|
||||
def __init__(self):
|
||||
self._PosX = 0
|
||||
self._PosY = 0
|
||||
self._Height = 0
|
||||
self._Width = Width
|
||||
|
||||
def AnimateDraw(self,x2,y2):
|
||||
pass
|
||||
|
||||
def Draw(self):
|
||||
idx = self._Parent._PsIndex
|
||||
if idx < len(self._Parent._MyList):
|
||||
x = 2
|
||||
y = self._Parent._MyList[idx]._PosY+1
|
||||
h = self._Parent._MyList[idx]._Height -3
|
||||
|
||||
self._PosX = x
|
||||
self._PosY = y
|
||||
self._Height = h
|
||||
|
||||
aa_round_rect(self._Parent._CanvasHWND,
|
||||
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
|
||||
|
||||
|
||||
|
||||
class ListPage(Page):
|
||||
|
||||
_Icons = {}
|
||||
_Selector=None
|
||||
|
||||
_FootMsg = ["Nav","","","Back","Enter"]
|
||||
_FootMsg = [MyLangManager.Tr("Nav"),"","",MyLangManager.Tr("Back"),MyLangManager.Tr("Enter")]
|
||||
_MyList = []
|
||||
_ListFontObj = fonts["varela15"]
|
||||
_ListFontObj = MyLangManager.TrFont("varela15")
|
||||
|
||||
_Scroller = None
|
||||
|
||||
@@ -71,11 +45,12 @@ class ListPage(Page):
|
||||
|
||||
self._CanvasHWND = self._Screen._CanvasHWND
|
||||
|
||||
ps = ListPageSelector()
|
||||
ps = InfoPageSelector()
|
||||
ps._Parent = self
|
||||
ps._PosX = 2
|
||||
self._Ps = ps
|
||||
self._PsIndex = 0
|
||||
|
||||
|
||||
# "" pkgname, label
|
||||
alist = [["","Airplane","Airplane Mode"],
|
||||
["","PowerOptions","Power Options"],
|
||||
@@ -85,6 +60,7 @@ class ListPage(Page):
|
||||
["","Brightness","BackLight Brightness"],
|
||||
["","Storage",""],
|
||||
["","Time","Timezone"],
|
||||
["","Languages","Languages"],
|
||||
["","Notification","Notification"],
|
||||
["","Update", ""],
|
||||
["","About", "About"],
|
||||
|
||||
Reference in New Issue
Block a user