replace all MyIconPool._Icons to be MyIconPool.GiveIconSurface

This commit is contained in:
cuu 2019-06-13 21:24:56 +08:00
parent baae2545f1
commit c559728454
28 changed files with 48 additions and 48 deletions

View File

@ -254,7 +254,7 @@ class AboutPage(Page):
self._Height = self._Screen._Height self._Height = self._Screen._Height
bgpng = IconItem() bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["about_bg"] bgpng._ImgSurf = MyIconPool.GiveIconSurface("about_bg")
bgpng._MyType = ICON_TYPES["STAT"] bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self bgpng._Parent = self
bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0) bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)

View File

@ -65,21 +65,21 @@ class AirplanePage(Page):
airwire = IconItem() airwire = IconItem()
airwire._ImgSurf = MyIconPool._Icons["airwire"] airwire._ImgSurf = MyIconPool.GiveIconSurface("airwire")
airwire._MyType = ICON_TYPES["STAT"] airwire._MyType = ICON_TYPES["STAT"]
airwire._Parent = self airwire._Parent = self
airwire.Adjust(0,0,5,43,0) airwire.Adjust(0,0,5,43,0)
self._Icons["airwire"] = airwire self._Icons["airwire"] = airwire
GS = IconItem() GS = IconItem()
GS._ImgSurf = MyIconPool._Icons["GS"] GS._ImgSurf = MyIconPool.GiveIconSurface("GS")
GS._MyType = ICON_TYPES["STAT"] GS._MyType = ICON_TYPES["STAT"]
GS._Parent = self GS._Parent = self
GS.Adjust(0,0,72,95,0) GS.Adjust(0,0,72,95,0)
self._Icons["GS"] = GS self._Icons["GS"] = GS
DialogBoxs = MultiIconItem() DialogBoxs = MultiIconItem()
DialogBoxs._ImgSurf = MyIconPool._Icons["DialogBoxs"] DialogBoxs._ImgSurf = MyIconPool.GiveIconSurface("DialogBoxs")
DialogBoxs._MyType = ICON_TYPES["STAT"] DialogBoxs._MyType = ICON_TYPES["STAT"]
DialogBoxs._Parent = self DialogBoxs._Parent = self
DialogBoxs._IconWidth = 134 DialogBoxs._IconWidth = 134
@ -90,7 +90,7 @@ class AirplanePage(Page):
""" """
bgpng = MultiIconItem() bgpng = MultiIconItem()
bgpng._ImgSurf = MyIconPool._Icons["about_bg"] bgpng._ImgSurf = MyIconPool.GiveIconSurface("about_bg")
bgpng._MyType = ICON_TYPES["STAT"] bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self bgpng._Parent = self
bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0) bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)

View File

@ -98,7 +98,7 @@ class NetItem(object):
self._Labels["mac_addr"] = name_label self._Labels["mac_addr"] = name_label
done_icon = NetItemIcon() done_icon = NetItemIcon()
done_icon._ImgSurf = MyIconPool._Icons["done"] done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
done_icon._CanvasHWND = self._Parent._CanvasHWND done_icon._CanvasHWND = self._Parent._CanvasHWND
done_icon._Parent = self done_icon._Parent = self

View File

@ -39,7 +39,7 @@ class BSlider(Slider):
self._Height = self._Parent._Height self._Height = self._Parent._Height
bgpng = IconItem() bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["light"] bgpng._ImgSurf = MyIconPool.GiveIconSurface("light")
bgpng._MyType = ICON_TYPES["STAT"] bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self bgpng._Parent = self
bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0) bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@ -49,7 +49,7 @@ class BSlider(Slider):
scale = MultiIconItem() scale = MultiIconItem()
scale._MyType = ICON_TYPES["STAT"] scale._MyType = ICON_TYPES["STAT"]
scale._Parent = self scale._Parent = self
scale._ImgSurf = MyIconPool._Icons["scale"] scale._ImgSurf = MyIconPool.GiveIconSurface("scale")
scale._IconWidth = 82 scale._IconWidth = 82
scale._IconHeight = 63 scale._IconHeight = 63
scale.Adjust(0,0,82,63,0) scale.Adjust(0,0,82,63,0)

View File

@ -153,7 +153,7 @@ class ButtonsLayoutPage(Page):
self._Height = self._Screen._Height self._Height = self._Screen._Height
DialogBoxs = MultiIconItem() DialogBoxs = MultiIconItem()
DialogBoxs._ImgSurf = MyIconPool._Icons["buttonslayout"] DialogBoxs._ImgSurf = MyIconPool.GiveIconSurface("buttonslayout")
DialogBoxs._MyType = ICON_TYPES["STAT"] DialogBoxs._MyType = ICON_TYPES["STAT"]
DialogBoxs._Parent = self DialogBoxs._Parent = self
DialogBoxs._IconWidth = 300 DialogBoxs._IconWidth = 300

View File

@ -133,7 +133,7 @@ class GateWayPage(Page):
self._Height = self._Screen._Height self._Height = self._Screen._Height
done = IconItem() done = IconItem()
done._ImgSurf = MyIconPool._Icons["done"] done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"] done._MyType = ICON_TYPES["STAT"]
done._Parent = self done._Parent = self
self._Icons["done"] = done self._Icons["done"] = done

View File

@ -133,7 +133,7 @@ class LanguagesPage(Page):
self._Height = self._Screen._Height self._Height = self._Screen._Height
done = IconItem() done = IconItem()
done._ImgSurf = MyIconPool._Icons["done"] done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"] done._MyType = ICON_TYPES["STAT"]
done._Parent = self done._Parent = self
self._Icons["done"] = done self._Icons["done"] = done

View File

@ -132,7 +132,7 @@ class GPUDriverPage(Page):
self._Height = self._Screen._Height self._Height = self._Screen._Height
done = IconItem() done = IconItem()
done._ImgSurf = MyIconPool._Icons["done"] done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"] done._MyType = ICON_TYPES["STAT"]
done._Parent = self done._Parent = self
self._Icons["done"] = done self._Icons["done"] = done

View File

@ -44,7 +44,7 @@ class NotifyJobListItem(InfoPageListItem):
self._Labels["Text"] = l self._Labels["Text"] = l
done_icon = IconItem() done_icon = IconItem()
done_icon._ImgSurf = MyIconPool._Icons["done"] done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
done_icon._CanvasHWND = self._Parent._CanvasHWND done_icon._CanvasHWND = self._Parent._CanvasHWND
done_icon._Parent = self done_icon._Parent = self

View File

@ -378,7 +378,7 @@ class PowerOptionsPage(Page):
self._Height = self._Screen._Height self._Height = self._Screen._Height
done = IconItem() done = IconItem()
done._ImgSurf = MyIconPool._Icons["done"] done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"] done._MyType = ICON_TYPES["STAT"]
done._Parent = self done._Parent = self
self._Icons["done"] = done self._Icons["done"] = done

View File

@ -136,7 +136,7 @@ class SkinsPage(Page):
self._Height = self._Screen._Height self._Height = self._Screen._Height
done = IconItem() done = IconItem()
done._ImgSurf = MyIconPool._Icons["done"] done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"] done._MyType = ICON_TYPES["STAT"]
done._Parent = self done._Parent = self
self._Icons["done"] = done self._Icons["done"] = done

View File

@ -43,7 +43,7 @@ class SoundSlider(Slider):
self._Height = self._Parent._Height self._Height = self._Parent._Height
self._BGpng = IconItem() self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["vol"] self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("vol")
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0) self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@ -53,7 +53,7 @@ class SoundSlider(Slider):
self._Scale = MultiIconItem() self._Scale = MultiIconItem()
self._Scale._MyType = ICON_TYPES["STAT"] self._Scale._MyType = ICON_TYPES["STAT"]
self._Scale._Parent = self self._Scale._Parent = self
self._Scale._ImgSurf = MyIconPool._Icons["scale"] self._Scale._ImgSurf = MyIconPool.GiveIconSurface("scale")
self._Scale._IconWidth = 82 self._Scale._IconWidth = 82
self._Scale._IconHeight = 63 self._Scale._IconHeight = 63
self._Scale.Adjust(0,0,82,63,0) self._Scale.Adjust(0,0,82,63,0)

View File

@ -54,7 +54,7 @@ class StoragePage(Page):
self._Height = self._Screen._Height self._Height = self._Screen._Height
self._BGpng = IconItem() self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["icon_sd"] self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("icon_sd")
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self

View File

@ -176,7 +176,7 @@ class TimezoneListPage(Page):
self.SyncList("/usr/share/zoneinfo/posix") self.SyncList("/usr/share/zoneinfo/posix")
icon_for_list = MultiIconItem() icon_for_list = MultiIconItem()
icon_for_list._ImgSurf = MyIconPool._Icons["sys"] icon_for_list._ImgSurf = MyIconPool.GiveIconSurface("sys")
icon_for_list._MyType = ICON_TYPES["STAT"] icon_for_list._MyType = ICON_TYPES["STAT"]
icon_for_list._Parent = self icon_for_list._Parent = self
@ -185,7 +185,7 @@ class TimezoneListPage(Page):
self._BGpng = IconItem() self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["empty"] self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("empty")
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
self._BGpng.AddLabel("No timezones found on system!", MyLangManager.TrFont("varela22")) self._BGpng.AddLabel("No timezones found on system!", MyLangManager.TrFont("varela22"))

View File

@ -137,13 +137,13 @@ class NetItem(Widget):
lock_icon = NetItemIcon() lock_icon = NetItemIcon()
lock_icon._ImgSurf = MyIconPool._Icons["lock"] lock_icon._ImgSurf = MyIconPool.GiveIconSurface("lock")
lock_icon._CanvasHWND = self._Parent._CanvasHWND lock_icon._CanvasHWND = self._Parent._CanvasHWND
lock_icon._Parent = self lock_icon._Parent = self
self._Icons["lock"] = lock_icon self._Icons["lock"] = lock_icon
done_icon = NetItemIcon() done_icon = NetItemIcon()
done_icon._ImgSurf = MyIconPool._Icons["done"] done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
done_icon._CanvasHWND = self._Parent._CanvasHWND done_icon._CanvasHWND = self._Parent._CanvasHWND
done_icon._Parent = self done_icon._Parent = self

View File

@ -136,26 +136,26 @@ class MPDSpectrumPage(Page):
""" """
self._BGpng = IconItem() self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["sheep_bg"] self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("sheep_bg")
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0) self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._SheepHead = IconItem() self._SheepHead = IconItem()
self._SheepHead._ImgSurf = MyIconPool._Icons["sheep_head"] self._SheepHead._ImgSurf = MyIconPool.GiveIconSurface("sheep_head")
self._SheepHead._MyType = ICON_TYPES["STAT"] self._SheepHead._MyType = ICON_TYPES["STAT"]
self._SheepHead._Parent = self self._SheepHead._Parent = self
self._SheepHead.Adjust(0,0,self._SheepHeadW,self._SheepHeadH,0) self._SheepHead.Adjust(0,0,self._SheepHeadW,self._SheepHeadH,0)
self._SheepBody = IconItem() self._SheepBody = IconItem()
self._SheepBody._ImgSurf = MyIconPool._Icons["sheep_body"] self._SheepBody._ImgSurf = MyIconPool.GiveIconSurface("sheep_body")
self._SheepBody._MyType = ICON_TYPES["STAT"] self._SheepBody._MyType = ICON_TYPES["STAT"]
self._SheepBody._Parent = self self._SheepBody._Parent = self
self._SheepBody.Adjust(0,0,self._SheepBodyW,self._SheepBodyH,0) self._SheepBody.Adjust(0,0,self._SheepBodyW,self._SheepBodyH,0)
""" """
self._cwp_png = IconItem() self._cwp_png = IconItem()
self._cwp_png._ImgSurf = MyIconPool._Icons["tape"] self._cwp_png._ImgSurf = MyIconPool.GiveIconSurface("tape")
self._cwp_png._MyType = ICON_TYPES["STAT"] self._cwp_png._MyType = ICON_TYPES["STAT"]
self._cwp_png._Parent = self self._cwp_png._Parent = self
self._cwp_png.Adjust(0,0,79,79,0) self._cwp_png.Adjust(0,0,79,79,0)

View File

@ -172,7 +172,7 @@ class MusicLibListPage(Page):
self.SyncList("/") self.SyncList("/")
icon_for_list = MultiIconItem() icon_for_list = MultiIconItem()
icon_for_list._ImgSurf = MyIconPool._Icons["sys"] icon_for_list._ImgSurf = MyIconPool.GiveIconSurface("sys")
icon_for_list._MyType = ICON_TYPES["STAT"] icon_for_list._MyType = ICON_TYPES["STAT"]
icon_for_list._Parent = self icon_for_list._Parent = self
@ -181,7 +181,7 @@ class MusicLibListPage(Page):
self._BGpng = IconItem() self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["empty"] self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("empty")
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
self._BGpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela22")) self._BGpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela22"))

View File

@ -180,7 +180,7 @@ class PlayListPage(Page):
gobject.timeout_add(850,self.GObjectInterval) gobject.timeout_add(850,self.GObjectInterval)
self._BGpng = IconItem() self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["heart"] self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("heart")
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
self._BGpng.AddLabel(MyLangManager.Tr("my favorite music"), MyLangManager.TrFont("varela18")) self._BGpng.AddLabel(MyLangManager.Tr("my favorite music"), MyLangManager.TrFont("varela18"))

View File

@ -155,7 +155,7 @@ class TinyCloudPage(Page):
self._PngSize["online"] = (75,122) self._PngSize["online"] = (75,122)
bgpng = IconItem() bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["needwifi_bg"] bgpng._ImgSurf = MyIconPool.GiveIconSurface("needwifi_bg")
bgpng._MyType = ICON_TYPES["STAT"] bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self bgpng._Parent = self
bgpng.Adjust(0,0,self._PngSize["bg"][0],self._PngSize["bg"][1],0) bgpng.Adjust(0,0,self._PngSize["bg"][0],self._PngSize["bg"][1],0)
@ -163,7 +163,7 @@ class TinyCloudPage(Page):
self._Icons["bg"] = bgpng self._Icons["bg"] = bgpng
onlinepng = IconItem() onlinepng = IconItem()
onlinepng._ImgSurf = MyIconPool._Icons["online"] onlinepng._ImgSurf = MyIconPool.GiveIconSurface("online")
onlinepng._MyType = ICON_TYPES["STAT"] onlinepng._MyType = ICON_TYPES["STAT"]
onlinepng._Parent = self onlinepng._Parent = self
onlinepng.Adjust(0,0,self._PngSize["online"][0], self._PngSize["online"][1],0) onlinepng.Adjust(0,0,self._PngSize["online"][0], self._PngSize["online"][1],0)

View File

@ -49,7 +49,7 @@ class NotFoundPage(Page):
self._CanvasHWND = self._Screen._CanvasHWND self._CanvasHWND = self._Screen._CanvasHWND
self._BGpng = IconItem() self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons[self._BG] self._BGpng._ImgSurf = MyIconPool.GiveIconSurface(self._BG)
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
#print( MyIconPool.Width(self._BG),MyIconPool.Height(self._BG) ) #print( MyIconPool.Width(self._BG),MyIconPool.Height(self._BG) )
@ -143,7 +143,7 @@ class HashErrPage(Page):
self._CanvasHWND = self._Screen._CanvasHWND self._CanvasHWND = self._Screen._CanvasHWND
self._BGpng = IconItem() self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons[self._BG] self._BGpng._ImgSurf = MyIconPool.GiveIconSurface(self._BG)
self._BGpng._MyType = ICON_TYPES["STAT"] self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self self._BGpng._Parent = self
self._BGpng.Adjust(0,0,MyIconPool.Width(self._BG),MyIconPool.Height(self._BG),0) self._BGpng.Adjust(0,0,MyIconPool.Width(self._BG),MyIconPool.Height(self._BG),0)

View File

@ -70,7 +70,7 @@ class MyEmulator(object):
keyname = i.split(".")[0] keyname = i.split(".")[0]
self._Icons[keyname] = pygame.image.load(basepath+"/"+i).convert_alpha() self._Icons[keyname] = pygame.image.load(basepath+"/"+i).convert_alpha()
""" """
self._Icons["sys"] = MyIconPool._Icons["sys"] self._Icons["sys"] = MyIconPool.GiveIconSurface("sys")
def InitDeleteConfirmPage(self,main_screen): def InitDeleteConfirmPage(self,main_screen):

View File

@ -234,7 +234,7 @@ class FavListPage(Page):
bgpng = IconItem() bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["star"] bgpng._ImgSurf = MyIconPool.GiveIconSurface("star")
bgpng._MyType = ICON_TYPES["STAT"] bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self bgpng._Parent = self
bgpng.AddLabel(MyLangManager.Tr("MyFavGames"), MyLangManager.TrFont("varela18")) bgpng.AddLabel(MyLangManager.Tr("MyFavGames"), MyLangManager.TrFont("varela18"))

View File

@ -269,7 +269,7 @@ class RomListPage(Page):
bgpng = IconItem() bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["empty"] bgpng._ImgSurf = MyIconPool.GiveIconSurface("empty")
bgpng._MyType = ICON_TYPES["STAT"] bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self bgpng._Parent = self
bgpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela22")) bgpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela22"))

View File

@ -58,14 +58,14 @@ class DownloadProcessPage(Page):
self._PngSize["needwifi_bg"] = (253,132) self._PngSize["needwifi_bg"] = (253,132)
bgpng = IconItem() bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["rom_download"] bgpng._ImgSurf = MyIconPool.GiveIconSurface("rom_download")
bgpng._MyType = ICON_TYPES["STAT"] bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self bgpng._Parent = self
bgpng.Adjust(0,0,self._PngSize["bg"][0],self._PngSize["bg"][1],0) bgpng.Adjust(0,0,self._PngSize["bg"][0],self._PngSize["bg"][1],0)
self._Icons["bg"] = bgpng self._Icons["bg"] = bgpng
needwifi_bg = IconItem() needwifi_bg = IconItem()
needwifi_bg._ImgSurf = MyIconPool._Icons["needwifi_bg"] needwifi_bg._ImgSurf = MyIconPool.GiveIconSurface("needwifi_bg")
needwifi_bg._MyType = ICON_TYPES["STAT"] needwifi_bg._MyType = ICON_TYPES["STAT"]
needwifi_bg._Parent = self needwifi_bg._Parent = self
needwifi_bg.Adjust(0,0,self._PngSize["needwifi_bg"][0],self._PngSize["needwifi_bg"][1],0) needwifi_bg.Adjust(0,0,self._PngSize["needwifi_bg"][0],self._PngSize["needwifi_bg"][1],0)

View File

@ -94,7 +94,7 @@ class FootBar(Widget):
round_corners._MyType = ICON_TYPES["STAT"] round_corners._MyType = ICON_TYPES["STAT"]
round_corners._Parent = self round_corners._Parent = self
round_corners._ImgSurf = MyIconPool._Icons["roundcorners"] round_corners._ImgSurf = MyIconPool.GiveIconSurface("roundcorners")
round_corners.Adjust(0,0,10,10,0) round_corners.Adjust(0,0,10,10,0)
self._Icons["round_corners"] = round_corners self._Icons["round_corners"] = round_corners

View File

@ -128,7 +128,7 @@ class Keyboard(Page):
if val == "_L" or val == "_R": if val == "_L" or val == "_R":
it = KeyboardIcon() it = KeyboardIcon()
it._ImgSurf = MyIconPool._Icons[val] it._ImgSurf = MyIconPool.GiveIconSurface(val)
it._Parent = self it._Parent = self
it._Str = val it._Str = val
it.Init(start_x+it._ImgSurf.get_width()/2 ,start_y,it._ImgSurf.get_width(),it._ImgSurf.get_height(),0) it.Init(start_x+it._ImgSurf.get_width()/2 ,start_y,it._ImgSurf.get_width(),it._ImgSurf.get_height(),0)

View File

@ -147,7 +147,7 @@ class Page(Widget):
cnt+=1 cnt+=1
ps = PageSelector() ps = PageSelector()
ps._IconSurf = MyIconPool._Icons["blueselector"] ps._IconSurf = MyIconPool.GiveIconSurface("blueselector")
ps._Parent = self ps._Parent = self
ps.Init(icon_width/2, TitleBar._BarHeight+icon_height/2,92,92,128) ps.Init(icon_width/2, TitleBar._BarHeight+icon_height/2,92,92,128)
self._Ps = ps self._Ps = ps
@ -171,7 +171,7 @@ class Page(Widget):
it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height))
ps = PageSelector() ps = PageSelector()
ps._IconSurf = MyIconPool._Icons["blueselector"] ps._IconSurf = MyIconPool.GiveIconSurface("blueselector")
ps._Parent = self ps._Parent = self
ps.Init(start_x,start_y,92,92,128) ps.Init(start_x,start_y,92,92,128)
@ -223,7 +223,7 @@ class Page(Widget):
# it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height)) # it._ImgSurf = pygame.transform.smoothscale(it._ImgSurf,(it._Width,it._Height))
ps = PageSelector() ps = PageSelector()
ps._IconSurf = MyIconPool._Icons["blueselector"] ps._IconSurf = MyIconPool.GiveIconSurface("blueselector")
ps._Parent = self ps._Parent = self
ps.Init(start_x,start_y,92,92,128) ps.Init(start_x,start_y,92,92,128)
@ -261,7 +261,7 @@ class Page(Widget):
cnt+=1 cnt+=1
ps = PageSelector() ps = PageSelector()
ps._IconSurf = MyIconPool._Icons["blueselector"] ps._IconSurf = MyIconPool.GiveIconSurface("blueselector")
ps._Parent = self ps._Parent = self
ps.Init(icon_width/2,icon_height/2,92,92,128) ps.Init(icon_width/2,icon_height/2,92,92,128)
self._Ps = ps self._Ps = ps
@ -284,7 +284,7 @@ class Page(Widget):
it.Adjust(start_x+i*icon_width,start_y,icon_width,icon_height,0) it.Adjust(start_x+i*icon_width,start_y,icon_width,icon_height,0)
ps = PageSelector() ps = PageSelector()
ps._IconSurf = MyIconPool._Icons["blueselector"] ps._IconSurf = MyIconPool.GiveIconSurface("blueselector")
ps._Parent = self ps._Parent = self
ps.Init(start_x,start_y,92,92,128) ps.Init(start_x,start_y,92,92,128)
self._Ps = ps self._Ps = ps
@ -303,7 +303,7 @@ class Page(Widget):
ps = PageSelector() ps = PageSelector()
ps._IconSurf = MyIconPool._Icons["blueselector"] ps._IconSurf = MyIconPool.GiveIconSurface("blueselector")
ps._Parent = self ps._Parent = self
ps.Init(start_x,start_y-self._SelectedIconTopOffset,92,92,128) ps.Init(start_x,start_y-self._SelectedIconTopOffset,92,92,128)
@ -339,7 +339,7 @@ class Page(Widget):
if self._IconNumbers > 0: if self._IconNumbers > 0:
ps = PageSelector() ps = PageSelector()
ps._IconSurf = MyIconPool._Icons["blueselector"] ps._IconSurf = MyIconPool.GiveIconSurface("blueselector")
ps._Parent = self ps._Parent = self
ps.Init(start_x,start_y,icon_width+4,icon_height+4,128) ps.Init(start_x,start_y,icon_width+4,icon_height+4,128)
self._Ps = ps self._Ps = ps

View File

@ -259,7 +259,7 @@ class TitleBar(Widget):
round_corners._MyType = ICON_TYPES["STAT"] round_corners._MyType = ICON_TYPES["STAT"]
round_corners._Parent = self round_corners._Parent = self
round_corners._ImgSurf = MyIconPool._Icons["roundcorners"] round_corners._ImgSurf = MyIconPool.GiveIconSurface("roundcorners")
round_corners.Adjust(0,0,10,10,0) round_corners.Adjust(0,0,10,10,0)
self._Icons["round_corners"] = round_corners self._Icons["round_corners"] = round_corners