def Init(self): if self._Screen != None: if self._Screen._CanvasHWND != None and self._CanvasHWND == None: self._CanvasHWND = self._Screen._CanvasHWND self._PosX = self._Index*self._Screen._Width self._Width = self._Screen._Width ## equal to screen width self._Height = self._Screen._Height ps = InfoPageSelector() ps._Parent = self ps._PosX = 2 self._Ps = ps self._PsIndex = 0 ip = {} ip["key"] = "ip" ip["label"] = "IP" ip["value"] = "Not Connected" bssid = {} bssid["key"] = "bssid" bssid["label"] = "BSSID" bssid["value"] = "" self._AList["ip"] = ip self._AList["bssid"] = bssid self.GenList() self._DisconnectConfirmPage = WifiDisconnectConfirmPage() self._DisconnectConfirmPage._Screen = self._Screen self._DisconnectConfirmPage._Name = "Confirm Disconnect" self._DisconnectConfirmPage._Parent = self self._DisconnectConfirmPage.Init()
def Init(self): if self._Screen != None: if self._Screen._CanvasHWND != None and self._CanvasHWND == None: self._CanvasHWND = self._Screen._CanvasHWND self._PosX = self._Index*self._Screen._Width self._Width = self._Screen._Width ## equal to screen width self._Height = self._Screen._Height ps = InfoPageSelector() ps._PosX = 11 ps._Parent = self ps._Width = self._Width-10 self._Ps = ps self._PsIndex = 0 self._Scroller = ListScroller() self._Scroller._Parent = self self._Scroller._PosX = 2 self._Scroller._PosY = 2 self._Scroller.Init() self._ConfirmBox = DeleteCoreConfirmPage() self._ConfirmBox._Screen = self._Screen self._ConfirmBox._Name = "Confirm to Delete?" self._ConfirmBox._Parent = self self._ConfirmBox.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"], ["", "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): if self._Screen != None: if self._Screen._CanvasHWND != None and self._CanvasHWND == None: self._HWND = self._Screen._CanvasHWND self._CanvasHWND = pygame.Surface( (self._Screen._Width, self._BGheight)) self._PosX = self._Index * self._Screen._Width self._Width = self._Screen._Width ## equal to screen width self._Height = self._Screen._Height done = IconItem() done._ImgSurf = MyIconPool.GiveIconSurface("done") done._MyType = ICON_TYPES["STAT"] done._Parent = self self._Icons["done"] = done ps = InfoPageSelector() ps._Parent = self self._Ps = ps self._PsIndex = 0 self.SyncList() self._Scroller = ListScroller() self._Scroller._Parent = self self._Scroller._PosX = self._Width - 10 self._Scroller._PosY = 2 self._Scroller.Init() self._Scroller.SetCanvasHWND(self._CanvasHWND) self._remove_page = YesCancelConfirmPage() self._remove_page._Screen = self._Screen self._remove_page._StartOrA_Event = self.RemoveGame self._remove_page._Name = "Are you sure?" self._remove_page.Init() self._Keyboard = Keyboard() self._Keyboard._Name = "Enter warehouse addr" self._Keyboard._FootMsg = ["Nav.", "Add", "ABC", "Backspace", "Enter"] self._Keyboard._Screen = self._Screen self._Keyboard.Init() self._Keyboard.SetPassword("github.com/clockworkpi/warehouse") self._Keyboard._Caller = self self._PreviewPage = ImageDownloadProcessPage() self._PreviewPage._Screen = self._Screen self._PreviewPage._Name = "Preview" self._PreviewPage.Init() self._LoadHousePage = LoadHousePage() self._LoadHousePage._Screen = self._Screen self._LoadHousePage._Name = "Warehouse" self._LoadHousePage._Caller = self self._LoadHousePage.Init()
def Init(self): if self._Screen != None: if self._Screen._CanvasHWND != None and self._CanvasHWND == None: self._CanvasHWND = self._Screen._CanvasHWND self._PosX = self._Index * self._Screen._Width self._Width = self._Screen._Width ## equal to screen width self._Height = self._Screen._Height ps = InfoPageSelector() ps._PosX = 11 ps._Parent = self ps._Width = self._Width - 10 self._Ps = ps self._PsIndex = 0 self._Scroller = ListScroller() self._Scroller._Parent = self self._Scroller._PosX = 2 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()