Пример #1
0
 def Prepare_(self, text='', contactLevel=None, *args):
     self.isTabStop = 1
     self.state = uiconst.UI_NORMAL
     flag = None
     if contactLevel == const.contactHighStanding:
         flag = state.flagStandingHigh
     elif contactLevel == const.contactGoodStanding:
         flag = state.flagStandingGood
     elif contactLevel == const.contactNeutralStanding:
         flag = state.flagStandingNeutral
     elif contactLevel == const.contactBadStanding:
         flag = state.flagStandingBad
     elif contactLevel == const.contactHorribleStanding:
         flag = state.flagStandingHorrible
     if flag:
         flagContainer = AddAndSetFlagIcon(self,
                                           flag=flag,
                                           state=uiconst.UI_DISABLED,
                                           showHint=False)
         flagContainer.ChangeFlagPos(0, 0, 20, 20)
         flagContainer.ChangeIconPos(0, 0, 15, 15)
         uicontrols.Frame(parent=flagContainer, color=(1.0, 1.0, 1.0, 0.2))
         self.sr.selected = uicontrols.Frame(parent=flagContainer,
                                             color=(1.0, 1.0, 1.0, 0.75),
                                             state=uiconst.UI_DISABLED,
                                             idx=0)
         self.sr.selected.display = False
         self.sr.hilite = uicontrols.Frame(parent=flagContainer,
                                           color=(1.0, 1.0, 1.0, 0.75),
                                           state=uiconst.UI_DISABLED,
                                           idx=0)
         self.sr.hilite.display = False
         self.hint = text
Пример #2
0
 def LoadTagIconInContainer(self, tag, cont, left = 2, top = 4, *args):
     uiutil.Flush(cont)
     if tag == const.calendarTagCorp:
         AddAndSetFlagIcon(parentCont=cont, flag=state.flagSameCorp, top=top, left=left)
     elif tag == const.calendarTagAlliance:
         AddAndSetFlagIcon(parentCont=cont, flag=state.flagSameAlliance, top=top, left=left)
     elif tag == const.calendarTagCCP:
         self.LoadCCPIcon(cont, top, left)
     elif tag == const.calendarTagAutomated:
         self.LoadAutomatedIcon(cont, top, left)
Пример #3
0
 def SetRelationship(self, data, debugFlag=None):
     if self.destroyed:
         return
     if self.slimuser:
         return
     if not data:
         return
     flag = None
     if data.Get('contactType', None):
         if self.contactLevel is None:
             return
         if self.contactLevel > const.contactGoodStanding:
             flag = state.flagStandingHigh
         elif self.contactLevel <= const.contactGoodStanding and self.contactLevel > const.contactNeutralStanding:
             flag = state.flagStandingGood
         elif self.contactLevel == const.contactNeutralStanding:
             flag = state.flagStandingNeutral
         elif self.contactLevel >= const.contactBadStanding and self.contactLevel < const.contactNeutralStanding:
             flag = state.flagStandingBad
         elif self.contactLevel <= const.contactBadStanding:
             flag = state.flagStandingHorrible
     else:
         flag = GetStateFlagFromData(data)
     if flag:
         AddAndSetFlagIcon(self, flag=flag, top=20, left=4)
Пример #4
0
 def SetStandingIcon(self):
     stateMgr = sm.GetService('state')
     flag = stateMgr.CheckStates(self.slimForFlag, 'flag')
     self.standingIcon = AddAndSetFlagIcon(parentCont=self,
                                           flag=flag,
                                           top=51,
                                           left=36,
                                           showHint=False)
Пример #5
0
 def SetStandingIcon(self):
     stateMgr = sm.GetService('state')
     flag = stateMgr.CheckStates(self.slimForFlag, 'flag')
     self.standingIcon = AddAndSetFlagIcon(parentCont=self.sr.iconPar,
                                           flag=flag,
                                           align=uiconst.CENTERBOTTOM,
                                           top=8,
                                           left=0,
                                           showHint=False)
Пример #6
0
 def SetRelationship(self, data, debugFlag=None):
     if self.destroyed:
         return
     if self.slimuser:
         return
     if not data:
         return
     flag = None
     if data.Get('contactType', None):
         if self.contactLevel is None:
             return
         flag = GetFlagFromRelationShip(self.contactLevel)
     else:
         flag = GetStateFlagFromData(data)
     AddAndSetFlagIcon(self, flag=flag, top=20, left=4)
Пример #7
0
 def Load(self, node):
     self.sr.node = node
     self.sr.label.left = 16
     self.sr.label.text = node.label
     self.locationID = ''
     self.locationID = node.locationID
     self.allianceID = node.allianceID
     self.corpID = node.Get('corpID', None)
     self.scope = node.scope
     self.regionID = node.regionID
     AddAndSetFlagIcon(parentCont=self.icon, flag=node.flag, top=3, left=4)
     if node.loss is True:
         self.sr.loss.state = uiconst.UI_DISABLED
     else:
         self.sr.loss.state = uiconst.UI_HIDDEN