示例#1
0
 def _ConstructBaseLayout(self):
     self.charCont = uicontrols.ContainerAutoSize(parent=self.mainCont,
                                                  name='charCont',
                                                  align=uiconst.TOTOP)
     self.clockCont = neocom.WrapperButton(parent=self.mainCont,
                                           name='clockCont',
                                           align=uiconst.TOBOTTOM,
                                           height=20,
                                           cmdName='OpenCalendar')
     self.fixedButtonCont = uicontrols.ContainerAutoSize(
         parent=self.mainCont,
         name='fixedButtonCont',
         align=uiconst.TOBOTTOM)
     uiprimitives.Fill(bgParent=self.fixedButtonCont,
                       color=self.COLOR_CORNERFILL,
                       blendMode=trinity.TR2_SBM_ADD)
     self.overflowBtn = neocom.OverflowButton(parent=self.mainCont,
                                              align=uiconst.TOBOTTOM,
                                              state=uiconst.UI_HIDDEN,
                                              height=20)
     self.buttonCont = uiprimitives.Container(parent=self.mainCont,
                                              name='buttonCont',
                                              align=uiconst.TOALL)
     self.dropIndicatorLine = uiprimitives.Line(
         parent=self.mainCont,
         name='dropIndicatorLine',
         align=uiconst.TOPLEFT,
         color=util.Color.GetGrayRGBA(0.7, 0.3),
         pos=(0, 0, 0, 1))
 def ApplyAttributes(self, attributes):
     uicontrols.ContainerAutoSize.ApplyAttributes(self, attributes)
     self.infoPanelsByTypeID = {}
     self.infoPanelButtonsByTypeID = {}
     self.isDraggingButton = False
     self.topCont = uiprimitives.Container(name='topCont',
                                           parent=self,
                                           align=uiconst.TOTOP,
                                           height=self.ICONSIZE,
                                           padding=(infoPanelConst.LEFTPAD,
                                                    0, 0, 5))
     self.dropIndicatorLine = uiprimitives.Line(
         name='dropIndicatorLine',
         parent=self.topCont,
         align=uiconst.TOLEFT_NOPUSH,
         state=uiconst.UI_HIDDEN,
         color=util.Color.GetGrayRGBA(1.0, 0.6),
         padding=(0, 2, 0, 2))
     self.iconCont = uicontrols.ContainerAutoSize(name='iconCont',
                                                  parent=self.topCont,
                                                  state=uiconst.UI_NORMAL,
                                                  align=uiconst.TOLEFT)
     self.mainCont = uicontrols.ContainerAutoSize(name='mainCont',
                                                  parent=self,
                                                  align=uiconst.TOTOP)
     self.Reconstruct()
 def Layout(self):
     """
     Setup UI controls for this window.
     """
     self.HideHeader()
     self.MakeUnResizeable()
     self.container = uicontrols.ContainerAutoSize(parent=self.GetMainArea(), align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, padding=(15, 15, 15, 0), callback=self.OnContainerResized, opacity=0.0)
     uicontrols.EveLabelLargeBold(parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ActivatePlex/ActivateHeading'))
     uicontrols.EveLabelMedium(parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ActivatePlex/ActivateDescription'), color=self.GRAY_COLOR, padding=(0, 5, 0, 10))
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     slot1 = uicontrols.ContainerAutoSize(parent=self.container, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0, 0, 0, 0.3))
     self.slot1Background = uiprimitives.Fill(parent=slot1, color=self.BLUE_COLOR, opacity=0.0)
     self.slot1Title = uicontrols.EveLabelMediumBold(parent=slot1, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ActivatePlex/GameTime'), padding=(60, 12, 140, 0), color=self.BLUE_COLOR)
     self.slot1Expiry = uicontrols.EveLabelMediumBold(parent=slot1, align=uiconst.TOTOP, text='', padding=(60, 0, 140, 10), color=self.GRAY_COLOR)
     self.slot1Button = uicontrols.Button(parent=slot1, label='', align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=120, fixedheight=30, pos=(10, 0, 0, 0))
     self.slot1Icon = Sprite(parent=slot1, texturePath='res:/UI/Texture/classes/CharacterSelection/plex_timer.png', align=uiconst.CENTERLEFT, pos=(15, 0, 32, 32))
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     slot2 = uicontrols.ContainerAutoSize(parent=self.container, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0, 0, 0, 0.3))
     self.slot2Background = uiprimitives.Fill(parent=slot2, color=self.BLUE_COLOR, opacity=0.0)
     self.slot2Title = uicontrols.EveLabelMediumBold(parent=slot2, align=uiconst.TOTOP, text='', padding=(60, 12, 140, 0), color=self.WHITE_COLOR)
     self.slot2Expiry = uicontrols.EveLabelMediumBold(parent=slot2, align=uiconst.TOTOP, text='', padding=(60, 0, 140, 10), color=self.GRAY_COLOR)
     self.slot2Button = uicontrols.Button(parent=slot2, label='', align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=120, fixedheight=30, pos=(10, 0, 0, 0))
     self.slot2Icon = Sprite(parent=slot2, texturePath='res:/UI/Texture/Icons/add_training_queue.png', align=uiconst.CENTERLEFT, pos=(15, 0, 32, 32))
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     slot3 = uicontrols.ContainerAutoSize(parent=self.container, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0, 0, 0, 0.3))
     self.slot3Background = uiprimitives.Fill(parent=slot3, color=self.BLUE_COLOR, opacity=0.0)
     self.slot3Title = uicontrols.EveLabelMediumBold(parent=slot3, align=uiconst.TOTOP, text='', padding=(60, 12, 140, 0), color=self.WHITE_COLOR)
     self.slot3Expiry = uicontrols.EveLabelMediumBold(parent=slot3, align=uiconst.TOTOP, text='', padding=(60, 0, 140, 10), color=self.GRAY_COLOR)
     self.slot3Button = uicontrols.Button(parent=slot3, label='', align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=120, fixedheight=30, pos=(10, 0, 0, 0))
     self.slot3Icon = Sprite(parent=slot3, texturePath='res:/UI/Texture/Icons/add_training_queue.png', align=uiconst.CENTERLEFT, pos=(15, 0, 32, 32))
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     slot4 = Container(parent=self.container, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0, 0, 0, 0.3), height=70)
     self.slot4Background = uiprimitives.Fill(parent=slot4, color=self.BLUE_COLOR, opacity=0.0)
     self.slot4Title = uicontrols.EveLabelMediumBold(parent=slot4, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ActivatePlex/Donate'), padding=(60, 12, 140, 0), color=self.BLUE_COLOR)
     self.slot4Edit = SearchInput(parent=slot4, align=uiconst.TOTOP, padding=(60, 0, 140, 10), height=18, color=self.GRAY_COLOR, GetSearchEntries=self.Search, OnSearchEntrySelected=self.OnSearchEntrySelected, hinttext=localization.GetByLabel('UI/ActivatePlex/SearchHint'))
     self.slot4Edit.SetHistoryVisibility(False)
     self.entryContainer = Container(parent=slot4, align=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, padding=(60, 0, 140, 10), height=32, bgColor=(0, 0, 0, 0.3))
     self.entryContainer.display = False
     self.slot4Button = uicontrols.Button(parent=slot4, label='', align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=120, fixedheight=30, pos=(10, 0, 0, 0))
     self.slot4Button.Disable()
     self.slot4Icon = Sprite(parent=slot4, texturePath='res:/UI/Texture/classes/CharacterSelection/plex_timer.png', align=uiconst.CENTERLEFT, pos=(15, 0, 32, 32))
     self.entryContainerIcon = Sprite(parent=self.entryContainer, texturePath='', align=uiconst.CENTERLEFT, pos=(0, 0, 32, 32))
     clipContainer = Container(parent=self.entryContainer, clipChildren=True, padding=(40, 0, 36, 0))
     self.entryContainerTitle = uicontrols.EveLabelMediumBold(parent=clipContainer, align=uiconst.CENTERLEFT, text='', width=150)
     self.entryContainerButton = uicontrols.ButtonIcon(parent=self.entryContainer, texturePath='res:/UI/Texture/Icons/73_16_210.png', align=uiconst.TOPRIGHT, func=self.ResetSearch, width=16, height=16, iconSize=16)
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     self.closeButton = uicontrols.Button(parent=self.container, label='', func=self.Close, align=uiconst.TOTOP, fontsize=13, padding=(120, 10, 120, 30))
     uicore.animations.FadeTo(self.container, startVal=0.0, endVal=1.0, duration=0.5)
    def ApplyAttributes(self, attributes):
        uicls.InfoPanelBase.ApplyAttributes(self, attributes)
        sm.RegisterNotify(self)
        self.inEditMode = False
        self.editModeContainer = uiprimitives.Container(parent=self.mainCont, name='buttonContainer', align=uiconst.TOTOP, state=uiconst.UI_HIDDEN, padding=(0, 0, 0, 5))
        self.editModeContent = uiprimitives.Container(parent=self.editModeContainer, name='editModeContent', align=uiconst.TOALL, padding=(10, 6, 10, 6))
        uiprimitives.Fill(parent=self.editModeContainer, color=util.Color.GetGrayRGBA(0.0, 0.3))
        uicontrols.Frame(parent=self.editModeContainer, color=util.Color.GetGrayRGBA(0.0, 0.2))
        self.tabPanelContainer = uicontrols.ContainerAutoSize(parent=self.mainCont, name='tabPanelContainer', align=uiconst.TOTOP)
        self.planetName = self.headerCls(parent=self.headerCont, state=uiconst.UI_NORMAL, align=uiconst.CENTERLEFT)
        self.resourceControllerTab = ResourceController(parent=self.tabPanelContainer)
        self.editModeTab = PlanetEditModeContainer(parent=self.tabPanelContainer)
        self.modeButtonGroup = uicls.ToggleButtonGroup(parent=self.mainCont, align=uiconst.TOTOP, callback=self.OnButtonSelected, padBottom=4)
        for btnID, label, panel in (('editModeTab', localization.GetByLabel('UI/Common/Build'), self.editModeTab), ('resourceControllerTab', localization.GetByLabel('UI/PI/Common/Scan'), self.resourceControllerTab)):
            self.modeButtonGroup.AddButton(btnID, label, panel)

        self.modeButtonGroup.SelectByID('editModeTab')
        BTNSIZE = 24
        exitBtn = uicontrols.Button(parent=self.headerCont, align=uiconst.CENTERRIGHT, pos=(0,
         0,
         BTNSIZE,
         BTNSIZE), icon='res:/UI/Texture/Icons/73_16_45.png', iconSize=16, func=self.ExitPlanetMode, alwaysLite=True, hint=localization.GetByLabel('UI/PI/Common/ExitPlanetMode'))
        homeBtn = uicontrols.Button(parent=self.headerCont, align=uiconst.CENTERRIGHT, pos=(exitBtn.left + exitBtn.width + 2,
         0,
         BTNSIZE,
         BTNSIZE), icon='res:/UI/Texture/Icons/73_16_46.png', iconSize=16, func=self.ViewCommandCenter, alwaysLite=True, hint=localization.GetByLabel('UI/PI/Common/ViewPlanetaryCommandCenter'))
        self.sr.homeBtn = homeBtn
        self.UpdatePlanetText()
        self.UpdateHomeButton()
        self.CreateEditModeContainer()
        planetUISvc = sm.GetService('planetUI')
        planetUISvc.SetModeController(self)
        uthread.new(self.OnEditModeChanged, planetUISvc.inEditMode)
 def GetUtilMenu(self, parent):
     cont = uicontrols.ContainerAutoSize(parent=parent,
                                         align=uiconst.TOTOP,
                                         padRight=10)
     self.infoPanelCls(parent=cont,
                       mode=infoPanelConst.MODE_NORMAL,
                       isModeFixed=True)
示例#6
0
 def ApplyAttributes(self, attributes):
     uicontrols.ContainerAutoSize.ApplyAttributes(self, attributes)
     self.activeBuildEntry = None
     self.buildContainer = uicontrols.ContainerAutoSize(
         parent=self, name='buildContainer', align=uiconst.TOTOP)
     self.CreateLayout()
     sm.RegisterNotify(self)
示例#7
0
 def AddCloneLocation(self, stationID, stationName, stationTypeID, isRemote,
                      func):
     if isRemote:
         if stationID == session.hqID:
             title = localization.GetByLabel(
                 'UI/Medical/Clone/CorporationHeadquarters')
         else:
             title = localization.GetByLabel(
                 'UI/Medical/Clone/CorporationOffice')
         parent = self.remote
         color = self.BLUE_COLOR
     else:
         if stationID in (session.stationid2, session.structureid):
             title = localization.GetByLabel('UI/Medical/Clone/ThisStation')
         else:
             title = localization.GetByLabel(
                 'UI/Medical/Clone/SchoolHeadquarters')
         parent = self.local
         color = self.GREEN_COLOR
     container = uicontrols.ContainerAutoSize(parent=parent,
                                              align=uiconst.TOTOP,
                                              alignMode=uiconst.TOTOP,
                                              state=uiconst.UI_PICKCHILDREN,
                                              bgColor=(0.2, 0.2, 0.2, 0.3))
     container.DisableAutoSize()
     label = "<url=showinfo:%d//%d alt='%s'>%s</url>" % (
         stationTypeID, stationID, title, stationName)
     uicontrols.EveLabelMediumBold(parent=container,
                                   align=uiconst.TOTOP,
                                   text=title,
                                   padding=(7, 5, 0, 0),
                                   color=color)
     uicontrols.EveLabelMediumBold(parent=container,
                                   align=uiconst.TOTOP,
                                   state=uiconst.UI_NORMAL,
                                   text=label,
                                   padding=(7, 0, 140, 5))
     if stationID != self.homeStationID:
         uicontrols.Button(parent=container,
                           label=localization.GetByLabel(
                               'UI/Medical/Clone/SetHomeStationButton'),
                           align=uiconst.CENTERRIGHT,
                           fontsize=13,
                           fixedwidth=140,
                           fixedheight=30,
                           pos=(5, 0, 0, 0),
                           func=func)
     else:
         uicontrols.EveLabelMediumBold(
             parent=container,
             align=uiconst.CENTERRIGHT,
             text=localization.GetByLabel(
                 'UI/Medical/Clone/CurrentHomeStation'),
             padding=(-15, 0, 0, 0))
     uiprimitives.Line(parent=parent,
                       align=uiconst.TOTOP,
                       color=self.LINE_COLOR)
     container.EnableAutoSize()
示例#8
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.statType = attributes.statType
     self.value = None
     self.diffQueue = []
     self.mainCont = uicontrols.ContainerAutoSize(parent=self, align=uiconst.CENTER)
     uiprimitives.Sprite(name='icon', parent=self.mainCont, align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED, texturePath=self.GetTexturePath(), pos=(0, 0, 10, 10), opacity=0.7)
     self.label = uicontrols.Label(name='label', parent=self.mainCont, align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED, color=util.Color.WHITE, fontsize=10, pos=(11, -1, 0, 0))
     self.diffLabel = None
示例#9
0
    def Startup(self, slimItem):
        sm.RegisterNotify(self)
        GetShipFighterState().ConnectFighterTargetUpdatedHandler(self._OnFighterTargetUpdate)
        self.ball = _weakref.ref(sm.GetService('michelle').GetBall(slimItem.itemID))
        self.slimItem = _weakref.ref(slimItem)
        self.id = slimItem.itemID
        self.itemID = slimItem.itemID
        self.updatedamage = slimItem.categoryID not in (const.categoryAsteroid, const.categoryFighter) and slimItem.groupID not in (const.groupHarvestableCloud, const.groupOrbitalTarget)
        self.AddUIObjects(slimItem, self.itemID)
        iconPar = self.sr.iconPar
        barAndImageCont = self.barAndImageCont
        barAndImageCont.isDragObject = True
        barAndImageCont.GetDragData = self.GetTargetDragData
        barAndImageCont.OnMouseDown = self.OnTargetMouseDown
        barAndImageCont.OnClick = self.OnTargetClick
        barAndImageCont.GetMenu = self.GetTargetMenu
        barAndImageCont.OnMouseEnter = self.OnTargetMouseEnter
        barAndImageCont.OnMouseExit = self.OnTargetMouseExit
        self.sr.activeTarget = uicls.ActiveTargetOnBracket(parent=iconPar, itemID=self.itemID)
        self.slimForFlag = slimItem
        self.SetStandingIcon()
        self.sr.hilite = uiprimitives.Sprite(name='hiliteSprite', parent=iconPar, left=-3, top=-3, width=100, height=100, texturePath='res:/UI/Texture/classes/Target/targetUnderlay.png', color=(1.0, 1.0, 1.0, 0.05))
        self.sr.activeTarget.RotateArrows()
        labelClass = uicontrols.EveLabelSmall
        labelContainer = uicontrols.ContainerAutoSize(parent=self, name='labelContainer', align=uiconst.TOTOP)
        self.labelContainer = labelContainer
        self.sr.label = labelClass(text=' ', parent=labelContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, maxLines=1)
        self.sr.label2 = labelClass(text=' ', parent=labelContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, maxLines=1)
        self.sr.shipLabel = labelClass(text=' ', parent=labelContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, maxLines=1)
        self.sr.distanceLabel = labelClass(text=' ', parent=labelContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, maxLines=1)
        self.SetTargetLabel()
        self.sr.assignedPar = uiprimitives.Container(name='assignedPar', align=uiconst.TOTOP, parent=self, height=32)
        self.sr.assigned = uiprimitives.Container(name='assigned', align=uiconst.CENTERTOP, parent=self.sr.assignedPar, height=32)
        self.sr.updateTimer = base.AutoTimer(random.randint(750, 1000), self.UpdateData)
        self.UpdateData()
        selected = sm.GetService('state').GetExclState(state.selected)
        self.Select(selected == slimItem.itemID)
        hilited = sm.GetService('state').GetExclState(state.mouseOver)
        self.Hilite(hilited == slimItem.itemID)
        activeTargetID = sm.GetService('target').GetActiveTargetID()
        self.ActiveTarget(activeTargetID == slimItem.itemID)
        drones = sm.GetService('michelle').GetDrones()
        for key in drones:
            droneState = drones[key]
            if droneState.targetID == self.id:
                self.drones[droneState.droneID] = droneState.typeID

        self.UpdateDrones()
        for moduleInfo in sm.GetService('godma').GetStateManager().GetActiveModulesOnTargetID(slimItem.itemID):
            if moduleInfo:
                moduleID = moduleInfo.itemID
                if moduleID and moduleID not in self.activeModules:
                    self.AddWeapon(moduleInfo)
                    self.activeModules[moduleID] = moduleInfo

        self._AddActiveFighterAbilities()
示例#10
0
 def ConstructLayout(self):
     uiprimitives.Fill(bgParent=self, color=(1.0, 0.0, 0.0, 0.2))
     uicontrols.Frame(parent=self, color=(1.0, 0.0, 0.0, 0.2))
     iconCont = uiprimitives.Container(name='iconCont', parent=self, align=uiconst.TOLEFT, width=96)
     self.behalfCont = uiprimitives.Container(name='behalfCont', parent=iconCont, align=uiconst.TOLEFT, width=64, state=uiconst.UI_NORMAL)
     self.corpCont = uiprimitives.Container(name='corpCont', parent=iconCont, align=uiconst.TOPRIGHT, width=32, height=32)
     self.allianceCont = uiprimitives.Container(name='allianceCont', parent=iconCont, align=uiconst.BOTTOMRIGHT, width=32, height=32)
     theRestCont = uiprimitives.Container(name='textCont', parent=self, align=uiconst.TOALL, padLeft=defaultPadding)
     self.textCont = uicontrols.ContainerAutoSize(parent=theRestCont, name='textCont', align=uiconst.CENTERLEFT)
     self.nameLabel = uicontrols.EveLabelSmall(text='', parent=self.textCont, maxLines=1, align=uiconst.TOPLEFT, state=uiconst.UI_NORMAL)
     self.corpLabel = uicontrols.EveLabelSmall(text='', parent=self.textCont, maxLines=1, align=uiconst.TOPLEFT, state=uiconst.UI_NORMAL, top=13)
     self.allianceLabel = uicontrols.EveLabelSmall(text='', parent=self.textCont, maxLines=1, align=uiconst.TOPLEFT, state=uiconst.UI_NORMAL, top=26)
示例#11
0
 def ConstructLayout(self, oldSetupName):
     cont = uicontrols.ContainerAutoSize(parent=self.sr.main,
                                         align=uiconst.TOTOP,
                                         padding=(const.defaultPadding, 0,
                                                  const.defaultPadding,
                                                  const.defaultPadding),
                                         alignMode=uiconst.TOTOP)
     if oldSetupName:
         label = localization.GetByLabel(
             'UI/Fleet/FleetWindow/StoreFleetSetupTextWithLastLoaded',
             oldFleetSetupName=oldSetupName)
     else:
         label = localization.GetByLabel(
             'UI/Fleet/FleetWindow/StoreFleetSetupText')
     nameLabel = uicontrols.EveLabelSmall(parent=cont,
                                          name='nameLabel',
                                          align=uiconst.TOTOP,
                                          text=label,
                                          padLeft=6)
     self.newName = SinglelineEdit(name='namePopup',
                                   parent=cont,
                                   align=uiconst.TOTOP,
                                   maxLength=self.maxLength,
                                   OnReturn=self.Confirm,
                                   padLeft=6)
     motdText = localization.GetByLabel('UI/Fleet/FleetWindow/IncludeMotd')
     self.motdCb = uicontrols.Checkbox(text=motdText,
                                       parent=cont,
                                       configName='motdCb',
                                       checked=False,
                                       padLeft=6,
                                       align=uiconst.TOTOP)
     voiceText = localization.GetByLabel(
         'UI/Fleet/FleetWindow/IncludeVoiceEnabledSetting')
     self.voiceCb = uicontrols.Checkbox(text=voiceText,
                                        parent=cont,
                                        configName='voiceCb',
                                        checked=False,
                                        padLeft=6,
                                        align=uiconst.TOTOP)
     freeMoveText = localization.GetByLabel(
         'UI/Fleet/FleetWindow/IncludeFreeMoveSetting')
     self.freeMoveCb = uicontrols.Checkbox(text=freeMoveText,
                                           parent=cont,
                                           configName='freeMoveCb',
                                           checked=False,
                                           padLeft=6,
                                           align=uiconst.TOTOP)
     cw, ch = cont.GetAbsoluteSize()
     self.height = ch + 50
     uicore.registry.SetFocus(self.newName)
示例#12
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self.tilesByTileCoord = {}
     self.linesByTileCoords = {}
     self.utilityElements = []
     self.accessibleTiles = []
     self.hasGameEnded = False
     self.bottomCont = uiprimitives.Container(name='bottomCont',
                                              parent=self.sr.main,
                                              align=uiconst.TOBOTTOM,
                                              height=110)
     self.tileHintLabel = uicontrols.Label(name='tileHintLabel',
                                           parent=self.bottomCont,
                                           align=uiconst.BOTTOMRIGHT,
                                           pos=(15, 15, 220, 0),
                                           fontsize=10)
     self.utilityElementContainer = uicontrols.ContainerAutoSize(
         name='utilityElementContainer',
         parent=self.bottomCont,
         align=uiconst.CENTERBOTTOM,
         state=uiconst.UI_PICKCHILDREN,
         opacity=1.0,
         height=50,
         top=10)
     self.virusInfo = hackingUI.VirusInfo(parent=self.bottomCont,
                                          left=15,
                                          top=10,
                                          opacity=0.0)
     self.boardTransform = uiprimitives.Transform(name='boardTransform',
                                                  parent=self.sr.main,
                                                  align=uiconst.TOALL,
                                                  state=uiconst.UI_NORMAL,
                                                  scalingCenter=(0.5, 0.5))
     self.boardContainer = uiprimitives.Container(
         name='boardContainer',
         parent=self.boardTransform,
         align=uiconst.TOPLEFT,
         opacity=0.0)
     self.backgroundVideo = uiprimitives.VideoSprite(
         bgParent=self.sr.maincontainer,
         videoPath='res:/video/hacking/bgLoop_alpha.bik',
         videoLoop=True,
         spriteEffect=trinity.TR2_SFX_COPY,
         color=hackingUIConst.COLOR_WINDOW_BG,
         opacity=0.0)
     sm.GetService('audio').SendUIEvent('minigame_start')
 def ApplyAttributes(self, attributes):
     uicls.InfoPanelBase.ApplyAttributes(self, attributes)
     self.isGaugeInitialized = False
     self.benefitIcons = []
     self.factionIcon = None
     self.headerTextCont = uiprimitives.Container(name='headerTextCont',
                                                  parent=self.headerCont,
                                                  align=uiconst.TOALL)
     self.title = self.headerCls(
         name='title',
         text=
         '<color=white url=localsvc:service=cmd&method=OpenMilitia>%s</url>'
         % localization.GetByLabel('UI/FactionWarfare/FactionalWarfare'),
         parent=self.headerTextCont,
         align=uiconst.CENTERLEFT,
         state=uiconst.UI_NORMAL)
     self.subTitle = uicontrols.EveHeaderMedium(name='subtitle',
                                                parent=self.headerTextCont,
                                                align=uiconst.CENTERLEFT,
                                                state=uiconst.UI_NORMAL,
                                                left=self.title.width + 5,
                                                top=2,
                                                bold=True)
     self.headerControlGauge = uicls.Gauge(parent=self.headerCont,
                                           align=uiconst.TOALL,
                                           gaugeHeight=16,
                                           padTop=6,
                                           padRight=6,
                                           color=(0.5, 0.5, 0.5, 1.0),
                                           width=0,
                                           height=0,
                                           state=uiconst.UI_HIDDEN)
     self.headerControlGauge.OnClick = self.topCont.OnClick
     self.headerControlGauge.OnMouseEnter = self.topCont.OnMouseEnter
     self.headerControlGauge.OnMouseExit = self.topCont.OnMouseExit
     self.headerControlGauge.GetHint = self.GetGaugeHint
     self.controlGauge = uicls.Gauge(parent=self.mainCont,
                                     align=uiconst.TOTOP,
                                     padTop=2,
                                     gaugeHeight=15,
                                     color=(0.5, 0.5, 0.5, 1.0))
     self.controlGauge.GetHint = self.GetGaugeHint
     self.bottomContainer = uicontrols.ContainerAutoSize(
         parent=self.mainCont, name='bottomContainer', align=uiconst.TOTOP)
     self.bottomContainer.EnableAutoSize()
     self.mainCont.EnableAutoSize()
示例#14
0
    def ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        self.itemID = attributes.Get('itemID')
        lpPool = sm.GetService('facwar').GetSolarSystemLPs()
        topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=40, padding=(self.PADSIDE,
         self.PADTOP,
         self.PADSIDE,
         self.PADSIDE))
        mainCont = uicontrols.ContainerAutoSize(name='mainCont', parent=self.sr.main, align=uiconst.TOTOP)
        bottomCont = uiprimitives.Container(name='bottomCont', parent=self.sr.main, align=uiconst.TOBOTTOM, height=100, padTop=self.PADTOP)
        uicontrols.EveLabelLarge(parent=topCont, text=localization.GetByLabel('UI/FactionWarfare/IHub/SystemUpgradePanel', systemName=cfg.evelocations.Get(session.solarsystemid2).name), align=uiconst.TOPLEFT, top=5)
        uicontrols.EveLabelLarge(parent=topCont, text=localization.GetByLabel('UI/FactionWarfare/IHub/TotalLP'), align=uiconst.TOPRIGHT, top=5)
        self.lpPoolLabel = uicontrols.EveCaptionSmall(parent=topCont, align=uiconst.TOPRIGHT, top=25)
        limits = [0] + const.facwarSolarSystemUpgradeThresholds + [const.facwarSolarSystemMaxLPPool]
        self.upgradeBars = []
        for i in xrange(1, 7):
            bar = uicls.FWUpgradeLevelCont(parent=mainCont, align=uiconst.TOTOP, padding=(self.PADSIDE,
             0,
             10,
             10), lowerLimit=limits[i - 1], upperLimit=limits[i], lpAmount=lpPool, level=i, idx=0)
            self.upgradeBars.append(bar)

        self.bottomGradient = uicontrols.GradientSprite(bgParent=bottomCont, rotation=-pi / 2, rgbData=[(0, (0.3, 0.3, 0.3))], alphaData=[(0, 0.3), (0.9, 0.0)])
        self.bottomFlashEffect = uicontrols.GradientSprite(bgParent=bottomCont, rotation=-pi / 2, rgbData=[(0, (0.6, 0.6, 0.6))], alphaData=[(0, 0.3), (0.9, 0.0)], opacity=0.0)
        uiprimitives.Line(parent=bottomCont, align=uiconst.TOTOP, color=(0.3, 0.3, 0.3, 0.3))
        bottomMainCont = uiprimitives.Container(name='bottomMainCont', parent=bottomCont, align=uiconst.CENTER, width=450, height=100)
        self.myLPLabel = uicontrols.Label(parent=bottomMainCont, text=self.GetLPOwnedLabel(), align=uiconst.TOPLEFT, left=self.PADSIDE, top=self.PADTOP)
        self.bottomBottomCont = uiprimitives.Container(name='bottomBottom', align=uiconst.TOPLEFT, pos=(self.PADSIDE,
         40,
         450,
         25), parent=bottomMainCont)
        self.donateAmountEdit = uicontrols.SinglelineEdit(parent=self.bottomBottomCont, name='donateAmountEdit', align=uiconst.TOLEFT, setvalue=0, width=155, OnReturn=self.OnDonateLPBtn, OnChange=self.OnDonateValueChanged)
        self.donateBtn = uicontrols.Button(parent=self.bottomBottomCont, align=uiconst.TOLEFT, func=self.OnDonateLPBtn, label=localization.GetByLabel('UI/FactionWarfare/IHub/DonateLPs'), padLeft=4)
        self.donationReceivedLabel = uicontrols.EveCaptionMedium(name='donationReceivedLabel', parent=bottomMainCont, align=uiconst.TOPLEFT, text=localization.GetByLabel('UI/FactionWarfare/IHub/DonationReceived'), left=self.PADSIDE, top=50, opacity=0.0)
        self.bottomTaxCont = uiprimitives.Container(name='bottomTax', align=uiconst.TOPLEFT, pos=(self.PADSIDE,
         73,
         400,
         25), parent=bottomMainCont)
        self.myLPToIhubLabel = None
        factionID = sm.GetService('facwar').GetSystemOccupier(session.solarsystemid)
        self.myLPTaxLabel = uicontrols.Label(name='myLPTaxLabel', parent=self.bottomTaxCont, text=localization.GetByLabel('UI/FactionWarfare/IHub/maintenanceTax', tax=int(facwarCommon.GetDonationTax(factionID) * 100)), align=uiconst.TOLEFT, state=uiconst.UI_NORMAL, left=5)
        self.SetLPPoolAmount(lpPool)
        self.UpdateMyLPAmount()
        self.UpdateMyLPToIHubLabel()
        uthread.new(self.CheckOpenThread)
示例#15
0
    def ConstructLayout(self):
        cont = uiprimitives.Container(parent=self.sr.main, align=uiconst.TOTOP, padding=const.defaultPadding, height=16)
        checkBoxCont = uicontrols.ContainerAutoSize(parent=self.sr.main, name='checkBoxCont', align=uiconst.TOTOP, padding=(const.defaultPadding,
         0,
         const.defaultPadding,
         const.defaultPadding))
        selectLabel = uicontrols.EveLabelSmallBold(parent=cont, text=localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Home/SelectShortName'), height=16, align=uiconst.TOTOP)
        shortNames = sm.GetService('corp').GetSuggestedAllianceShortNames(self.allianceName)
        checked = True
        for shortNameRow in shortNames:
            shortName = shortNameRow.shortName
            if shortName is None:
                continue
            checkBox = uicontrols.Checkbox(text=shortName, parent=checkBoxCont, configName='shortNames', retval=shortName, checked=checked, groupname='state', align=uiconst.TOTOP, height=19)
            self.checkBoxes.append(checkBox)
            checked = False

        self.height = checkBoxCont.height + 70
示例#16
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self._mode = None
     self.isInModeTransition = False
     self.isModeFixed = attributes.Get('isModeFixed',
                                       self.default_isModeFixed)
     self.topCont = uiprimitives.Container(name='topCont',
                                           parent=self,
                                           align=uiconst.TOTOP,
                                           state=uiconst.UI_NORMAL,
                                           height=28)
     if not self.isModeFixed:
         self.topCont.OnClick = self.OnTopContClick
         self.topCont.OnDblClick = self.OnTopContDblClick
         self.topCont.OnMouseEnter = self.OnTopContMouseEnter
         self.topCont.OnMouseExit = self.OnTopContMouseExit
     self.hoverBG = uiprimitives.Fill(bgParent=self.topCont,
                                      color=util.Color.WHITE,
                                      opacity=0.0)
     self.headerBtnCont = uiprimitives.Container(
         name='headerBtnCont',
         parent=self.topCont,
         align=uiconst.TOLEFT,
         width=infoPanelConst.LEFTPAD)
     self.headerCont = uiprimitives.Container(name='headerCont',
                                              parent=self.topCont)
     self.headerButton = self.ConstructHeaderButton()
     self.collapseArrow = uiprimitives.Sprite(
         parent=self.headerBtnCont,
         align=uiconst.CENTERLEFT,
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/Neocom/arrowDown.png',
         pos=(6, 0, 7, 7),
         opacity=0.0)
     if not self.hasSettings:
         self.headerButton.pickState = uiconst.TR2_SPS_OFF
     self.mainCont = uicontrols.ContainerAutoSize(
         name='mainCont',
         parent=self,
         align=uiconst.TOTOP,
         padLeft=infoPanelConst.LEFTPAD,
         padBottom=self.MAINPADBOTTOM)
示例#17
0
 def ConstructExistingFWPlayerHeader(self):
     self.topCont.Flush()
     iconSize = 50
     rightCont = uiprimitives.Container(name='rightCont', parent=self.topCont, align=uiconst.TORIGHT, width=200, padLeft=2)
     leftCont = uiprimitives.Container(name='leftCont', parent=self.topCont, clipChildren=True)
     firstLine = uiprimitives.Container(parent=leftCont, align=uiconst.TOTOP_PROP, height=0.4, padLeft=20)
     uiprimitives.Sprite(parent=firstLine, align=uiconst.CENTERLEFT, pos=(0,
      0,
      iconSize,
      iconSize), texturePath='res:/UI/Texture/Icons/FactionalWarfare_64.png')
     enemyID = facwarCommon.GetFactionMainEnemy(self.factionID)
     enemyAllyID = facwarCommon.GetFactionSecondaryEnemy(self.factionID)
     text = localization.GetByLabel('UI/FactionWarfare/FWPlayerHeader1', typeID=const.typeFaction, factionID=self.factionID, factionName=self.factionName, enemyID=enemyID, enemyName=cfg.eveowners.Get(enemyID).name, enemyAllyID=enemyAllyID, enemyAllyName=cfg.eveowners.Get(enemyAllyID).name)
     uicontrols.EveLabelLarge(parent=firstLine, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL, left=iconSize + 20, text=text)
     secondLine = uiprimitives.Container(parent=leftCont, align=uiconst.TOTOP_PROP, height=0.6, padLeft=20)
     logo = uicls.LogoIcon(itemID=self.factionID, parent=secondLine, align=uiconst.CENTERLEFT, size=iconSize, ignoreSize=True)
     enemyID = facwarCommon.GetFactionMainEnemy(self.factionID)
     labelCont = uicontrols.ContainerAutoSize(parent=secondLine, align=uiconst.CENTERLEFT, left=iconSize + 20)
     rank, rankDesc = self.GetCurrentRank()
     timeServed = self.GetTimeServed()
     text = localization.GetByLabel('UI/FactionWarfare/FWPlayerHeader2', rank=rank, corp=cfg.eveowners.Get(session.corpid).name, faction=self.factionName, time=timeServed)
     uicontrols.EveLabelMedium(parent=labelCont, text=text, tabs=[100])
     firstLine = uiprimitives.Container(name='firstLine', parent=rightCont, align=uiconst.TOTOP, height=80)
     secondLine = uiprimitives.Container(name='secondLine', parent=rightCont, align=uiconst.TOTOP, height=40, top=3)
     totalPointsCont = uiprimitives.Container(parent=firstLine, pos=(0, 30, 55, 30), align=uiconst.TOPLEFT, state=uiconst.UI_NORMAL, hint=localization.GetByLabel('UI/FactionWarfare/WarzoneProgress', points=self.warZoneInfo.factionPoints, pointsTotal=int(self.warZoneInfo.maxWarZonePoints)))
     uicontrols.EveLabelSmall(parent=totalPointsCont, text=localization.GetByLabel('UI/FactionWarfare/Points'), align=uiconst.CENTERTOP, top=-15)
     uicontrols.Frame(bgParent=totalPointsCont, color=(0.392, 0.635, 0.212, 0.2))
     uicontrols.GradientSprite(bgParent=totalPointsCont, rotation=-pi / 2, rgbData=[(0, (0.239, 0.42, 0.235)), (1, (0.075, 0.157, 0.086))], alphaData=[(0, 1.0), (1, 0.9)])
     self.totalPointsLabel = uicontrols.EveCaptionMedium(parent=totalPointsCont, align=uiconst.CENTER, text=self.warZoneInfo.factionPoints)
     systemsCont = uiprimitives.Container(parent=firstLine, align=uiconst.TOPLEFT, pos=(65, 5, 50, 100), state=uiconst.UI_NORMAL, hint=localization.GetByLabel('UI/FactionWarfare/NumConqueredSystems'))
     uiprimitives.Sprite(parent=systemsCont, align=uiconst.CENTERTOP, state=uiconst.UI_DISABLED, pos=(0, 0, 32, 32), texturePath='res:/UI/Texture/WindowIcons/systems.png')
     numSystems = len(sm.GetService('facwar').GetSolarSystemsOccupiedByFactions([self.factionID]))
     self.numSystemsLabel = uicontrols.EveHeaderLarge(parent=systemsCont, align=uiconst.CENTERTOP, top=30, text=numSystems)
     numUpgrades = self.GetSystemUpgradeNumbers()
     for i, num in enumerate(numUpgrades):
         if num:
             bgColor = util.Color.GetGrayRGBA(0.5, 0.5)
         else:
             bgColor = util.Color.GetGrayRGBA(0.2, 0.5)
         cont = uiprimitives.Container(parent=secondLine, bgColor=bgColor, align=uiconst.TOLEFT, state=uiconst.UI_NORMAL, width=35, padTop=15, padRight=4, hint=localization.GetByLabel('UI/FactionWarfare/UpgradeLevelHint', level=util.IntToRoman(i + 1)))
         uicontrols.EveLabelMedium(parent=cont, align=uiconst.CENTERTOP, text=util.IntToRoman(i + 1), top=-20)
         uicontrols.EveHeaderLarge(parent=cont, align=uiconst.CENTER, text=num)
示例#18
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.vgsUiController = attributes.vgsUiController
     self.offer = attributes.offer
     self.align = uiconst.TOALL
     fullWidth, fullHeight = self.GetAbsoluteSize()
     self.backgroundBottomContainer = uicontrols.ContainerAutoSize(
         parent=self,
         name='backgroundBottomContainer',
         align=uiconst.TOBOTTOM_NOPUSH,
         state=uiconst.UI_PICKCHILDREN,
         width=fullWidth)
     self.backgroundTopContainer = Container(parent=self,
                                             name='backgroundTopContainer',
                                             align=uiconst.TOBOTTOM,
                                             state=uiconst.UI_PICKCHILDREN,
                                             height=fullHeight,
                                             width=fullWidth)
     self.offerContainer = Container(parent=self.backgroundTopContainer,
                                     name='offerContainer',
                                     state=uiconst.UI_NORMAL,
                                     align=uiconst.CENTER,
                                     width=CONTAINER_WIDTH,
                                     height=TOP_PANEL_HEIGHT +
                                     BOTTOM_PANEL_HEIGHT,
                                     bgColor=BACKGROUND_COLOR)
     Fill(bgParent=self.offerContainer,
          color=FRAME_COLOR,
          padding=[-FRAME_WIDTH] * 4,
          fillCenter=True)
     ExitButton(parent=self.offerContainer,
                align=uiconst.TOPRIGHT,
                onClick=self.CloseOffer,
                top=EXIT_BUTTON_PADDING,
                left=EXIT_BUTTON_PADDING)
     self.preview = VgsOfferPreview(parent=self.offerContainer,
                                    align=uiconst.TOTOP,
                                    height=TOP_PANEL_HEIGHT,
                                    offer=self.offer)
     self.CreateBottomLayout(self.offer, attributes.aurumBalance)
     self.CreateFakeRedeemPanel()
示例#19
0
 def ConstructNewFWPlayerHeader(self):
     self.topCont.Flush()
     iconSize = 50
     firstLine = uiprimitives.Container(parent=self.topCont, align=uiconst.TOTOP_PROP, height=0.4, padLeft=20)
     uiprimitives.Sprite(parent=firstLine, align=uiconst.CENTERLEFT, pos=(0,
      0,
      iconSize,
      iconSize), texturePath='res:/UI/Texture/Icons/FactionalWarfare_64.png')
     enemyID = facwarCommon.GetFactionMainEnemy(self.factionID)
     enemyAllyID = facwarCommon.GetFactionSecondaryEnemy(self.factionID)
     text = localization.GetByLabel('UI/FactionWarfare/NonFWPlayerHeader1', typeID=const.typeFaction, factionID=self.factionID, factionName=self.factionName, enemyID=enemyID, enemyName=cfg.eveowners.Get(enemyID).name, enemyAllyID=enemyAllyID, enemyAllyName=cfg.eveowners.Get(enemyAllyID).name)
     uicontrols.EveLabelLarge(parent=firstLine, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL, left=iconSize + 20, text=text)
     secondLine = uiprimitives.Container(parent=self.topCont, align=uiconst.TOTOP_PROP, height=0.6, padLeft=20)
     uiprimitives.Sprite(parent=secondLine, align=uiconst.CENTERLEFT, pos=(0,
      0,
      iconSize,
      iconSize), texturePath='res:/UI/Texture/WindowIcons/dogtags.png')
     enemyID = facwarCommon.GetFactionMainEnemy(self.factionID)
     labelCont = uicontrols.ContainerAutoSize(parent=secondLine, align=uiconst.CENTERLEFT, left=iconSize + 20)
     uicontrols.EveCaptionSmall(parent=labelCont, text=localization.GetByLabel('UI/FactionWarfare/FightForFaction', factionName=cfg.eveowners.Get(self.factionID).name))
     uicontrols.EveLabelMedium(state=uiconst.UI_NORMAL, parent=labelCont, top=25, text=localization.GetByLabel('UI/FactionWarfare/FightForFactionText', url='localsvc:service=facwar&method=ShowRulesOfEngagementTab'))
 def ApplyAttributes(self, attributes):
     TimerHint.ApplyAttributes(self, attributes)
     self.time.parent.Close()
     self.text.parent.Close()
     self.container = uicontrols.ContainerAutoSize(
         parent=self,
         align=uiconst.TOTOP,
         alignMode=uiconst.TOTOP,
         padding=(3 * const.defaultPadding, 2 * const.defaultPadding,
                  2 * const.defaultPadding, 2 * const.defaultPadding),
         callback=self.OnContainerResized)
     self.time = uicontrols.Label(parent=self.container,
                                  align=uiconst.TOTOP,
                                  fontsize=self.GetTimerFontSize(),
                                  color=self.timerData.color)
     self.text = uicontrols.EveLabelSmall(parent=self.container,
                                          align=uiconst.TOTOP,
                                          top=const.defaultPadding)
     self.next = uicontrols.EveLabelSmall(parent=self.container,
                                          align=uiconst.TOTOP,
                                          top=2 * const.defaultPadding,
                                          color=self.timerData.color)
示例#21
0
 def Startup(self, *args):
     listentry.Generic.Startup(self, *args)
     sm.RegisterNotify(self)
     self.sr.line.display = False
     self.portraitCont = uiprimitives.Container(name='portraitCont',
                                                parent=self,
                                                align=uiconst.TOLEFT,
                                                width=64)
     self.utilMenuCont = uiprimitives.Container(name='utilMenuCont',
                                                parent=self,
                                                align=uiconst.TORIGHT,
                                                width=28)
     self.utilMenuCont.display = False
     myTextCont = uiprimitives.Container(name='myTextCont',
                                         parent=self,
                                         align=uiconst.TOALL,
                                         padLeft=2 * const.defaultPadding,
                                         clipChildren=True)
     self.textCont = uicontrols.ContainerAutoSize(name='textCont',
                                                  parent=myTextCont,
                                                  align=uiconst.CENTERLEFT)
     self.nameLabel = uicontrols.EveLabelMedium(text='',
                                                parent=self.textCont,
                                                maxLines=1,
                                                align=uiconst.TOPLEFT,
                                                state=uiconst.UI_NORMAL)
     self.saleLabel = uicontrols.EveLabelSmall(text='',
                                               parent=self.textCont,
                                               maxLines=1,
                                               align=uiconst.TOPLEFT,
                                               top=19,
                                               state=uiconst.UI_NORMAL)
     self.availableLabel = uicontrols.EveLabelSmall(text='',
                                                    parent=self.textCont,
                                                    maxLines=1,
                                                    align=uiconst.TOPLEFT,
                                                    top=32,
                                                    state=uiconst.UI_NORMAL)
示例#22
0
 def ApplyAttributes(self, attributes):
     uicls.InfoPanelBase.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self.lastInfluence = None
     self.headerTextCont = uiprimitives.Container(name='headerTextCont', parent=self.headerCont, align=uiconst.TOALL)
     self.title = self.headerCls(name='title', text='<color=white url=localsvc:service=journal&method=ShowIncursionTab&constellationID=%d&open=1>%s</url>' % (session.constellationid, localization.GetByLabel(self.label)), parent=self.headerTextCont, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL)
     self.subTitle = uicontrols.EveHeaderMedium(name='subtitle', parent=self.headerTextCont, left=self.title.width + 4, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL, top=3)
     self.finalEncounterIcon = IncursionFinalEncounterIcon(name='finalEncounterIcon', parent=self.headerCont, align=uiconst.CENTERRIGHT, left=8)
     self.headerInfluenceBar = uicls.SystemInfluenceBar(parent=self.headerCont, state=uiconst.UI_HIDDEN, align=uiconst.TOALL, height=0, padding=(0, 6, 24, 6))
     self.headerInfluenceBar.OnClick = self.topCont.OnClick
     self.headerInfluenceBar.OnMouseEnter = self.topCont.OnMouseEnter
     self.headerInfluenceBar.OnMouseExit = self.topCont.OnMouseExit
     self.influenceBar = uicls.SystemInfluenceBar(parent=self.mainCont, padding=(0, 0, 0, 2))
     self.bottomContainer = uiprimitives.Container(name='bottomContainer', parent=self.mainCont, align=uiconst.TOTOP, height=33)
     self.severityIcon = uicontrols.Icon(name='severityIcon', parent=self.bottomContainer, align=uiconst.RELATIVE, color=COLOR_ENABLED, pos=(0, 10, 32, 32), ignoreSize=True, size=48, state=uiconst.UI_NORMAL)
     self.corpIcon = uicontrols.Icon(name='corpIcon', parent=self.bottomContainer, align=uiconst.RELATIVE, color=COLOR_ENABLED, pos=(35, 10, 32, 32), ignoreSize=True, size=48, state=uiconst.UI_NORMAL)
     iconCont = uicontrols.ContainerAutoSize(name='iconCont', parent=self.bottomContainer, align=uiconst.CENTERLEFT, pos=(70, 0, 0, 22))
     iconParams = {'align': uiconst.TOLEFT,
      'parent': iconCont,
      'color': COLOR_ENABLED,
      'width': iconCont.height,
      'padRight': 6}
     self.effects = self._GetEffectsForTale(iconParams)
     uthread.new(self.UpdateInfluenceThread)
示例#23
0
    def ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        self.MakeUnMinimizable()
        self.MakeUncollapseable()
        filter = attributes.get('filter', None)
        if filter:
            self.name, self.allOrAny, conditions = filter
            self.originalName = self.name
        else:
            self.name = ''
            self.allOrAny = RESULT_ALL
            conditions = None
            self.originalName = None
        self.entryCont = uicls.ScrollContainer(name='entryCont',
                                               parent=self.sr.main,
                                               align=uiconst.TOALL,
                                               padding=(10, 10, 10, 0))
        bottomPar = uiprimitives.Container(name='bottomPar',
                                           parent=self.sr.main,
                                           align=uiconst.TOBOTTOM,
                                           height=75,
                                           idx=0)
        uicontrols.GradientSprite(bgParent=bottomPar,
                                  rotation=-pi / 2,
                                  rgbData=[(0, (0.3, 0.3, 0.3))],
                                  alphaData=[(0, 0.3), (0.9, 0.0)])
        uiprimitives.Line(parent=bottomPar,
                          align=uiconst.TOTOP,
                          color=(0.3, 0.3, 0.3, 0.3))
        buttonCont1 = uicontrols.ContainerAutoSize(name='bottomCont1',
                                                   parent=bottomPar,
                                                   align=uiconst.CENTERTOP,
                                                   top=20,
                                                   height=20)
        buttonCont2 = uicontrols.ContainerAutoSize(name='bottomCont2',
                                                   parent=bottomPar,
                                                   align=uiconst.CENTERTOP,
                                                   top=50,
                                                   height=20)
        uicontrols.EveLabelSmall(
            parent=uiprimitives.Container(align=uiconst.TOLEFT,
                                          parent=buttonCont1,
                                          width=1),
            left=3,
            top=-14,
            text=localization.GetByLabel('UI/Inventory/Filters/Match'))
        uicontrols.Checkbox(
            parent=buttonCont1,
            text=localization.GetByLabel('UI/Inventory/Filters/All'),
            wrapLabel=False,
            groupname='allOrAny',
            align=uiconst.TOLEFT,
            checked=self.allOrAny == RESULT_ALL,
            callback=self.OnRadioButtonsChanged,
            retval=RESULT_ALL)
        self.radiButtons = uicontrols.Checkbox(
            parent=buttonCont1,
            text=localization.GetByLabel('UI/Inventory/Filters/Any'),
            wrapLabel=False,
            groupname='allOrAny',
            align=uiconst.TOLEFT,
            checked=self.allOrAny == RESULT_ANY,
            callback=self.OnRadioButtonsChanged,
            retval=RESULT_ANY)
        self.nameEdit = uicontrols.SinglelineEdit(
            name='nameEdit',
            parent=buttonCont1,
            align=uiconst.TOLEFT,
            label=localization.GetByLabel('UI/Inventory/Filters/FilterName'),
            width=120,
            padLeft=20,
            setvalue=self.name)
        uicontrols.Button(
            label=localization.GetByLabel('UI/Common/Buttons/Save'),
            parent=buttonCont2,
            align=uiconst.TOLEFT,
            func=self.Save,
            padLeft=4)
        uicontrols.Button(
            label=localization.GetByLabel('UI/Common/Buttons/Close'),
            parent=buttonCont2,
            align=uiconst.TOLEFT,
            func=self.Close,
            padLeft=4)
        if conditions:
            for condition in conditions:
                self.AddEntry(isRemovable=True, condition=condition)

        self.AddEntry(isRemovable=False)
示例#24
0
    def ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        self.MakeUnResizeable()
        self.scope = 'station'
        item = attributes.item
        isCorpItem = attributes.isCorpItem
        self.itemID = item.itemID
        self.insuranceSvc = sm.GetService('insurance')
        self.width = 500
        self.SetCaption(
            localization.GetByLabel('UI/Insurance/QuoteWindow/Title'))
        btnGroup = uicontrols.ButtonGroup(btns=[], parent=self.sr.main, idx=0)
        btnGroup.AddButton(label=localization.GetByLabel(
            'UI/Insurance/InsuranceWindow/Commands/Insure'),
                           func=self.Accept,
                           args=(item.itemID, isCorpItem),
                           isDefault=True)
        btnGroup.AddButton(
            label=localization.GetByLabel('UI/Common/Buttons/Cancel'),
            func=self.Cancel,
            isDefault=False)
        iconsSize = 64
        self.SetTopparentHeight(iconsSize + 4)
        typeIcon = uicontrols.Icon(parent=self.sr.topParent,
                                   pos=(4, 2, iconsSize, iconsSize),
                                   align=uiconst.TOPLEFT,
                                   idx=0)
        typeIcon.LoadIconByTypeID(typeID=item.typeID,
                                  size=iconsSize,
                                  ignoreSize=True)
        typeIcon.GetMenu = lambda *args: sm.GetService(
            'menu'
        ).GetMenuFormItemIDTypeID(
            item.itemID, item.typeID, invItem=item, ignoreMarketDetails=False)
        shipTextList = [evetypes.GetName(item.typeID)]
        shipInfo = cfg.evelocations.GetIfExists(item.itemID)
        if shipInfo:
            shipTextList.append(shipInfo.locationName)
        contracts = self.insuranceSvc.GetContracts()
        shipContract = contracts.get(item.itemID)
        if shipContract:
            if shipContract.ownerID in (session.corpid, session.charid):
                insuranceName = self.insuranceSvc.GetInsuranceName(
                    shipContract.fraction)
                timeDiff = shipContract.endDate - blue.os.GetWallclockTime()
                timeLeft = localization.GetByLabel('UI/Insurance/TimeLeft',
                                                   time=timeDiff)
                currentLevelText = localization.GetByLabel(
                    'UI/Insurance/QuoteWindow/CurrentLevel',
                    insuranceLevel=insuranceName,
                    timeLeft=timeLeft)
                shipTextList.append(currentLevelText)
        shipText = '<br>'.join(shipTextList)
        typeNameLabel = uicontrols.EveLabelMedium(parent=self.sr.topParent,
                                                  name='nameLabel',
                                                  align=uiconst.TOPLEFT,
                                                  text=shipText,
                                                  pos=(iconsSize + 10, 6, 0,
                                                       0))
        maxElementWidth = typeNameLabel.textwidth + typeNameLabel.left + 20
        cont = uicontrols.ContainerAutoSize(parent=self.sr.main,
                                            name='parentContainer',
                                            align=uiconst.TOTOP,
                                            padding=(const.defaultPadding, 0,
                                                     const.defaultPadding,
                                                     const.defaultPadding),
                                            alignMode=uiconst.TOTOP)
        text = localization.GetByLabel(
            'UI/Insurance/QuoteWindow/SelectInsuranceLevel')
        selectLabel = uicontrols.EveLabelMedium(parent=cont,
                                                name='nameLabel',
                                                align=uiconst.TOTOP,
                                                text=text,
                                                padLeft=0,
                                                padTop=10)
        insurancePrice = self.insuranceSvc.GetInsurancePrice(item.typeID)
        quotes = self.insuranceSvc.GetQuoteForShip(item)
        self.quotesCbs = []
        for quote in quotes:
            text = localization.GetByLabel(
                'UI/Insurance/QuoteWindow/Line',
                name=self.insuranceSvc.GetInsuranceName(quote.fraction),
                cost=localization.GetByLabel('UI/Common/Cost'),
                amount=util.FmtISK(quote.amount),
                payout=localization.GetByLabel(
                    'UI/Insurance/QuoteWindow/EstimatedPayout'),
                price=util.FmtISK(quote.fraction * insurancePrice))
            cb = uicontrols.Checkbox(text=text,
                                     parent=cont,
                                     retval=str(quote.fraction),
                                     checked=quote.fraction == 0.5,
                                     padLeft=8,
                                     padTop=2,
                                     align=uiconst.TOTOP,
                                     groupname='quotes')
            cb.quote = quote
            self.quotesCbs.append(cb)
            maxElementWidth = max(
                maxElementWidth,
                cb.padLeft + cb.sr.label.textwidth + cb.sr.label.padLeft + 20)

        cw, ch = cont.GetAbsoluteSize()
        self.height = ch + self.sr.topParent.height + 50
        self.width = maxElementWidth
        self.SetMinSize([self.width, self.height])
示例#25
0
 def ConstructBottomButtons(self):
     """
         Re-create the bottom buttons (enlist/retire me/corp/alliance)
     """
     fwSvc = sm.GetService('facwar')
     self.bottomCont.Flush()
     buttons = []
     self.factionalWarStatus = fwSvc.GetFactionalWarStatus()
     fwStatus = self.factionalWarStatus.status
     pendingFactionID = self.factionalWarStatus.factionID
     hasReqCorporationRole = session.corprole & const.corpRoleDirector == const.corpRoleDirector
     hasReqAllianceRole = hasReqCorporationRole and session.allianceid and sm.GetService('alliance').GetAlliance().executorCorpID == session.corpid
     notEnlisted = not session.warfactionid
     if notEnlisted:
         if fwStatus == const.facwarCorporationJoining and hasReqCorporationRole:
             buttons.append(('UI/FactionWarfare/WithdrawApplication',
              self.CancelApplication,
              pendingFactionID,
              None))
         else:
             isInFWStation = fwSvc.CheckStationElegibleForMilitia()
             if isInFWStation:
                 disabledTxt = None
             else:
                 disabledTxt = 'UI/FactionWarfare/EnlistDisabledHint'
             buttons.append(('UI/FactionWarfare/EnlistMe',
              self.OnEnlistMe,
              (),
              disabledTxt))
             if isInFWStation and hasReqCorporationRole:
                 disabledTxt = None
             else:
                 disabledTxt = 'UI/FactionWarfare/EnlistCorpDisabledHint'
             buttons.append(('UI/FactionWarfare/EnlistCorporation',
              self.OnEnlistMyCorp,
              (),
              disabledTxt))
             if isInFWStation and hasReqAllianceRole:
                 disabledTxt = None
             else:
                 disabledTxt = 'UI/FactionWarfare/EnlistAllianceDisabledHint'
             buttons.append(('UI/FactionWarfare/EnlistAlliance',
              self.OnEnlistMyAlliance,
              (),
              disabledTxt))
     elif util.IsNPC(session.corpid):
         if session.warfactionid:
             buttons.append(('UI/FactionWarfare/Retire',
              self.Retire,
              (),
              None))
     elif hasReqCorporationRole:
         if fwStatus == const.facwarCorporationActive:
             if session.allianceid:
                 buttons.append(('UI/FactionWarfare/RetireAlliance',
                  self.RetireAlliance,
                  pendingFactionID,
                  None))
             else:
                 buttons.append(('UI/FactionWarfare/RetireCorporation',
                  self.RetireCorp,
                  pendingFactionID,
                  None))
         elif fwStatus == const.facwarCorporationLeaving:
             buttons.append(('UI/FactionWarfare/CancelRetirement',
              self.CancelRetirement,
              pendingFactionID,
              None))
     if buttons:
         height = 54 if notEnlisted else 36
         buttonCont = uicontrols.ContainerAutoSize(parent=self.bottomCont, align=uiconst.CENTER, height=height, padding=8)
         self.bottomCont.height = height
         for label, func, args, disabledTxt in buttons:
             btn = uicontrols.Button(parent=buttonCont, align=uiconst.TOLEFT, func=func, args=args, label=localization.GetByLabel(label), padLeft=8)
             if disabledTxt:
                 btn.hint = localization.GetByLabel(disabledTxt)
                 btn.Disable()
示例#26
0
 def ApplyAttributes(self, attributes):
     uicls.InfoPanelBase.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self.lastInfluence = None
     self.headerTextCont = uiprimitives.Container(name='headerTextCont',
                                                  parent=self.headerCont,
                                                  align=uiconst.TOALL)
     self.title = self.headerCls(
         name='title',
         text=
         '<color=white url=localsvc:service=journal&method=ShowIncursionTab&constellationID=%d&open=1>%s</url>'
         % (session.constellationid, localization.GetByLabel(self.label)),
         parent=self.headerTextCont,
         align=uiconst.CENTERLEFT,
         state=uiconst.UI_NORMAL)
     self.subTitle = uicontrols.EveHeaderMedium(name='subtitle',
                                                parent=self.headerTextCont,
                                                left=self.title.width + 4,
                                                align=uiconst.CENTERLEFT,
                                                state=uiconst.UI_NORMAL,
                                                top=3)
     self.bossIcon = uicls.IncursionBossIcon(name='bossIcon',
                                             parent=self.headerCont,
                                             align=uiconst.CENTERRIGHT,
                                             left=8)
     self.headerInfluenceBar = uicls.SystemInfluenceBar(
         parent=self.headerCont,
         state=uiconst.UI_HIDDEN,
         align=uiconst.TOALL,
         height=0,
         padding=(0, 6, 24, 6))
     self.headerInfluenceBar.OnClick = self.topCont.OnClick
     self.headerInfluenceBar.OnMouseEnter = self.topCont.OnMouseEnter
     self.headerInfluenceBar.OnMouseExit = self.topCont.OnMouseExit
     self.influenceBar = uicls.SystemInfluenceBar(parent=self.mainCont,
                                                  padding=(0, 0, 0, 2))
     self.bottomContainer = uiprimitives.Container(name='bottomContainer',
                                                   parent=self.mainCont,
                                                   align=uiconst.TOTOP,
                                                   height=33)
     self.severityIcon = uicontrols.Icon(name='severityIcon',
                                         parent=self.bottomContainer,
                                         align=uiconst.RELATIVE,
                                         color=COLOR_ENABLED,
                                         pos=(0, 0, 32, 32),
                                         ignoreSize=True,
                                         size=48,
                                         state=uiconst.UI_NORMAL)
     iconCont = uicontrols.ContainerAutoSize(name='iconCont',
                                             parent=self.bottomContainer,
                                             align=uiconst.CENTERLEFT,
                                             pos=(45, 0, 0, 22))
     iconParams = {
         'align': uiconst.TOLEFT,
         'parent': iconCont,
         'color': COLOR_ENABLED,
         'width': iconCont.height,
         'padRight': 6
     }
     self.effects = [
         uiprimitives.Sprite(
             name='effectIcon_cyno',
             texturePath=
             'res:/UI/Texture/classes/InfluenceBar/effectCyno.png',
             hint=localization.GetByLabel(
                 'UI/Incursion/HUD/SystemEffectCynoHint'),
             **iconParams),
         uiprimitives.Sprite(
             name='effectIcon_tax',
             texturePath=
             'res:/UI/Texture/classes/InfluenceBar/effectTax.png',
             hint=localization.GetByLabel(
                 'UI/Incursion/HUD/SystemEffectTaxHint'),
             **iconParams),
         uiprimitives.Sprite(
             name='effectIcon_tank',
             texturePath=
             'res:/UI/Texture/classes/InfluenceBar/effectResistance.png',
             hint=localization.GetByLabel(
                 'UI/Incursion/HUD/SystemEffectTankingHint'),
             **iconParams),
         uiprimitives.Sprite(
             name='effectIcon_damage',
             texturePath=
             'res:/UI/Texture/classes/InfluenceBar/effectDamage.png',
             hint=localization.GetByLabel(
                 'UI/Incursion/HUD/SystemEffectDamageHint'),
             **iconParams)
     ]
     uthread.new(self.UpdateInfluenceThread)
示例#27
0
 def ConstructLayout(self):
     topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=138, padding=defaultPadding)
     uiprimitives.Line(parent=topCont, align=uiconst.TOBOTTOM)
     topLeftCont = uiprimitives.Container(name='topLeftCont', parent=topCont, align=uiconst.TOLEFT, width=260, padLeft=defaultPadding)
     topRightCont = uiprimitives.Container(name='topRightCont', parent=topCont, align=uiconst.TOALL)
     self.guyCont = uiprimitives.Container(name='guyCont', parent=topLeftCont, align=uiconst.TOLEFT, width=128)
     self.shipCont = uiprimitives.Container(name='shipCont', parent=topLeftCont, align=uiconst.TOLEFT, width=128)
     self.infoCont = uiprimitives.Container(name='infoCont', parent=topRightCont, align=uiconst.TOALL, padLeft=6, padRight=4, clipChildren=True)
     victimCont = uiprimitives.Container(name='victimCont', parent=self.infoCont, align=uiconst.TOTOP, height=68)
     victimNameCont = uiprimitives.Container(name='victimNameCont', parent=victimCont, align=uiconst.TOTOP, height=24, clipChildren=True)
     victimCorpCont = uiprimitives.Container(name='victimCorpCont', parent=victimCont, align=uiconst.TOALL)
     self.victimCorpLogoCont = uiprimitives.Container(name='victimCorpLogoCont', parent=victimCorpCont, align=uiconst.TOLEFT, width=32)
     self.victimAllianceLogoCont = uiprimitives.Container(name='victimAllianceLogoCont', parent=victimCorpCont, align=uiconst.TOLEFT, width=32)
     victimCorpTextCont = uiprimitives.Container(name='victimCorpTextCont', parent=victimCorpCont, align=uiconst.TOALL, padLeft=defaultPadding)
     shipCont = uiprimitives.Container(name='damageCont', parent=self.infoCont, align=uiconst.TOTOP, height=32)
     dateCont = uiprimitives.Container(name='dateCont', parent=self.infoCont, align=uiconst.TOALL)
     self.victimName = uicontrols.EveCaptionSmall(text='', parent=victimNameCont, name='victimName', state=uiconst.UI_NORMAL)
     self.victimCorpName = uicontrols.EveLabelMedium(text='', parent=victimCorpTextCont, name='victimCorpName', align=uiconst.TOTOP, state=uiconst.UI_NORMAL, top=defaultPadding)
     self.victimAllianceName = uicontrols.EveLabelMedium(text='', parent=victimCorpTextCont, name='victimAllianceName', align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
     self.shipName = uicontrols.EveLabelMedium(text='', parent=shipCont, name='shipName', state=uiconst.UI_NORMAL, autoFadeSides=True)
     self.killDate = uicontrols.EveLabelMedium(text='', parent=dateCont, name='killDate', autoFadeSides=True)
     self.locationName = uicontrols.EveLabelMedium(text='', parent=dateCont, name='locationName', top=14, state=uiconst.UI_NORMAL, autoFadeSides=True)
     infoCont = uiprimitives.Container(name='infoCont', parent=self.sr.main, align=uiconst.TOALL, padding=(defaultPadding,
      0,
      defaultPadding,
      defaultPadding))
     bottomLeftCont = uiprimitives.Container(name='bottomLeftCont', parent=infoCont, align=uiconst.TOLEFT, width=260, padLeft=defaultPadding)
     bottomRightCont = uiprimitives.Container(name='bottomRightCont', padLeft=4, parent=infoCont, align=uiconst.TOALL)
     killersCont = uiprimitives.Container(name='killersCont', parent=bottomLeftCont, align=uiconst.TOALL)
     self.killedOnBehalfCont = uiprimitives.Container(name='killedOnBehalfCont', parent=killersCont, align=uiconst.TOTOP, height=90)
     uicontrols.EveLabelLarge(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/KilledOnBehalf'), parent=self.killedOnBehalfCont, align=uiconst.TOTOP)
     self.behalfCont = KilledOnBehalfContainer(name='behalfCont', parent=self.killedOnBehalfCont, align=uiconst.TOTOP)
     self.killedOnBehalfCont.display = False
     self.involvedParties = uicontrols.EveLabelLarge(text='', parent=killersCont, name='involvedParties', align=uiconst.TOTOP)
     self.damageTaken = uicontrols.EveLabelMedium(text='', parent=killersCont, name='damageTaken', align=uiconst.TOTOP, color=(1.0, 0.0, 0.0))
     finalBlowCont = uiprimitives.Container(name='finalBlowCont', parent=killersCont, align=uiconst.TOTOP, height=84, top=8)
     uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/FinalBlow'), parent=finalBlowCont, align=uiconst.TOTOP)
     self.finalBlowCont = KillerContainer(name='topKiller', parent=finalBlowCont, align=uiconst.TOTOP)
     topDamageCont = uiprimitives.Container(name='topDamageCont', parent=killersCont, align=uiconst.TOTOP, height=94, top=12)
     uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/TopDamage'), parent=topDamageCont, align=uiconst.TOTOP)
     self.topDamageCont = KillerContainer(name='topDamageCont', parent=topDamageCont, align=uiconst.TOTOP)
     self.killersScrollLine = uiprimitives.Line(parent=killersCont, align=uiconst.TOTOP, padBottom=6)
     self.killersScroll = uicls.ScrollContainer(name='killersScroll', parent=killersCont, align=uiconst.TOALL, alignMode=uiconst.TOTOP)
     self.loadingWheel = uicls.LoadingWheel(parent=killersCont, align=uiconst.CENTER, state=uiconst.UI_DISABLED, idx=0, top=50)
     self.loadingWheel.display = False
     itemsCont = uiprimitives.Container(name='itemsCont', parent=bottomRightCont, align=uiconst.TOALL)
     topItemsCont = uiprimitives.Container(name='topItemsCont', parent=itemsCont, align=uiconst.TOTOP, height=16, padBottom=defaultPadding)
     self.savefittingBtn = uicontrols.Button(label=localization.GetByLabel('UI/Corporations/Wars/Killmails/SaveFitting'), parent=topItemsCont, align=uiconst.TOPRIGHT, func=self.SaveFitting)
     uicontrols.EveLabelLarge(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/FittingAndContent'), parent=topItemsCont, name='fittingLabel', align=uiconst.TOPLEFT)
     bottomItemsCont = uicontrols.ContainerAutoSize(name='bottomItemsCont', parent=itemsCont, align=uiconst.TOBOTTOM)
     allItemsCont = uiprimitives.Container(name='allItemsCont', parent=itemsCont, align=uiconst.TOALL)
     self.itemsScroll = uicontrols.Scroll(name='itemsScroll', parent=allItemsCont)
     totalLossCont = uiprimitives.Container(name='totalLossCont', parent=bottomItemsCont, align=uiconst.TOTOP, height=24)
     uicontrols.EveLabelLarge(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/TotalWorth'), parent=totalLossCont, name='totalWorth', align=uiconst.TOPLEFT, top=2)
     self.totalWorthLabel = uicontrols.EveLabelLarge(text='', parent=totalLossCont, name='totalWorthLabel', align=uiconst.TOPRIGHT, top=2)
     self.totalPayoutCont = uicontrols.ContainerAutoSize(name='totalPayoutCont', parent=bottomItemsCont, align=uiconst.TOTOP)
     self.pendCont = uiprimitives.Container(name='pendCont', parent=self.totalPayoutCont, align=uiconst.TOTOP, height=14)
     uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/PendInsurance'), parent=self.pendCont, name='totalLoss', align=uiconst.BOTTOMLEFT)
     self.pendLabel = uicontrols.EveLabelSmall(text='', parent=self.pendCont, name='pendLabel', align=uiconst.BOTTOMRIGHT, color=(1.0, 0.0, 0.0))
     self.lpCont = uiprimitives.Container(name='lpCont', parent=self.totalPayoutCont, align=uiconst.TOTOP, height=14)
     uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/LPPaidOut'), parent=self.lpCont, name='totalLP', align=uiconst.BOTTOMLEFT)
     self.totalLPLabel = uicontrols.EveLabelSmall(text='', parent=self.lpCont, name='totalLPLabel', align=uiconst.BOTTOMRIGHT, color=(0.0, 1.0, 0.0))
     self.lpCont.display = False
     self.bountyCont = uiprimitives.Container(name='bountyCont', parent=self.totalPayoutCont, align=uiconst.TOTOP, height=14, display=False)
     uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Corporations/Wars/Killmails/BountyPaidOut'), parent=self.bountyCont, name='totalBounty', align=uiconst.BOTTOMLEFT)
     self.totalBountyLabel = uicontrols.EveLabelSmall(text='', parent=self.bountyCont, name='totalBountyLabel', align=uiconst.BOTTOMRIGHT, color=(0.0, 1.0, 0.0))
     self.bountyCont.display = False
示例#28
0
 def Layout(self):
     self.MakeUnMinimizable()
     self.HideHeader()
     self.MakeUnResizeable()
     self.container = uicontrols.ContainerAutoSize(
         parent=self.GetMainArea(),
         align=uiconst.TOTOP,
         alignMode=uiconst.TOTOP,
         state=uiconst.UI_PICKCHILDREN,
         padding=(self.PADDING, self.PADDING, self.PADDING, self.PADDING),
         callback=self.OnContainerResized)
     uicontrols.EveLabelLargeBold(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel('UI/Medical/Clone/HomeStation'))
     uicontrols.EveLabelMedium(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel(
             'UI/Medical/Clone/HomeStationDescription'),
         color=self.GRAY_COLOR,
         padding=(0, 0, 0, 15))
     uiprimitives.Line(parent=self.container,
                       align=uiconst.TOTOP,
                       color=self.LINE_COLOR)
     self.local = uicontrols.ContainerAutoSize(
         parent=self.container,
         align=uiconst.TOTOP,
         alignMode=uiconst.TOTOP,
         state=uiconst.UI_PICKCHILDREN)
     self.remoteTitle = uicontrols.EveLabelLargeBold(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel(
             'UI/Medical/Clone/CorporationOffices'),
         padding=(0, 15, 0, 0),
         state=uiconst.UI_DISABLED)
     self.remoteText = uicontrols.EveLabelMedium(
         parent=self.container,
         align=uiconst.TOTOP,
         text=localization.GetByLabel(
             'UI/Medical/Clone/CorporationOfficesDescription'),
         color=self.GRAY_COLOR,
         padding=(0, 0, 0, 0),
         state=uiconst.UI_DISABLED)
     self.remoteTimer = uicontrols.EveLabelMedium(parent=self.container,
                                                  align=uiconst.TOTOP,
                                                  text='',
                                                  color=self.GRAY_COLOR,
                                                  padding=(0, 0, 0, 15),
                                                  state=uiconst.UI_DISABLED)
     self.remote = uicls.ScrollContainer(parent=self.container,
                                         align=uiconst.TOTOP,
                                         alignMode=uiconst.TOTOP,
                                         state=uiconst.UI_PICKCHILDREN)
     self.closeButton = uicontrols.Button(
         parent=self.container,
         label=localization.GetByLabel('UI/Generic/Cancel'),
         func=self.Close,
         align=uiconst.TOTOP,
         fontsize=13,
         padding=(220, 10, 220, 0))
     uicore.animations.FadeTo(self.container,
                              startVal=0.0,
                              endVal=1.0,
                              duration=0.5)