コード例 #1
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
     self.btnID = attributes.Get('btnID', None)
     self.panel = attributes.Get('panel', None)
     self.colorSelected = attributes.Get('colorSelected',
                                         self.default_colorSelected)
     label = attributes.Get('label', None)
     iconPath = attributes.Get('iconPath', None)
     iconSize = attributes.Get('iconSize', None)
     iconSize = iconSize or self.default_iconSize
     self.hint = attributes.Get('hint', None)
     self.isSelected = False
     self.isDisabled = attributes.Get('isDisabled', False)
     if iconPath:
         self.icon = GlowSprite(parent=self,
                                align=uiconst.CENTER,
                                state=uiconst.UI_DISABLED,
                                width=iconSize,
                                height=iconSize,
                                texturePath=iconPath,
                                iconOpacity=0.75,
                                color=Color.WHITE)
         self.label = None
     else:
         self.label = LabelUnderlay(text=label,
                                    parent=self,
                                    align=uiconst.CENTER,
                                    fontsize=10)
         self.icon = None
     self.selectedBG = RaisedUnderlay(bgParent=self,
                                      color=self.colorSelected,
                                      isGlowEdgeRotated=True)
     if self.isDisabled:
         self.SetDisabled()
コード例 #2
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.btnData = attributes.btnData
     self.btnNum = attributes.btnNum
     self.width = attributes.width
     self._isDraggable = attributes.get('isDraggable', self.default_isDraggable)
     self._openNeocomPanel = None
     self.height = self.width
     self.top = self.height * self.btnNum
     self.panel = None
     self.blinkThread = None
     self.realTop = self.top
     self.dragEventCookie = None
     self.disableClick = False
     self.iconSize = self.height - 2 * self.PADVERTICAL
     self.iconTransform = uiprimitives.Transform(name='iconTransform', parent=self, align=uiconst.TOALL, scalingCenter=(0.5, 0.5))
     self.iconLabelCont = None
     if self.btnData.id == 'map_beta':
         Sprite(parent=self.iconTransform, align=uiconst.TOPLEFT, pos=(0, 0, 11, 29), texturePath='res:/UI/Texture/Shared/betaTag.png', state=uiconst.UI_DISABLED)
     self.icon = GlowSprite(parent=self.iconTransform, name='icon', state=uiconst.UI_DISABLED, align=uiconst.CENTER, width=self.iconSize, height=self.iconSize, iconOpacity=1.0)
     self.UpdateIcon()
     PAD = 1
     self.blinkSprite = SpriteUnderlay(bgParent=self, name='blinkSprite', texturePath='res:/UI/Texture/classes/Neocom/buttonBlink.png', state=uiconst.UI_HIDDEN, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW)
     self.activeFrame = FrameUnderlay(bgParent=self, name='hoverFill', texturePath='res:/UI/Texture/classes/Neocom/buttonActive.png', cornerSize=5, state=uiconst.UI_HIDDEN, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW)
     self.CheckIfActive()
     self.dropFrame = uicontrols.Frame(parent=self, name='hoverFrame', color=util.Color.GetGrayRGBA(1.0, 0.5), state=uiconst.UI_HIDDEN)
     sm.RegisterNotify(self)
コード例 #3
0
 def ApplyAttributes(self, attributes):
     LayoutGrid.ApplyAttributes(self, attributes)
     EveLabelSmall(text=GetByLabel('Achievements/UI/active'), parent=self, align=uiconst.CENTERRIGHT)
     activeEffectSprite = SpriteThemeColored(parent=self, state=uiconst.UI_DISABLED, blendMode=trinity.TR2_SBM_ADDX2, texturePath='res:/UI/Texture/classes/Achievements/iconActiveLegend.png', pos=(0, 0, 20, 20))
     iconMap = [(GetByLabel('Achievements/UI/incomplete'), 'res:/UI/Texture/classes/Achievements/iconIncomplete.png'), (GetByLabel('Achievements/UI/partial'), 'res:/UI/Texture/classes/Achievements/iconPartial.png'), (GetByLabel('Achievements/UI/complete'), 'res:/UI/Texture/classes/Achievements/iconComplete.png')]
     for label, texturePath in iconMap:
         EveLabelSmall(text=label, parent=self, align=uiconst.CENTERRIGHT)
         GlowSprite(texturePath=texturePath, parent=self, pos=(0, 0, 20, 20))
コード例 #4
0
ファイル: menu.py プロジェクト: nanxijw/Clara-Pretty-One-Dick
 def Prepare_Triangle_(self, *args):
     self.triangle = GlowSprite(
         parent=self,
         align=uiconst.CENTERRIGHT,
         state=uiconst.UI_HIDDEN,
         idx=0,
         texturePath='res:/UI/Texture/Icons/1_16_14.png',
         pos=(0, 0, 16, 16))
コード例 #5
0
 def Prepare_(self, icon=None):
     opacity = 0.2 if self.disabled else 1.0
     self.icon = GlowSprite(parent=self,
                            align=uiconst.TOALL,
                            texturePath=icon,
                            state=uiconst.UI_DISABLED,
                            opacity=opacity,
                            iconOpacity=1.0)
     self.sr.fill = uiprimitives.Fill(parent=self, state=uiconst.UI_HIDDEN)
コード例 #6
0
ファイル: buttons.py プロジェクト: connoryang/1v1dec
 def AddIcon(self, parent, iconOpacity, iconPath, iconSize):
     self.icon = GlowSprite(parent=parent,
                            align=uiconst.CENTER,
                            state=uiconst.UI_DISABLED,
                            width=iconSize,
                            height=iconSize,
                            texturePath=iconPath,
                            iconOpacity=iconOpacity,
                            color=Color.GRAY6)
コード例 #7
0
 def ConstructIcon(self):
     return GlowSprite(name='icon',
                       parent=self,
                       align=uiconst.CENTERTOP,
                       width=self.iconSize,
                       height=self.iconSize,
                       texturePath=self.texturePath,
                       state=uiconst.UI_DISABLED,
                       color=self.iconColor,
                       rotation=self.rotation)
コード例 #8
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.achievementGroupID = attributes.achievementGroupID
     self.hexGridPosition = attributes.hexGridPosition
     self.nameLabel = InfoPanelLabel(parent=self.parent, state=uiconst.UI_DISABLED, align=uiconst.TOPLEFT, idx=0)
     self.stateSprite = GlowSprite(parent=self, pos=(0, 0, 20, 20), align=uiconst.CENTER, state=uiconst.UI_DISABLED)
     self.activeEffectSprite = SpriteThemeColored(parent=self, state=uiconst.UI_DISABLED, spriteEffect=trinity.TR2_SFX_MODULATE, blendMode=trinity.TR2_SBM_ADDX2, texturePath='res:/UI/Texture/classes/Achievements/hexPingGlow.png', textureSecondaryPath='res:/UI/Texture/classes/Achievements/hexPingMask.png', pos=(0, 0, 300, 300), align=uiconst.CENTER, opacity=0.0)
     self.activeStateSprite = SpriteThemeColored(parent=self, state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/classes/Achievements/hexActive.png', pos=(0, 0, 200, 200), align=uiconst.CENTER, opacity=0.0, blendMode=trinity.TR2_SBM_ADDX2, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW)
     self.backgroundSprite = SpriteThemeColored(bgParent=self, texturePath='res:/UI/Texture/classes/Achievements/hexBackIncomplete.png', colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, opacity=0.5)
     self.UpdateGroupState()
コード例 #9
0
 def Prepare_Expander_(self):
     self.sr.expanderParent = Container(parent=self.sr.content,
                                        align=uiconst.TORIGHT,
                                        pos=(0, 0, 16, 0),
                                        idx=0,
                                        state=uiconst.UI_DISABLED,
                                        name='__expanderParent')
     self.sr.expander = GlowSprite(
         parent=self.sr.expanderParent,
         align=uiconst.CENTER,
         texturePath='res:/UI/Texture/Icons/1_16_129.png',
         pos=(1, -1, 16, 16))
コード例 #10
0
ファイル: buttons.py プロジェクト: connoryang/1v1dec
 def ConstructIcon(self):
     self.icon = GlowSprite(name='icon',
                            parent=self,
                            align=uiconst.CENTER,
                            width=self.iconSize,
                            height=self.iconSize,
                            texturePath=self.texturePath,
                            state=uiconst.UI_DISABLED,
                            color=self.iconColor,
                            iconOpacity=0.5,
                            gradientStrength=0.5,
                            rotation=self.rotation)
コード例 #11
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self.btnData = attributes.btnData
     if hasattr(self.btnData, 'panelEntryHeight'):
         self.height = self.btnData.panelEntryHeight
     self.blinkThread = None
     self._openNeocomPanel = None
     self.main = uiprimitives.Container(parent=self, name='main')
     self.hoverBG = uicontrols.Frame(
         bgParent=self.main,
         texturePath='res:/UI/Texture/classes/Neocom/panelEntryBG.png',
         opacity=0.0)
     if self.btnData.id == 'map_beta' and IsMapBetaEnabled():
         Sprite(parent=self.main,
                align=uiconst.TOPLEFT,
                pos=(10, 2, 11, 29),
                texturePath='res:/UI/Texture/Shared/betaTag.png',
                state=uiconst.UI_DISABLED)
     size = self.height - 4
     self.icon = GlowSprite(parent=self.main,
                            name='icon',
                            state=uiconst.UI_DISABLED,
                            texturePath=self.GetIconPath(),
                            pos=(10, 2, size, size),
                            iconOpacity=0.75)
     self.label = uicontrols.Label(parent=self.main,
                                   align=uiconst.CENTERLEFT,
                                   state=uiconst.UI_DISABLED,
                                   text=self.GetLabel(),
                                   autowidth=True,
                                   autoheight=True,
                                   left=self.icon.left + self.icon.width +
                                   8)
     if settings.char.ui.Get('neocomAlign',
                             uiconst.TOLEFT) == uiconst.TOLEFT:
         rotation = 0.0
     else:
         rotation = math.pi
     self.expanderIcon = uicontrols.Icon(parent=self,
                                         name='expanderIcon',
                                         align=uiconst.CENTERRIGHT,
                                         left=10,
                                         icon='ui_38_16_228',
                                         rotation=rotation)
     self.SetExpanderState()
     self.blinkSprite = uiprimitives.Sprite(
         bgParent=self,
         name='blinkSprite',
         texturePath='res:/UI/Texture/classes/Neocom/panelEntryBG.png',
         state=uiconst.UI_HIDDEN,
         opacity=1.0)
コード例 #12
0
 def ApplyAttributes(self, attributes):
     TextButton.ApplyAttributes(self, attributes)
     size = attributes.iconSize
     self.icon = GlowSprite(texturePath=attributes.texturePath,
                            width=size,
                            height=size,
                            parent=self,
                            state=uiconst.UI_DISABLED,
                            iconOpacity=0.5,
                            gradientStrength=0.5)
     self.label.left += self.icon.width + 2
     self.width += self.icon.width + 2
     self.height = max(self.height, self.icon.height)
コード例 #13
0
 def Startup(self, *etc):
     self.sr.expander = GlowSprite(parent=self, pos=(3, 0, 16, 16), name='expander', state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/Shared/expanderDown.png', align=uiconst.CENTERLEFT)
     self.sr.expander.OnClick = self.Toggle
     self.sr.icon = uicontrols.Icon(parent=self, pos=(4, 0, 16, 16), name='icon', state=uiconst.UI_DISABLED, icon='ui_22_32_28', align=uiconst.CENTERLEFT, ignoreSize=True)
     self.sr.labelClipper = uiprimitives.Container(parent=self, name='labelClipper', align=uiconst.TOALL, pos=(0,
      0,
      const.defaultPadding,
      0), clipChildren=1)
     self.sr.labelClipper.OnClick = self.OnClick
     self.sr.labelClipper.GetMenu = self.GetMenu
     self.sr.label = uicontrols.EveLabelMedium(text='', parent=self.sr.labelClipper, left=5, state=uiconst.UI_DISABLED, maxLines=1, align=uiconst.CENTERLEFT)
     if self.sr.node.sublevel > 0:
         self.sr.fill = None
     else:
         self.sr.fill = FillThemeColored(parent=self, padding=(1, 0, 1, 1), colorType=uiconst.COLORTYPE_UIHEADER, opacity=0.15)
     mainLinePar = uiprimitives.Container(parent=self, name='mainLinePar', align=uiconst.TOALL, idx=0, pos=(0, 0, 0, 0), state=uiconst.UI_DISABLED)
コード例 #14
0
 def ApplyAttributes(self, attributes):
     WrapperButton.ApplyAttributes(self, attributes)
     self.btnData = attributes.btnData
     GlowSprite(parent=self,
                name='EVEMenuIcon',
                align=uiconst.CENTER,
                state=uiconst.UI_DISABLED,
                texturePath='res:/UI/Texture/Icons/79_64_11.png',
                width=20,
                height=20,
                idx=0)
     SpriteThemeColored(
         bgParent=self,
         align=uiconst.TOALL,
         texturePath='res:/UI/Texture/classes/Neocom/panelEntryBG.png',
         colorType=uiconst.COLORTYPE_UIHILIGHT)
コード例 #15
0
 def Prepare_(self):
     self.sr.label = LabelUnderlay(
         parent=self,
         align=uiconst.CENTER,
         state=uiconst.UI_DISABLED,
         colorType=uiconst.COLORTYPE_UIHILIGHTGLOW,
         opacity=1.0,
         fontsize=10)
     self.glowLabel = LabelUnderlay(name='glowLabel',
                                    parent=self,
                                    align=uiconst.CENTER,
                                    state=uiconst.UI_DISABLED,
                                    opacity=0.0,
                                    color=self.color,
                                    fontsize=10)
     self.glowLabel.renderObject.spriteEffect = trinity.TR2_SFX_BLUR
     if self.iconPath is not None:
         if self.iconSize:
             width = self.iconSize
             height = self.iconSize
         else:
             width = height = min(self.width, self.height)
         self.icon = GlowSprite(parent=self,
                                state=uiconst.UI_DISABLED,
                                align=uiconst.CENTER,
                                pos=(0, 0, width, height),
                                texturePath=self.iconPath,
                                color=self.color,
                                iconOpacity=0.75)
         self.sr.label.state = uiconst.UI_HIDDEN
         self.width = width + 4
         self.height = height + 4
     else:
         self.icon = None
     self.sr.hilite = Fill(bgParent=self,
                           color=(0.7, 0.7, 0.7, 0.5),
                           state=uiconst.UI_HIDDEN)
     self.sr.activeframe = FrameUnderlay(
         parent=self,
         name='activeline',
         state=uiconst.UI_HIDDEN,
         colorType=uiconst.COLORTYPE_UIHILIGHTGLOW,
         opacity=0.1)
     self.underlay = RaisedUnderlay(name='backgroundFrame',
                                    bgParent=self,
                                    state=uiconst.UI_DISABLED,
                                    color=self.color)
コード例 #16
0
 def ApplyAttributes(self, attributes):
     LayoutGrid.ApplyAttributes(self, attributes)
     iconMap = [
         (GetByLabel('Achievements/UI/active'),
          'res:/UI/Texture/classes/Achievements/iconActiveLegend.png'),
         (GetByLabel('Achievements/UI/incomplete'),
          'res:/UI/Texture/classes/Achievements/iconIncomplete.png'),
         (GetByLabel('Achievements/UI/partial'),
          'res:/UI/Texture/classes/Achievements/iconPartial.png'),
         (GetByLabel('Achievements/UI/complete'),
          'res:/UI/Texture/classes/Achievements/iconComplete.png')
     ]
     for label, texturePath in iconMap:
         EveLabelSmall(text=label, parent=self, align=uiconst.CENTERRIGHT)
         GlowSprite(texturePath=texturePath,
                    parent=self,
                    pos=(0, 0, 20, 20))
コード例 #17
0
 def Prepare_Layout(self):
     self.sr.headerParent = uiprimitives.Container(
         parent=self.sr.maincontainer,
         name='headerParent',
         align=uiconst.TOTOP,
         pos=(0, 0, 0, 22))
     self.sr.topParent = uiprimitives.Container(
         parent=self.sr.maincontainer,
         name='topParent',
         align=uiconst.TOTOP,
         clipChildren=True)
     self.sr.mainIcon = GlowSprite(parent=self.sr.topParent,
                                   name='mainicon',
                                   pos=(0, 0, 64, 64),
                                   state=uiconst.UI_HIDDEN)
     self.sr.main = uiprimitives.Container(parent=self.sr.maincontainer,
                                           name='main',
                                           align=uiconst.TOALL)
     self.SetTopparentHeight(self.topParentHeight)
コード例 #18
0
 def Startup(self, *etc):
     self.sr.expander = GlowSprite(parent=self, pos=(3, 0, 16, 16), name='expander', state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/Shared/expanderDown.png', align=uiconst.CENTERLEFT)
     self.sr.expander.OnClick = self.Toggle
     self.sr.icon = uicontrols.Icon(parent=self, pos=(4, 0, 16, 16), name='icon', state=uiconst.UI_DISABLED, icon='ui_22_32_28', align=uiconst.CENTERLEFT, ignoreSize=True)
     self.sr.labelClipper = uiprimitives.Container(parent=self, name='labelClipper', align=uiconst.TOALL, pos=(0,
      0,
      const.defaultPadding,
      0), clipChildren=1)
     self.sr.labelClipper.OnClick = self.OnClick
     self.sr.labelClipper.GetMenu = self.GetMenu
     self.sr.label = uicontrols.EveLabelMedium(text='', parent=self.sr.labelClipper, left=5, state=uiconst.UI_DISABLED, maxLines=1, align=uiconst.CENTERLEFT)
     if self.sr.node.sublevel > 0:
         self.sr.fill = None
     else:
         self.sr.fill = FillUnderlay(parent=self, padding=(1, 0, 1, 1), colorType=uiconst.COLORTYPE_UIHEADER, opacity=0.15)
     mainLinePar = uiprimitives.Container(parent=self, name='mainLinePar', align=uiconst.TOALL, idx=0, pos=(0, 0, 0, 0), state=uiconst.UI_DISABLED)
     bottomLineContainer = uiprimitives.Container(parent=mainLinePar, name='bottomLineContainer', align=uiconst.TOBOTTOM, height=16)
     self.sr.bottomLineLeft = uiprimitives.Container(parent=bottomLineContainer, align=uiconst.TOLEFT)
     uiprimitives.Line(parent=self.sr.bottomLineLeft, align=uiconst.TOBOTTOM, color=uiconst.ENTRY_LINE_COLOR)
     self.sr.bottomLineArrow = uicontrols.Icon(icon='ui_73_16_39', parent=bottomLineContainer, align=uiconst.TOLEFT, state=uiconst.UI_NORMAL, color=uiconst.ENTRY_LINE_COLOR, top=15)
     uiprimitives.Line(parent=uiprimitives.Container(parent=bottomLineContainer), align=uiconst.TOBOTTOM, color=uiconst.ENTRY_LINE_COLOR)
コード例 #19
0
ファイル: buttons.py プロジェクト: connoryang/1v1dec
 def Prepare_(self):
     self.sr.label = LabelThemeColored(
         parent=self,
         align=uiconst.CENTER,
         state=uiconst.UI_DISABLED,
         colorType=uiconst.COLORTYPE_UIHILIGHTGLOW,
         opacity=OPACITY_LABEL_IDLE,
         fontsize=10)
     if self.iconPath is not None:
         if self.iconSize:
             width = self.iconSize
             height = self.iconSize
         else:
             width = height = min(self.width, self.height)
         self.icon = GlowSprite(parent=self,
                                state=uiconst.UI_DISABLED,
                                align=uiconst.CENTER,
                                pos=(0, 0, width, height),
                                texturePath=self.iconPath,
                                color=self.color,
                                iconOpacity=0.75)
         self.sr.label.state = uiconst.UI_HIDDEN
         self.width = width + 4
         self.height = height + 4
     else:
         self.icon = None
     self.sr.hilite = Fill(bgParent=self,
                           color=(0.7, 0.7, 0.7, 0.5),
                           state=uiconst.UI_HIDDEN)
     self.sr.activeframe = FrameThemeColored(
         parent=self,
         name='activeline',
         state=uiconst.UI_HIDDEN,
         colorType=uiconst.COLORTYPE_UIHILIGHTGLOW,
         opacity=0.1)
     self.underlay = RaisedUnderlay(name='backgroundFrame',
                                    bgParent=self,
                                    state=uiconst.UI_DISABLED,
                                    color=self.color)
コード例 #20
0
ファイル: buttons.py プロジェクト: connoryang/1v1dec
 def Startup(self, width, height, iconMargin=0, iconOpacity=0.75):
     self.sr.icon = GlowSprite(parent=self,
                               pos=(0, 0, 0, 0),
                               padding=(iconMargin, iconMargin, iconMargin,
                                        iconMargin),
                               name='icon',
                               state=uiconst.UI_DISABLED,
                               align=uiconst.TOALL,
                               filter=True,
                               iconOpacity=iconOpacity)
     self.sr.hilite = Fill(bgParent=self,
                           color=(0.7, 0.7, 0.7, 0.0),
                           state=uiconst.UI_HIDDEN)
     self.setfocus = 0
     self.killfocus = 0
     self.width = width
     self.height = height
     self.sr.smallcaption = None
     self.sr.caption = None
     self.sr.activeHilite = Frame(bgParent=self,
                                  color=(1, 1, 1, 0.3),
                                  state=uiconst.UI_HIDDEN)
     self.AdjustSizeAndPosition(width, height)
     self.underlay = RaisedUnderlay(name='backgroundFrame', bgParent=self)
コード例 #21
0
    def Initialize(self, wnd, panelName=None, subPanelName=None):
        self.subPanelName = subPanelName
        while eve.session.mutating:
            blue.pyos.BeNice()

        wnd.ShowLoad()
        uix.Flush(wnd.sr.main)
        self.toparea = uiprimitives.Container(parent=wnd.sr.main,
                                              name='corptop',
                                              pos=(0, 0, 0, 54),
                                              align=uiconst.TOTOP,
                                              state=uiconst.UI_NORMAL)
        GlowSprite(
            parent=self.toparea,
            name='simplepic',
            pos=(4, 0, 64, 64),
            texturePath='res:/ui/Texture/WindowIcons/sanctionableactions.png')
        self.panelHome = None
        self.members = None
        self.recruitment = None
        self.wars = None
        self.standings = None
        self.votes = None
        self.sanctionable = None
        self.accounts = None
        self.auditing = None
        self.membertracking = None
        self.findmember = None
        self.titles = None
        self.autoKicks = None
        self.alliances = None
        tabpanels = []
        homeHint = localization.GetByLabel(
            'UI/Corporations/BaseCorporationUI/AboutThisCorp')
        warsHint = localization.GetByLabel(
            'UI/Corporations/BaseCorporationUI/CorpWarsHint')
        standingsHint = localization.GetByLabel(
            'UI/Corporations/BaseCorporationUI/CorpStandingsHint')
        votesHint = localization.GetByLabel(
            'UI/Corporations/BaseCorporationUI/CorpVotesHint')
        sanctionableActionsHint = localization.GetByLabel(
            'UI/Corporations/BaseCorporationUI/CorpSanctionableActionsHint')
        accountsHint = localization.GetByLabel(
            'UI/Corporations/BaseCorporationUI/CorpAccountsHint')
        alliancesHint = localization.GetByLabel(
            'UI/Corporations/BaseCorporationUI/AlliancesHint')
        self.panelHome = form.CorpUIHome(name='corp_home',
                                         parent=wnd.sr.main,
                                         state=uiconst.UI_PICKCHILDREN)
        tabpanels.append([
            localization.GetByLabel('UI/Corporations/BaseCorporationUI/Home'),
            self.panelHome, self, 'home', None, homeHint
        ])
        self.panels['home'] = [self.panelHome]
        self.recruitment = form.CorpRecruitment(name='recruitmentpar',
                                                pos=(0, 0, 0, 0))
        wnd.sr.main.children.append(self.recruitment)
        tabpanels.append([
            uiutil.FixedTabName(
                'UI/Corporations/BaseCorporationUI/Recruitment'),
            self.recruitment, self, 'recruitment', None, None
        ])
        self.panels['recruitment'] = [self.recruitment]
        membersTabEntries = []
        self.panels['members'] = []
        if not util.IsNPC(eve.session.corpid):
            self.membertracking = form.CorpMemberTracking(
                name='membertrackingpar', pos=(0, 0, 0, 0))
            wnd.sr.main.children.append(self.membertracking)
            membersTabEntries.append([
                localization.GetByLabel(
                    'UI/Corporations/BaseCorporationUI/MemberList'),
                self.membertracking, self.membertracking, 'main'
            ])
            self.panels['members'].append(self.membertracking)
            grantableRoles, grantableRolesAtHQ, grantableRolesAtBase, grantableRolesAtOther = self.corp.GetMyGrantableRoles(
            )
            hasGrantableRoles = grantableRoles | grantableRolesAtHQ | grantableRolesAtBase | grantableRolesAtOther
            if session.corprole & const.corpRolePersonnelManager | hasGrantableRoles:
                self.findmember = form.CorpFindMembersInRole(
                    name='findmember',
                    parent=wnd.sr.main,
                    left=const.defaultPadding,
                    width=const.defaultPadding)
                membersTabEntries.append([
                    localization.GetByLabel(
                        'UI/Corporations/BaseCorporationUI/FindMemberInRole'),
                    self.findmember, self.findmember, 'findmember'
                ])
                self.panels['members'].append(self.findmember)
                if self.IsOldRolesEnabled():
                    self.members = form.CorpMembers(name='members',
                                                    pos=(0, 0, 0, 0))
                    wnd.sr.main.children.append(self.members)
                    membersTabEntries.append([
                        localization.GetByLabel(
                            'UI/Corporations/BaseCorporationUI/RoleManagement'
                        ), self.members, self.members, 'roles'
                    ])
                    self.panels['members'].append(self.members)
                if self.IsNewRolesEnabled():
                    self.newRoles = form.CorpRolesNew(
                        name='corpRolesNew',
                        pos=(0, 0, 0, 0),
                        corp=sm.GetService('corp').GetCorporation())
                    wnd.sr.main.children.append(self.newRoles)
                    membersTabEntries.append([
                        localization.GetByLabel(
                            'UI/Corporations/BaseCorporationUI/RoleManagement'
                        ), self.newRoles, self.newRoles, 'newRoles'
                    ])
                    self.panels['members'].append(self.newRoles)
            if const.corpRoleDirector & eve.session.corprole == const.corpRoleDirector:
                self.autoKicks = CorpAutoKicks(name='autoKicks',
                                               pos=(0, 0, 0, 0))
                wnd.sr.main.children.append(self.autoKicks)
                membersTabEntries.append([
                    localization.GetByLabel(
                        'UI/Corporations/BaseCorporationUI/AutoKickManagement'
                    ), self.autoKicks, self.autoKicks, 'autoKicks', None,
                    localization.GetByLabel(
                        'UI/Corporations/BaseCorporationUI/AutoKickDescription'
                    )
                ])
                self.panels['members'].append(self.autoKicks)
            if const.corpRoleDirector & eve.session.corprole == const.corpRoleDirector:
                self.titles = form.CorpTitles(name='titles', pos=(0, 0, 0, 0))
                wnd.sr.main.children.append(self.titles)
                membersTabEntries.append([
                    localization.GetByLabel(
                        'UI/Corporations/BaseCorporationUI/TitleManagement'),
                    self.titles, self.titles, 'titles'
                ])
                self.panels['members'].append(self.titles)
        if eve.session.corprole & const.corpRoleAuditor == const.corpRoleAuditor:
            self.auditing = form.CorpAuditing(name='auditingpar',
                                              pos=(0, 0, 0, 0))
            wnd.sr.main.children.append(self.auditing)
            membersTabEntries.append([
                localization.GetByLabel(
                    'UI/Corporations/BaseCorporationUI/Auditing'),
                self.auditing, self.auditing, 'main'
            ])
            self.panels['members'].append(self.auditing)
        self.decorations = form.CorpDecorations(name='decorations',
                                                pos=(0, 0, 0, 0))
        wnd.sr.main.children.append(self.decorations)
        membersTabEntries.append([
            localization.GetByLabel(
                'UI/Corporations/BaseCorporationUI/Decorations'),
            self.decorations, self.decorations, 'decorations'
        ])
        self.panels['members'].append(self.decorations)
        wnd.sr.membersTabs = uicontrols.TabGroup(name='tabparent',
                                                 parent=wnd.sr.main,
                                                 idx=0)
        wnd.sr.membersTabs.Startup(membersTabEntries,
                                   'corpmembersstab',
                                   autoselecttab=0)
        tabpanels.append([
            localization.GetByLabel(
                'UI/Corporations/BaseCorporationUI/Members'), None, self,
            'members', wnd.sr.membersTabs
        ])
        if not util.IsNPC(session.corpid):
            self.standings = form.CorpStandings(name='standingspar',
                                                pos=(0, 0, 0, 0))
            wnd.sr.main.children.append(self.standings)
            tabpanels.append([
                localization.GetByLabel(
                    'UI/Corporations/BaseCorporationUI/Standings'),
                self.standings, self, 'standings', None, standingsHint
            ])
            self.panels['standings'] = [self.standings]
        politicsTabEntries = []
        self.panels['politics'] = []
        if self.corp.CanViewVotes(eve.session.corpid):
            self.votes = form.CorpVotes(name='votespar', pos=(0, 0, 0, 0))
            wnd.sr.main.children.append(self.votes)
            politicsTabEntries.append([
                localization.GetByLabel(
                    'UI/Corporations/BaseCorporationUI/Votes'), self.votes,
                self.votes, 'votes', None, votesHint
            ])
            self.panels['politics'].append(self.votes)
            self.sanctionable = form.CorpSanctionableActions(
                name='sanctionablepar', pos=(0, 0, 0, 0))
            wnd.sr.main.children.append(self.sanctionable)
            politicsTabEntries.append([
                localization.GetByLabel(
                    'UI/Corporations/BaseCorporationUI/SanctionableActions'),
                self.sanctionable, self.sanctionable, 'sanctionable', None,
                sanctionableActionsHint
            ])
            self.panels['politics'].append(self.sanctionable)
        self.wars = form.CorpWars(name='warspar', pos=(0, 0, 0, 0))
        wnd.sr.main.children.append(self.wars)
        tabpanels.append([
            localization.GetByLabel('UI/Corporations/BaseCorporationUI/Wars'),
            self.wars, self, 'wars', None, warsHint
        ])
        self.panels['wars'] = [self.wars]
        if len(self.panels['politics']):
            wnd.sr.politicsTabs = uicontrols.TabGroup(name='tabparent',
                                                      parent=wnd.sr.main,
                                                      idx=0)
            wnd.sr.politicsTabs.Startup(politicsTabEntries,
                                        'corppoliticsstab',
                                        autoselecttab=0)
            tabpanels.append([
                localization.GetByLabel(
                    'UI/Corporations/BaseCorporationUI/Politics'), None, self,
                'politics', wnd.sr.politicsTabs
            ])
        if const.corpRoleAccountant & eve.session.corprole != 0 or self.corp.UserIsCEO(
        ):
            self.accounts = form.CorpAccounts(name='accountspar',
                                              pos=(0, 0, 0, 0))
            wnd.sr.main.children.append(self.accounts)
            tabpanels.append([
                localization.GetByLabel(
                    'UI/Corporations/BaseCorporationUI/Assets'), self.accounts,
                self, 'accounts', None, accountsHint
            ])
            self.panels['accounts'] = [self.accounts]
        self.alliances = form.Alliances(name='alliances', pos=(0, 0, 0, 0))
        wnd.sr.main.children.append(self.alliances)
        tabpanels.append([
            localization.GetByLabel(
                'UI/Corporations/BaseCorporationUI/Alliances'), self.alliances,
            self, 'alliances', None, alliancesHint
        ])
        self.panels['alliances'] = [self.alliances]
        wnd.sr.maintabs = uicontrols.TabGroup(name='tabparent',
                                              parent=wnd.sr.main)
        wnd.sr.maintabs.Startup(tabpanels,
                                'corporationpanel',
                                UIIDPrefix='corporationTab',
                                autoselecttab=False)
        if panelName:
            wnd.sr.maintabs.ShowPanelByName(panelName)
        else:
            wnd.sr.maintabs.AutoSelect()
        if wnd is None or wnd.destroyed:
            self.ResetWindow()
            return
        uiutil.SetOrder(wnd.sr.maintabs, 0)
        wnd.HideLoad()
        wnd.state = uiconst.UI_NORMAL
        uthread.new(sm.StartService('wallet').AskSetWalletDivision)
コード例 #22
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Transform.ApplyAttributes(self, attributes)
     self.degree = attributes.get('degree', 0)
     self.func = None
     self.funcArgs = None
     self.itemID = attributes.itemID
     self.isDisabled = False
     self.degreeWidth = attributes.degreeWidth
     self.labelPath = ''
     self.labelText = ''
     self.isEmpty = attributes.get('isEmpty', False)
     self.commandName = None
     self.isHilighted = False
     self.fullWidth = attributes.sizeInfo.buttonWidth
     self.fullHeight = attributes.sizeInfo.buttonHeight
     iconPar = uiprimitives.Transform(parent=self,
                                      name='iconPar',
                                      pos=(0, 3, 32, 32),
                                      state=uiconst.UI_DISABLED,
                                      align=uiconst.CENTER)
     iconPar.rotation = mathUtil.DegToRad(self.degree)
     self.icon = GlowSprite(parent=iconPar,
                            name='icon',
                            pos=(0, 0, 32, 32),
                            state=uiconst.UI_DISABLED,
                            align=uiconst.CENTER)
     selectionSlice = SpriteUnderlay(parent=self,
                                     name='selectionSlice',
                                     state=uiconst.UI_DISABLED,
                                     texturePath=self.selelectedBasePath %
                                     self.degreeWidth,
                                     align=uiconst.TOALL,
                                     opacity=0.9)
     selectionSlice.display = False
     self.selectionSlice = selectionSlice
     if self.isEmpty:
         sliceTexturePath = self.emptySliceBasePath % self.degreeWidth
     else:
         sliceTexturePath = self.sliceBasePath % self.degreeWidth
     self.hilite = SpriteUnderlay(parent=self,
                                  name='hilite',
                                  state=uiconst.UI_DISABLED,
                                  texturePath=self.selelectedBasePath %
                                  self.degreeWidth,
                                  align=uiconst.TOALL,
                                  colorType=uiconst.COLORTYPE_UIHILIGHTGLOW,
                                  opacity=0.0)
     self.availableSlice = SpriteUnderlay(parent=self,
                                          name='availableSlice',
                                          state=uiconst.UI_DISABLED,
                                          texturePath=sliceTexturePath,
                                          align=uiconst.TOALL,
                                          opacity=attributes.get(
                                              'buttonBackgroundOpacity',
                                              0.8))
     self.unavailableSlice = SpriteUnderlay(
         parent=self,
         name='unavailableSlice',
         state=uiconst.UI_DISABLED,
         texturePath=sliceTexturePath,
         align=uiconst.TOALL,
         colorType=uiconst.COLORTYPE_UIBASE,
         opacity=0.85)
     self.unavailableSlice.display = False
     self.sliceInUse = self.availableSlice