def Init(self): self._PosX = self._Index * self._Screen._Width self._Width = self._Screen._Width self._Height = self._Screen._Height self._CanvasHWND = self._Screen._CanvasHWND ps = InfoPageSelector() ps._Parent = self ps._PosX = 2 self._Ps = ps self._PsIndex = 0 # "" pkgname, label alist = [["", "Airplane", "Airplane Mode"], ["", "PowerOptions", "Power Options"], ["", "Wifi", "Wi-Fi"], ["", "Bluetooth", "Bluetooth"], ["", "Sound", "Sound Volume"], ["", "Brightness", "BackLight Brightness"], ["", "Storage", ""], ["", "Time", "Timezone"], ["", "Languages", "Languages"], ["", "Notification", "Notification"], ["", "Update", ""], ["", "About", "About"], ["", "PowerOFF", "Power off"], ["", "ButtonsLayout", "Buttons Layout"], ["", "LauncherGo", "Switch to LauncherGo"], ["", "Lima", "GPU driver switch"], ["", "GateWay", "Network gateway switch"]] start_x = 0 start_y = 0 sys.path.append(myvars.basepath) # add self as import path for i, v in enumerate(alist): li = ListItem() li._Parent = self li._PosX = start_x li._PosY = start_y + i * ListItem._Height li._Width = Width li._Fonts["normal"] = self._ListFontObj if v[2] != "": li.Init(v[2]) else: li.Init(v[1]) #if v[1] == "Wifi" or v[1] == "Sound" or v[1] == "Brightness" or v[1] == "Storage" or v[1] == "Update" or v[1] == "About" or v[1] == "PowerOFF" or v[1] == "HelloWorld": if FileExists(myvars.basepath + "/" + v[1]): li._LinkObj = __import__(v[1]) init_cb = getattr(li._LinkObj, "Init", None) if init_cb != None: if callable(init_cb): li._LinkObj.Init(self._Screen) self._MyList.append(li) self._Scroller = ListScroller() self._Scroller._Parent = self self._Scroller._PosX = self._Width - 10 self._Scroller._PosY = 2 self._Scroller.Init()
def Init(self): self._PosX = self._Index * self._Screen._Width self._Width = self._Screen._Width self._Height = self._Screen._Height self._CanvasHWND = self._Screen._CanvasHWND ps = ListPageSelector() ps._Parent = self self._Ps = ps self._PsIndex = 0 # "" pkgname, label alist = [["", "Wifi", "Wi-Fi"], ["", "Sound", "Sound Volume"], ["", "Brightness", "BackLight Brightness"], ["", "Storage", ""], ["", "Update", ""], ["", "About", "About"], ["", "PowerOFF", "Power off"]] start_x = 0 start_y = 0 sys.path.append(myvars.basepath) # add self as import path for i, v in enumerate(alist): li = ListItem() li._Parent = self li._PosX = start_x li._PosY = start_y + i * ListItem._Height li._Width = Width li._Fonts["normal"] = self._ListFontObj if v[2] != "": li.Init(v[2]) else: li.Init(v[1]) if v[1] == "Wifi" or v[1] == "Sound" or v[1] == "Brightness" or v[ 1] == "Storage" or v[1] == "Update" or v[ 1] == "About" or v[1] == "PowerOFF": li._LinkObj = __import__(v[1]) init_cb = getattr(li._LinkObj, "Init", None) if init_cb != None: if callable(init_cb): li._LinkObj.Init(self._Screen) self._MyList.append(li) self._Scroller = ListScroller() self._Scroller._Parent = self self._Scroller._PosX = self._Width - 10 self._Scroller._PosY = 2 self._Scroller.Init()
def Init(self): self._PosX = self._Index * self._Screen._Width self._Width = self._Screen._Width self._Height = self._Screen._Height self._CanvasHWND = self._Screen._CanvasHWND ps = InfoPageSelector() ps._Parent = self ps._PosX = 2 self._Ps = ps self._PsIndex = 0 # "" pkgname, label alist = [ # ["","Airplane","Airplane Mode"], # haven't looked at this yet ["", "PowerOptions", "Power Options"], # haven't looked at this yet # ["","Wifi","Wi-Fi"], # currently lists networks, but doesn't know we're connected ["", "Bluetooth", "Bluetooth" ], # haven't looked at this much yet, but it lists devices ["", "Sound", "Sound Volume"], ["", "Brightness", "BackLight Brightness"], ["", "Storage", ""], # reports 6.6gb of total storage? I thought CHIP was 4gb # ["","Time","Timezone"], # lists timezones, but hangs on selection ["", "Languages", "Languages"], # works, but haven't localized new stuff yet # ["","Notification","Notification"], # ["","Update", ""], # not needed, we can update manually for now ["", "About", "About"], # ["","PowerOFF","Power OFF"], # ["","ButtonsLayout","Buttons Layout"], # not needed, this is just for switching between snes/xbox layouts # ["","LauncherGo","Switch to LauncherGo"], # not needed # ["","Lima","GPU driver switch"], # not needed # ["","GateWay","Network gateway switch"] # haven't looked at this yet ] start_x = 0 start_y = 0 sys.path.append(myvars.basepath) # add self as import path for i, v in enumerate(alist): li = ListItem() li._Parent = self li._PosX = start_x li._PosY = start_y + i * ListItem._Height li._Width = Width li._Fonts["normal"] = self._ListFontObj if v[2] != "": li.Init(v[2]) else: li.Init(v[1]) #if v[1] == "Wifi" or v[1] == "Sound" or v[1] == "Brightness" or v[1] == "Storage" or v[1] == "Update" or v[1] == "About" or v[1] == "PowerOFF" or v[1] == "HelloWorld": if FileExists(myvars.basepath + "/" + v[1]): li._LinkObj = __import__(v[1]) init_cb = getattr(li._LinkObj, "Init", None) if init_cb != None: if callable(init_cb): li._LinkObj.Init(self._Screen) self._MyList.append(li) self._Scroller = ListScroller() self._Scroller._Parent = self self._Scroller._PosX = self._Width - 10 self._Scroller._PosY = 2 self._Scroller.Init()