Exemple #1
0
 def SetFactionIcon(self, factionID):
     iconID = LogoIcon.GetFactionIconID(factionID, isSmall=True)
     if iconID is not None:
         resPath = Icon.ConvertIconNoToResPath(iconID)
         if resPath is not None:
             self.CreateIconSpite()
             self.ownerIcon.SetTexturePath(resPath[0])
             self.iconCont.state = uiconst.UI_NORMAL
             self.iconCont.OnClick = lambda : sm.GetService('info').ShowInfo(itemID=factionID, typeID=typeFaction)
Exemple #2
0
 def LoadIcon(self, iconNo, ignoreSize=False):
     texturePath, _ = Icon.ConvertIconNoToResPath(iconNo)
     self.SetTexturePath(texturePath)