Ejemplo n.º 1
0
 def ConstructPanelExpanderBtn(self):
     if self.IsLeftPanelExpanded():
         texturePath = 'res:/UI/Texture/Icons/73_16_196.png'
         tooltipName = 'CollapseSidePane'
     else:
         texturePath = 'res:/UI/Texture/Icons/73_16_195.png'
         tooltipName = 'ExpandSidePane'
     self.toggleLeftBtn = ButtonIcon(texturePath=texturePath,
                                     parent=self.overlayCont,
                                     align=uiconst.CENTERLEFT,
                                     pos=(2, 0, 16, 16),
                                     func=self.ToggleLeftPanel)
     SetFittingTooltipInfo(self.toggleLeftBtn,
                           tooltipName=tooltipName,
                           includeDesc=False)
     if self.IsRightPanelExpanded():
         texturePath = 'res:/UI/Texture/Icons/73_16_195.png'
         tooltipName = 'CollapseSidePane'
     else:
         texturePath = 'res:/UI/Texture/Icons/73_16_196.png'
         tooltipName = 'ExpandSidePane'
     self.toggleRightBtn = ButtonIcon(texturePath=texturePath,
                                      parent=self.overlayCont,
                                      align=uiconst.CENTERRIGHT,
                                      pos=(2, 0, 16, 16),
                                      func=self.ToggleRight)
     SetFittingTooltipInfo(self.toggleRightBtn,
                           tooltipName=tooltipName,
                           includeDesc=False)
Ejemplo n.º 2
0
 def ApplyAttributes(self, attributes):
     self.iconCont = None
     TreeViewEntry.ApplyAttributes(self, attributes)
     self.iconCont = ContainerAutoSize(parent=self.topRightCont,
                                       align=uiconst.CENTERLEFT,
                                       height=16)
     self.fleetAccessBtn = ButtonIcon(
         name='fleetAccessBtn',
         parent=self.iconCont,
         align=uiconst.TOLEFT,
         width=14,
         iconSize=14,
         texturePath='res:/UI/Texture/classes/Inventory/fleetAccess.png',
         func=self.OnFleetAccessBtn,
         colorSelected=COLOR_SELECTED)
     self.corpAccessBtn = ButtonIcon(
         name='corpAccessBtn',
         parent=self.iconCont,
         align=uiconst.TOLEFT,
         width=14,
         padLeft=1,
         iconSize=12,
         texturePath='res:/UI/Texture/classes/Inventory/corpAccess.png',
         func=self.OnCorpAccessBtn,
         colorSelected=COLOR_SELECTED)
     self.UpdateFleetIcon()
     self.UpdateCorpIcon()
Ejemplo n.º 3
0
 def ApplyAttributes(self, attributes):
     ContainerAutoSize.ApplyAttributes(self, attributes)
     self.settingsID = attributes.settingsID
     self.controller = attributes.controller
     self.viewMode = settings.user.ui.Get(self.settingsID, VIEWMODE_ICONLIST)
     self.btnViewModeIconList = ButtonIcon(texturePath='res:/UI/Texture/Icons/38_16_189.png', parent=self, align=uiconst.TOLEFT, width=self.height, func=self.SetViewModeIconList, hint=localization.GetByLabel('UI/Inventory/Details'))
     self.btnViewModeList = ButtonIcon(texturePath='res:/UI/Texture/Icons/38_16_190.png', parent=self, align=uiconst.TOLEFT, width=self.height, func=self.SetViewModeList, hint=localization.GetByLabel('UI/Inventory/List'))
     self.SetViewMode(self.viewMode)
Ejemplo n.º 4
0
 def ShowNumericControls(self):
     if self.numericControlsCont:
         return
     self.numericControlsCont = Container(name='numericControlsCont', parent=self, align=uiconst.TORIGHT, idx=0, width=10, padding=(0, 1, 1, 1), opacity=0.75)
     self.upButton = ButtonIcon(name='upButton', parent=self.numericControlsCont, align=uiconst.CENTER, pos=(0, -4, 9, 9), iconSize=7, texturePath='res:/UI/Texture/Shared/up.png')
     self.upButton.OnMouseDown = self.OnNumericUpButtonMouseDown
     self.upButton.OnMouseUp = self.OnNumericUpButtonMouseUp
     self.downButton = ButtonIcon(name='downButton', parent=self.numericControlsCont, align=uiconst.CENTER, pos=(0, 4, 9, 9), iconSize=7, texturePath='res:/UI/Texture/Shared/down.png')
     self.downButton.OnMouseDown = self.OnNumericDownButtonMouseDown
     self.downButton.OnMouseUp = self.OnNumericDownButtonMouseUp
Ejemplo n.º 5
0
 def ApplyAttributes(self, attributes):
     DockablePanel.ApplyAttributes(self, attributes)
     self.showRangeIndicator = sm.GetService(
         'tactical').IsTacticalOverlayActive()
     self.mapView = MapViewSolarSystem(
         parent=self.GetMainArea(),
         showInfobox=False,
         navigationPadding=(0, 0, 0, 0),
         navigationClass=MapViewScannerNavigation,
         mapViewID=self.mapViewID,
         showSolarSystemNebula=False,
         showStarfield=False,
         showDebugInfo=False,
         sceneBlendMode=None,
         stackMarkers=True)
     sceneOptionsContainer = Container(parent=self.toolbarContainer,
                                       align=uiconst.CENTERLEFT,
                                       width=100,
                                       height=32,
                                       left=4,
                                       idx=0)
     from eve.client.script.ui.shared.mapView.mapViewSettings import MapViewMarkersSettingButton
     self.markersSettingButton = MapViewMarkersSettingButton(
         parent=sceneOptionsContainer,
         callback=self.OnMarkersSettingChanged,
         mapViewID=self.mapViewID,
         align=uiconst.TOPLEFT,
         left=2,
         top=2)
     focusSelf = ButtonIcon(
         parent=sceneOptionsContainer,
         pos=(26, 2, 26, 26),
         iconSize=16,
         func=self.OnFocusSelf,
         hint=localization.GetByLabel('UI/Map/FocusCurrentLocation'),
         texturePath='res:/UI/Texture/classes/MapView/focusIcon.png',
         align=uiconst.TOPLEFT)
     focusSelf.tooltipPointer = uiconst.POINT_TOP_1
     self.dScanOptions = ButtonIcon(
         parent=sceneOptionsContainer,
         pos=(50, 2, 26, 26),
         iconSize=16,
         texturePath='res:/UI/Texture/classes/MapView/dScanIcon.png',
         align=uiconst.TOPLEFT)
     self.dScanOptions.tooltipPointer = uiconst.POINT_TOP_1
     self.dScanOptions.LoadTooltipPanel = self.LoadDScanTooltipPanel
     uthread.new(self.LoadSolarSystem)
     if uicore.cmd.IsUIHidden():
         self.OnHideUI()
Ejemplo n.º 6
0
 def ApplyAttributes(self, attributes):
     MouseInsideScrollEntry.ApplyAttributes(self, attributes)
     node = attributes.node
     self.controller = node.controller
     isNormal = node.isNormal
     self.groupID = node.groupInfo.groupID
     self.ChangeSignalConnection(connect=True)
     self.ConstructHiliteFill()
     membershipType = node.groupInfo.membershipType
     if membershipType == MEMBERSHIP_TYPE_ADMIN:
         fillOpacity = ADMIN_OPACITY
     else:
         fillOpacity = OTHER_MEMBERSHIPTYPE_OPACITY
     self.bgFill = FillThemeColored(
         name='bgFill',
         bgParent=self,
         padding=(1, 1, 1, 1),
         colorType=uiconst.COLORTYPE_UIBASECONTRAST,
         opacity=fillOpacity)
     self.groupNameLabel = EveLabelLarge(name='groupName',
                                         parent=self,
                                         left=10,
                                         align=uiconst.CENTERLEFT)
     texturePath = 'res:/UI/Texture/Icons/73_16_50.png'
     self.optionIcon = ButtonIcon(name='MyButtonIcon',
                                  parent=self,
                                  align=uiconst.TOPRIGHT,
                                  pos=(2, 2, 16, 16),
                                  iconSize=16,
                                  texturePath=texturePath,
                                  func=self.OnClickOption)
     self.optionIcon.opacity = 0.0
     if not isNormal:
         self.opacity = 0.1
Ejemplo n.º 7
0
 def CreateWindow(self):
     self.capitalSystemInfo = sm.GetService('alliance').GetCapitalSystemInfo()
     self.systems = sm.RemoteSvc('stationSvc').GetSystemsForAlliance(session.allianceid)
     alliance = sm.GetService('alliance').GetAlliance()
     self.isExecDirector = self._IsDirectorInExecCorp(alliance.executorCorpID)
     infoCont = ContainerAutoSize(parent=self, align=uiconst.TOTOP, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      0))
     topCont = Container(parent=infoCont, height=42, align=uiconst.TOTOP)
     FillThemeColored(parent=topCont, colorType=uiconst.COLORTYPE_UIHEADER, opacity=0.15)
     texturePath = 'res:/ui/Texture/classes/Sov/capitalSystem.png'
     Sprite(name='capitalIcon', parent=topCont, texturePath=texturePath, width=32, height=32, align=uiconst.CENTERLEFT, left=4)
     EveLabelLarge(text=GetByLabel('UI/Sovereignty/AllianceCapital'), parent=topCont, align=uiconst.CENTERLEFT, left=42, top=-8)
     EveLabelSmall(text=GetByLabel('UI/Sovereignty/SelectCapitalSystemDescription'), parent=topCont, align=uiconst.CENTERLEFT, left=42, top=8)
     currentSystemCont = Container(parent=infoCont, height=24, align=uiconst.TOTOP)
     self.currentCapitalLabel = EveLabelMedium(text='', left=4, parent=currentSystemCont, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL)
     self.capitalLabel = EveLabelMedium(text=GetByLabel('UI/Sovereignty/CurrentCapital'), left=22, parent=currentSystemCont, align=uiconst.CENTERRIGHT)
     self.capitalSprite = Sprite(name='capitalIcon', parent=currentSystemCont, texturePath='res:/ui/Texture/classes/Sov/CapitalStarSelection.png', width=16, height=16, align=uiconst.CENTERRIGHT, left=4)
     self.SetDisplayOfCapitalLabelAndIcon(False)
     self.futureSystemCont = Container(parent=infoCont, height=24, align=uiconst.TOTOP)
     self.futureSystemLabel = EveLabelMedium(text='', left=4, parent=self.futureSystemCont, align=uiconst.CENTERLEFT)
     self.futureSystemTime = EveLabelMedium(text='', left=4, parent=self.futureSystemCont, align=uiconst.CENTERRIGHT)
     self.removeBtn = ButtonIcon(texturePath='res:/UI/Texture/Icons/73_16_210.png', pos=(4, 0, 16, 16), align=uiconst.CENTERRIGHT, parent=self.futureSystemCont, idx=0, func=self.RemoveCapital, hint=GetByLabel('UI/Common/Buttons/Cancel'))
     self.removeBtn.display = False
     if self.isExecDirector:
         self.removeBtn.display = True
         self.futureSystemTime.left = 22
     self.futureSystemCont.display = False
     self.claimedSystems = ClaimedSystemsDashboard(parent=self, padTop=const.defaultPadding)
     self.claimedSystems.CreateWindow()
     self.UpdateCapitalInfo()
Ejemplo n.º 8
0
 def ConstructGhostFittingSwitch(self):
     texturePath = 'res:/UI/Texture/classes/Fitting/iconSimulatorToggle.png'
     iconSize = 32
     switchCont = Container(parent=self.overlayCont,
                            state=uiconst.UI_PICKCHILDREN,
                            align=uiconst.TOPLEFT,
                            pos=(const.defaultPadding, const.defaultPadding,
                                 100, 32))
     modeOptions = [(GetByLabel('UI/Fitting/FittingWindow/ModuleMode'),
                     SIMULATION_MODULES),
                    (GetByLabel('UI/Fitting/FittingWindow/SkillMode'),
                     SIMULATION_SKILLS)]
     currentMode = sm.GetService('ghostFittingSvc').GetSimulationMode()
     self.ghostFittingSwitch = ButtonIcon(texturePath=texturePath,
                                          parent=switchCont,
                                          align=uiconst.CENTERLEFT,
                                          pos=(0, 0, iconSize, iconSize),
                                          func=self.ToggleGhostFitting,
                                          iconSize=iconSize)
     left = self.ghostFittingSwitch.left + self.ghostFittingSwitch.width
     self.simulateLabel = EveLabelMedium(parent=switchCont,
                                         text='Simulate',
                                         align=uiconst.CENTERLEFT,
                                         left=left)
     self.simulationMode = Combo(
         label='',
         parent=switchCont,
         options=modeOptions,
         name='simulationMode',
         select=int(currentMode == SIMULATION_SKILLS),
         callback=self.OnSimulationModeChanged,
         align=uiconst.CENTERLEFT,
         left=left)
     isSimulated = sm.GetService('fittingSvc').IsShipSimulated()
     self.ChangeSimulateUIstate(isSimulated)
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.jobData = attributes.jobData
     self.oldJobData = None
     self.pattern = Frame(
         parent=self,
         texturePath=
         'res:/UI/Texture/Classes/Industry/Output/boxPattern.png',
         align=TOALL,
         state=UI_DISABLED,
         opacity=0.0,
         cornerSize=5)
     FrameThemeColored(parent=self,
                       state=UI_DISABLED,
                       align=TOALL,
                       opacity=0.3)
     FillThemeColored(bgParent=self, opacity=0.5)
     self.contentCont = Container(name='contentCont', parent=self)
     self.errorFrame = ErrorFrame(bgParent=self, padding=1)
     self.openInventoryBtn = ButtonIcon(
         name='openInventoryBtn ',
         parent=self,
         align=uiconst.TOPRIGHT,
         pos=(1, 1, 21, 21),
         iconSize=16,
         texturePath='res:/UI/Texture/Vgs/Search_icon.png',
         func=self.OnOpenInventoryBtn)
     self.UpdateState()
     self.AnimEntry()
Ejemplo n.º 10
0
 def ApplyAttributes(self, attributes):
     LayoutGrid.ApplyAttributes(self, attributes)
     self.columns = 4
     self.buttonIconByGroupKey = {}
     self.onSettingsChangedCallback = attributes.onSettingsChangedCallback
     self.mapViewID = attributes.mapViewID
     MapViewCheckboxOptionButton(
         parent=self,
         settingGroupKeys=(VIEWMODE_LAYOUT_SETTINGS,
                           VIEWMODE_LINES_SETTINGS,
                           VIEWMODE_LAYOUT_SHOW_ABSTRACT_SETTINGS),
         callback=self.OnSettingsChanged,
         mapViewID=self.mapViewID)
     MapViewColorModeSettingButton(parent=self,
                                   settingGroupKey=VIEWMODE_COLOR_SETTINGS,
                                   callback=self.OnSettingsChanged,
                                   mapViewID=self.mapViewID)
     MapViewMarkersSettingButton(parent=self,
                                 callback=self.OnSettingsChanged,
                                 mapViewID=self.mapViewID)
     focusSelf = ButtonIcon(
         parent=self,
         width=26,
         height=26,
         iconSize=16,
         func=self.FocusSelf,
         hint=localization.GetByLabel('UI/Map/FocusCurrentLocation'),
         texturePath='res:/UI/Texture/classes/MapView/focusIcon.png')
     focusSelf.tooltipPointer = uiconst.POINT_TOP_1
Ejemplo n.º 11
0
 def LoadActionButtons(self, buttons):
     iconSize = 32
     w = self.width - 6
     maxIcons = 7.0
     n = float(len(buttons))
     pad = 5 + 1 * iconSize * (1.0 - n / maxIcons)
     w -= 2 * pad
     space = (w - n * iconSize) / n
     self.buttonCont.columns = len(buttons)
     for i, b in enumerate(buttons):
         iconPath, cerberusPath = planetCommonUI.PANELDATA[b.id]
         panelName = localization.GetByLabel(cerberusPath)
         if i == 0:
             self.defaultPanel = b.panelCallback
             self.defaultPanelID = b.id
         cont = Container(name=panelName, parent=self.buttonCont)
         ib = ButtonIcon(texturePath=iconPath,
                         parent=cont,
                         align=uiconst.CENTER,
                         name=panelName,
                         hint=b.Get('hint', ''),
                         width=iconSize,
                         height=iconSize,
                         iconSize=iconSize,
                         func=self._OnIconButtonClicked,
                         args=(b.panelCallback, b.id))
         ib.OnMouseEnter = (self.OnIconButtonMouseEnter, ib)
         ib.OnMouseExit = (self.OnIconButtonMouseExit, ib)
Ejemplo n.º 12
0
 def ConstructNormal(self, blinkAchievementID=None):
     if not self.achievementContent or self.achievementContent.destroyed:
         self.mainCont.Flush()
         self.achievementContent = ContainerAutoSize(
             parent=self.mainCont,
             name='achievementContent',
             align=uiconst.TOTOP,
             alignMode=uiconst.TOTOP)
         grid = LayoutGrid(parent=self.mainCont,
                           align=uiconst.TOTOP,
                           columns=2,
                           opacity=0.0)
         button = ButtonIcon(
             texturePath=
             'res:/ui/Texture/Classes/InfoPanels/opportunitiesTreeIcon.png',
             align=uiconst.TOPLEFT,
             iconSize=16,
             parent=grid,
             func=self.OpenOpportunitiesTree,
             pos=(0, 0, 16, 16))
         subTextLabel = InfoPanelLabel(parent=grid,
                                       align=uiconst.CENTERLEFT,
                                       text='See all opportunities',
                                       state=uiconst.UI_NORMAL,
                                       fontsize=EVE_SMALL_FONTSIZE,
                                       bold=True,
                                       left=4)
         subTextLabel.OnClick = self.OpenOpportunitiesTree
         uicore.animations.FadeIn(grid)
     groupID = sm.GetService('achievementSvc').GetActiveAchievementGroupID()
     self.LoadContent(groupID, blinkAchievementID=blinkAchievementID)
Ejemplo n.º 13
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     if attributes.mapView:
         self.mapView = weakref.ref(attributes.mapView)
     self.icon = ButtonIcon(
         parent=self,
         align=uiconst.CENTERRIGHT,
         texturePath='res:/UI/Texture/Icons/searchMagnifyingGlass.png',
         pos=(0, 0, 24, 24),
         state=uiconst.UI_NORMAL,
         iconSize=24)
     self.icon.OnClick = self.ClickIcon
     self.searchFor = [
         const.searchResultConstellation, const.searchResultSolarSystem,
         const.searchResultRegion, const.searchResultStation
     ]
     searchInput = SearchInput(
         name='MapViewSearchEdit',
         parent=self,
         align=uiconst.TOPRIGHT,
         width=0,
         maxLength=64,
         GetSearchEntries=self.GetSearchData,
         OnSearchEntrySelected=self.OnSearchEntrySelected,
         OnReturn=self.OnSearchInputConfirm,
         OnResultMenuClosed=self.OnResultMenuClosed,
         hinttext=GetByLabel('UI/Common/Buttons/Search'),
         opacity=0.0,
         setvalue=settings.char.ui.Get('mapView_searchString', None))
     searchInput.searchResultVisibleEntries = 10
     searchInput.SetHistoryVisibility(False)
     searchInput.OnFocusLost = self.OnSearchFocusLost
     self.searchInput = searchInput
Ejemplo n.º 14
0
 def ApplyAttributes(self, attributes):
     LayoutGridRow.ApplyAttributes(self, attributes)
     self.callback = attributes.callback
     self.buttonID = attributes.buttonID
     self.icon = ButtonIcon(pos=(0, 0, 16, 16), texturePath=attributes.texturePath, state=uiconst.UI_DISABLED)
     self.AddCell(cellObject=self.icon, cellPadding=(3, 2, 3, 2))
     label = EveLabelMedium(text=attributes.label, align=uiconst.CENTERLEFT)
     self.AddCell(cellObject=label, cellPadding=(0, 1, 6, 1))
     self.highLight = Fill(bgParent=self, color=(1, 1, 1, 0.1), state=uiconst.UI_HIDDEN)
Ejemplo n.º 15
0
    def Prepare_HeaderButtons_(self):
        self.sr.headerButtons = ContainerAutoSize(
            name='headerButtons',
            state=uiconst.UI_PICKCHILDREN,
            align=uiconst.TOPRIGHT,
            parent=self.sr.maincontainer,
            pos=(4, 4, 0, 16),
            idx=0)
        isStack = isinstance(self, self.GetStackClass())
        if isStack:
            closeHint = localization.GetByLabel(
                'UI/Control/EveWindow/CloseStack')
            minimizeHint = localization.GetByLabel(
                'UI/Control/EveWindow/MinimizeStack')
        else:
            closeHint = localization.GetByLabel('UI/Common/Buttons/Close')
            minimizeHint = localization.GetByLabel(
                'UI/Control/EveWindow/Minimize')
        helpHint = localization.GetByLabel('UI/Control/EveWindow/Help')
        pinFunc = self.TogglePinState
        if self.IsPinned():
            pinhint = localization.GetByLabel('UI/Control/EveWindow/Unpin')
        else:
            pinhint = localization.GetByLabel('UI/Control/EveWindow/Pin')
        if self.IsCompact():
            compactHint = localization.GetByLabel(
                '/Carbon/UI/Controls/Window/DisableCompactMode')
            compactFunc = self.UnCompact
            compactIcon = 'res:/UI/Texture/icons/38_16_258.png'
        else:
            compactHint = localization.GetByLabel(
                '/Carbon/UI/Controls/Window/EnableCompactMode')
            compactFunc = self.Compact
            compactIcon = 'res:/UI/Texture/icons/38_16_259.png'
        for texturePath, name, hint, showflag, clickfunc in [
            ('res:/UI/Texture/icons/38_16_220.png', 'close', closeHint,
             self.IsKillable(), self.CloseByUser),
            ('res:/UI/Texture/icons/38_16_221.png', 'minimize', minimizeHint,
             self.IsMinimizable(), self.Minimize),
            ('res:/UI/Texture/icons/38_16_222.png', 'pin', pinhint,
             self.IsPinable(), pinFunc),
            (compactIcon, 'compact', compactHint, self.IsCompactable(),
             compactFunc)
        ]:
            if not showflag:
                continue
            btn = ButtonIcon(parent=self.sr.headerButtons,
                             align=uiconst.TORIGHT,
                             width=16,
                             texturePath=texturePath,
                             hint=hint,
                             func=clickfunc)

        self.AddCustomHeaderButtons(self.sr.headerButtons)
Ejemplo n.º 16
0
 def CheckConstructUndoButton(self):
     if self.undoButton is None:
         self.undoButton = ButtonIcon(
             parent=self.topRightCont,
             align=uiconst.CENTERRIGHT,
             left=0,
             width=17,
             height=17,
             iconSize=17,
             texturePath='res:/UI/Texture/classes/skilltrading/undo.png',
             func=self.Undo,
             hint=localization.GetByLabel('UI/SkillTrading/Undo'))
Ejemplo n.º 17
0
 def ApplyAttributes(self, attributes):
     SettingSectionHeaderBase.ApplyAttributes(self, attributes)
     self.expanderFunc = attributes.expanderFunc
     arrowTexturePath = self.GetExpandedTexture()
     left = SECTION_LABEL_LEFT - 20
     self.expandArrow = ButtonIcon(name='expandArrow',
                                   parent=self,
                                   align=uiconst.CENTERLEFT,
                                   pos=(left, 0, 16, 16),
                                   iconSize=16,
                                   texturePath=arrowTexturePath,
                                   func=self.OnExpanderClicked)
     self.addGroupBtn = ButtonIcon(
         name='addBtn',
         parent=self,
         align=uiconst.CENTERRIGHT,
         pos=(6, 0, 12, 12),
         iconSize=12,
         texturePath='res:/UI/Texture/Icons/Plus_Small.png',
         func=self.OnAddEntry)
     self.rigthCont.width = 20
     self.ChangeRightContDisplay(False)
Ejemplo n.º 18
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
     searchWidth, rotation = self.GetWidthAndRotation()
     texturePath = 'res:/UI/Texture/WindowIcons/peopleandplaces.png'
     searchIconHint = GetByLabel(
         'UI/Structures/AccessGroups/SearchButtonHint')
     self.searchIcon = ButtonIcon(name='searchIcon',
                                  parent=self,
                                  align=uiconst.CENTERRIGHT,
                                  pos=(2, 0, 24, 24),
                                  iconSize=24,
                                  texturePath=texturePath,
                                  func=self.OnSearchBtnClicked,
                                  hint=searchIconHint)
     arrowTexturePath = 'res:/UI/Texture/Icons/1_16_99.png'
     self.arrowCont = Transform(name='arrowCont',
                                parent=self,
                                pos=(24, 0, 16, 16),
                                align=uiconst.CENTERRIGHT,
                                rotation=rotation)
     self.expandArrow = ButtonIcon(name='expandArrow',
                                   parent=self.arrowCont,
                                   pos=(0, 0, 16, 16),
                                   iconSize=16,
                                   texturePath=arrowTexturePath,
                                   func=self.OnExpanderClicked)
     hintText = GetByLabel('UI/Structures/AccessGroups/SearchFieldHint')
     self.searchField = SinglelineEdit(parent=self,
                                       align=uiconst.CENTERRIGHT,
                                       pos=(40, 0, searchWidth, 0),
                                       OnReturn=self.DoSearch,
                                       hinttext=hintText,
                                       isCharCorpOrAllianceField=True)
     self.searchField.OnClearButtonClick = self.OnClearingSearchField
     self.searchField.ShowClearButton(hint=GetByLabel('UI/Inventory/Clear'))
     self.memberNamesByMemberID = {}
     self.height = max(self.searchField.height, self.searchIcon.height)
     self.width = self.searchField.left + EXPANDED_SEARCH_WIDTH + 10
Ejemplo n.º 19
0
 def OnOpenView(self):
     self.ResetSelf()
     self.state = uiconst.UI_HIDDEN
     self.hudContainer = Container(name='hudContainer', parent=self, controller=self.controller, align=uiconst.CENTERBOTTOM, width=SHIP_UI_WIDTH, height=SHIP_UI_HEIGHT)
     self.overlayContainer = Container(parent=self.hudContainer, name='overlayContainer', pos=(0, 0, 256, 256), align=uiconst.CENTER, state=uiconst.UI_PICKCHILDREN, idx=0)
     self.ConstructOverlayContainer()
     if IsControllingStructure():
         shipShape = StructureHUDShape(parent=self.hudContainer, align=uiconst.CENTER)
     else:
         shipShape = HUDShape(parent=self.hudContainer, align=uiconst.CENTER)
     self.shipuiMainShape = shipShape.shipuiMainShape
     self.capacitorContainer = CapacitorContainer(parent=self.hudContainer, align=uiconst.CENTER, top=-1, controller=self.controller)
     self.capacitorContainer.OnMouseDown = (self.OnShipMouseDown, self.capacitorContainer)
     self.capacitorContainer.OnMouseUp = (self.OnShipMouseUp, self.capacitorContainer)
     self.capacitorContainer.OnClick = self.OnToggleShipSelected
     heatPicker = Container(name='heatPicker', parent=self.hudContainer, align=uiconst.CENTER, width=160, height=160, pickRadius=43, state=uiconst.UI_NORMAL)
     self.heatGauges = HeatGauges(parent=heatPicker, align=uiconst.CENTERTOP, controller=self.controller)
     self.hpGauges = HPGauges(name='healthGauges', parent=self.hudContainer, align=uiconst.CENTER, pos=(0, -37, 148, 74), controller=self.controller)
     if IsControllingStructure():
         ReleaseControlBtn(parent=self.hudContainer, top=29, align=uiconst.CENTERBOTTOM, itemID=self.controller.GetItemID(), func=sm.GetService('structureControl').Alight)
     else:
         self.speedGauge = SpeedGauge(parent=self.hudContainer, top=29, align=uiconst.CENTERBOTTOM, controller=self.controller)
     self.compass = Compass(parent=self.hudContainer, pickRadius=-1)
     self.shipSelectHilight = Container(name='navSelectHilight', parent=self.compass, align=uiconst.CENTER, state=uiconst.UI_DISABLED, width=206, height=206)
     self.ringSprite = Sprite(bgParent=self.shipSelectHilight, texturePath='res:/UI/Texture/classes/ShipUI/Fighters/selectionRingLarge.png')
     self.bracketSprite = Sprite(bgParent=self.shipSelectHilight, texturePath='res:/UI/Texture/classes/ShipUI/Fighters/selectionBracketLarge.png')
     self.shipSelectHilight.display = False
     self.slotsContainer = SlotsContainer(parent=self.hudContainer, pos=(SLOTS_CONTAINER_LEFT,
      SLOTS_CONTAINER_TOP,
      SLOTS_CONTAINER_WIDTH,
      SLOTS_CONTAINER_HEIGHT), align=uiconst.CENTERLEFT, state=uiconst.UI_PICKCHILDREN, controller=self.controller)
     self.stanceButtons = StanceButtons(parent=self.hudContainer, pos=(SLOTS_CONTAINER_LEFT + 8,
      1,
      40,
      120), name='stanceButtons', align=uiconst.CENTERLEFT, state=uiconst.UI_PICKCHILDREN, buttonSize=36)
     self.hudButtons = HudButtonsCont(parent=self.hudContainer, align=uiconst.CENTERRIGHT, left=690, top=15)
     self.ewarCont = EwarContainer(parent=self, align=uiconst.CENTERBOTTOM, top=SHIP_UI_HEIGHT, height=EWAR_CONTAINER_HEIGHT, width=EWAR_CONTAINER_WIDTH)
     self.sr.shipAlertContainer = ShipAlertContainer(parent=self.hudContainer)
     self.sr.indicationContainer = Container(parent=self.hudContainer, name='indicationContainer', align=uiconst.CENTERTOP, pos=(0, 0, 400, 50))
     self.sr.safetyButton = SafetyButton(parent=self.overlayContainer, left=40, top=28)
     self.ConstructReadoutCont()
     self.settingsMenu = UtilMenu(menuAlign=uiconst.BOTTOMLEFT, parent=self.optionsCont, align=uiconst.TOPLEFT, GetUtilMenu=self.GetHUDOptionMenu, pos=(0, 0, 16, 16), texturePath='res:/UI/Texture/Icons/73_16_50.png', hint=GetByLabel('UI/Inflight/Options'))
     self.moduleToggleBtn = ButtonIcon(name='moduleToggleBtn', parent=self.moduleToggleCont, align=uiconst.TOPLEFT, width=24, height=24, iconSize=24, texturePath='res:/UI/Texture/classes/ShipUI/Fighters/toggleModules_Up.png', downTexture='res:/UI/Texture/classes/ShipUI/Fighters/toggleModules_Down.png', hoverTexture='res:/UI/Texture/classes/ShipUI/Fighters/toggleModules_Over.png', func=self.OnToggleHudModules)
     self.moduleToggleBtn.display = False
     self.DrawFighters()
     self.hudContainer.state = uiconst.UI_PICKCHILDREN
     self.UpdatePosition()
     self.shipuiReady = True
     self.SetupShip()
Ejemplo n.º 20
0
 def BuildRefreshInventory(self):
     self.refreshCont = Transform(parent=self.layoutGrid,
                                  pos=(0, 0, 32, 32),
                                  align=uiconst.CENTER)
     self.refreshIcon = ButtonIcon(name='refreshSprite',
                                   parent=self.refreshCont,
                                   width=32,
                                   height=32,
                                   align=uiconst.CENTER,
                                   texturePath=REFRESH_TEXTUREPATH,
                                   iconSize=32,
                                   func=self.OnRefreshClicked)
     self.refreshIcon.hint = GetByLabel(
         'UI/Fitting/FittingWindow/FittingManagement/RefreshInventoryStatusHint'
     )
Ejemplo n.º 21
0
 def Startup(self, *etc):
     ListGroup.Startup(self, *etc)
     self.overlayButton = ButtonIcon(
         name='overlayButton',
         parent=self.sr.labelClipper,
         align=uiconst.CENTERLEFT,
         width=14,
         height=14,
         iconSize=16,
         left=200,
         texturePath=
         'res://UI/Texture/classes/SensorSuite/sensor_overlay_small.png',
         func=self.OnChangeSensorOverlayVisibility,
         colorSelected=COLOR_SELECTED,
         isSelectedBgUsed=False)
Ejemplo n.º 22
0
 def ApplyAttributes(self, attributes):
     MouseInsideScrollEntry.ApplyAttributes(self, attributes)
     self.blinkBG = None
     if self.rightBtnTexturePath:
         self.rightBtn = ButtonIcon(name='optionIcon',
                                    parent=self,
                                    align=uiconst.CENTERRIGHT,
                                    pos=(2, 0, 16, 16),
                                    iconSize=16,
                                    texturePath=self.rightBtnTexturePath,
                                    func=self.OnRightBtnClicked,
                                    opacity=0.0)
         self.rightBtn.OnMouseEnter = self.OnRightBtnMouseEnter
     else:
         self.rightBtn = None
 def _ConstructControlContainer(self):
     if self.verticalAlignment is ExpandAlignmentConst.EXPAND_ALIGNMENT_VERTICAL_UP:
         controlContainerAlignment = uiconst.TOBOTTOM
     else:
         controlContainerAlignment = uiconst.TOTOP
     ctop = 0
     if self.verticalAlignment is ExpandAlignmentConst.EXPAND_ALIGNMENT_VERTICAL_DOWN:
         ctop = -self.historyHeader.height - 4
     self.controlBottomContainer = Transform(parent=self.windowunderlay, name='buttonControlContainer', align=controlContainerAlignment, height=32, width=32, top=ctop, clipChilren=False)
     buttonAlignment = uiconst.TORIGHT
     if self.horizontalAlignment is ExpandAlignmentConst.EXPAND_ALIGNMENT_HORIZONTAL_RIGHT:
         buttonAlignment = uiconst.TOLEFT
     self.widgetButton2 = ButtonIcon(name='WidgetIcon', align=buttonAlignment, width=32, height=32, iconSize=32, texturePath='res:/UI/Texture/classes/Notifications/widgetIcon.png', func=self.OnWidgetButtonClick)
     self.widgetButton2.LoadTooltipPanel = self._LoadWidgetTooltipPanel
     self.controlBottomContainer.children.append(self.widgetButton2)
     self.dragMovable = DragMovable(self.notificationContainer, buttonObject=self.widgetButton2, onDrag=self.onWidgetDrag, onDragEnter=self.onWidgetDragEnter, onDragFinished=self.onWidgetDragFinished, startPosition=(self.customX, self.customY))
Ejemplo n.º 24
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.parentFunc = attributes.parentFunc
     self.padding = (0, 2, 0, 2)
     self.item = attributes.item
     self.singleton = self.item.singleton
     self.parentEditFunc = attributes.editFunc
     self.typeID = self.item.typeID
     self.itemID = self.item.itemID
     self.invType = cfg.invtypes.Get(self.typeID)
     self.itemName = self.invType.name
     self.brokersFee = 0.0
     self.salesTax = 0.0
     self.totalSum = 0.0
     self.quote = sm.GetService('marketQuote')
     self.limits = self.quote.GetSkillLimits()
     self.stationID, officeFolderID, officeID = sm.GetService('invCache').GetStationIDOfficeFolderIDOfficeIDOfItem(self.item)
     self.located = None
     if officeFolderID is not None:
         self.located = [officeFolderID, officeID]
     station = sm.GetService('ui').GetStation(self.stationID)
     self.solarSystemID = station.solarSystemID
     self.regionID = self.GetRegionID(self.stationID)
     self.averagePrice = self.quote.GetAveragePrice(self.typeID)
     self.bestBid = self.quote.GetBestBid(self.typeID, locationID=self.solarSystemID)
     self.GetBestPrice()
     self.deltaCont = Container(parent=self, align=uiconst.TORIGHT, width=30)
     theRestCont = Container(parent=self, align=uiconst.TOALL)
     self.totalCont = Container(parent=theRestCont, align=uiconst.TORIGHT_PROP, width=0.3)
     self.priceCont = Container(parent=theRestCont, align=uiconst.TORIGHT_PROP, width=0.22)
     self.qtyCont = Container(parent=theRestCont, align=uiconst.TORIGHT_PROP, width=0.15)
     self.itemCont = Container(parent=theRestCont, align=uiconst.TORIGHT_PROP, width=0.33)
     self.deleteCont = Container(parent=self.itemCont, align=uiconst.TORIGHT, width=24)
     self.deleteButton = ButtonIcon(texturePath='res:/UI/Texture/Icons/73_16_210.png', pos=(0, 0, 16, 16), align=uiconst.CENTERRIGHT, parent=self.deleteCont, hint=GetByLabel('UI/Generic/RemoveItem'), idx=0, func=self.RemoveItem)
     self.deleteCont.display = False
     self.textCont = Container(parent=self.itemCont, align=uiconst.TOALL)
     self.errorBg = ErrorFrame(bgParent=self)
     self.DrawItem()
     self.DrawQty()
     self.DrawPrice()
     self.DrawTotal()
     self.DrawDelta()
     self.GetTotalSum()
     self.GetBrokersFee()
     self.GetSalesTax()
     self.ShowNoSellOrders()
Ejemplo n.º 25
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
     self.btnUnderlay = RaisedUnderlay(bgParent=self,
                                       isGlowEdgeRotated=True)
     self.createBtn = ButtonIcon(name='addBtn',
                                 parent=self,
                                 align=uiconst.CENTERLEFT,
                                 pos=(0, 0, 30, 30),
                                 iconSize=self.iconSize,
                                 texturePath=self.texturePath,
                                 hint=GetByLabel(self.tooltipPath),
                                 state=uiconst.UI_DISABLED)
     self.createNewLabel = EveLabelLarge(name='createNewLabel',
                                         parent=self,
                                         text='',
                                         align=uiconst.CENTERLEFT,
                                         left=34)
Ejemplo n.º 26
0
 def RenderNodeOtherFactionGroup(self, node):
     left, top = self._GetNodePosition(node)
     opacity = 0.2 if node.IsLocked() else 1.0
     texturePath = shipTreeConst.ICON_BY_FACTIONID.get(node.factionID)
     size = 64
     shipGroupData = cfg.infoBubbleGroups[node.shipGroupID]
     shipGroupName = GetByMessageID(shipGroupData['nameID'])
     ButtonIcon(
         parent=self,
         texturePath=texturePath,
         pos=(left - size / 2 + X_OFFSET, top - size / 2 + Y_OFFSET, size,
              size),
         iconSize=65,
         idx=0,
         func=self.OnOtherFactionClicked,
         args=(node, ),
         opacity=opacity,
         hint='<b>%s</b>\n%s' %
         (cfg.factions.Get(node.factionID).factionName, shipGroupName))
Ejemplo n.º 27
0
 def _ConstructSettingsButton(self):
     if self.horizontalAlignment is ExpandAlignmentConst.EXPAND_ALIGNMENT_HORIZONTAL_LEFT:
         buttonAlignment = uiconst.TOLEFT
     else:
         buttonAlignment = uiconst.TORIGHT
     self.settingsButton = ButtonIcon(
         name='MyButtonIcon2',
         parent=self.controlBottomContainer,
         align=buttonAlignment,
         width=24,
         height=24,
         iconSize=24,
         texturePath='res:/UI/Texture/Icons/77_32_30.png',
         func=self.OnSettingsClick,
         hint=localization.GetByLabel(
             'Notifications/NotificationWidget/NotificationSettingsTooltip'
         ),
         padding=(5, 0, 5, 0),
         opacity=0)
Ejemplo n.º 28
0
 def Startup(self, *etc):
     _textCont = ContainerAutoSize(parent=self,
                                   align=uiconst.TOALL,
                                   padLeft=20,
                                   padTop=4,
                                   clipChildren=True)
     self.label = EveLabelMediumBold(text='',
                                     parent=_textCont,
                                     align=uiconst.TOTOP,
                                     padRight=40)
     self.text = EveLabelMedium(text='',
                                parent=_textCont,
                                align=uiconst.TOTOP,
                                padRight=40)
     self.infoicon = ButtonIcon(left=2,
                                parent=self,
                                idx=0,
                                iconSize=32,
                                align=uiconst.CENTERRIGHT)
     self.infoicon.SetTexturePath('res:/ui/texture/icons/bigplay.png')
Ejemplo n.º 29
0
 def RenderRootNode(self, node):
     texturePath = inventorycommon.typeHelpers.GetHoloIconPath(typeCapsule)
     size = 32
     left, top = self._GetNodePosition(node)
     if self.IsInGoldenPod():
         color = COLOR_MASTERED
         typeID = const.typeCapsuleGolden
     else:
         color = (1, 1, 1, 1)
         typeID = const.typeCapsule
     btn = ButtonIcon(parent=self,
                      pos=(left - size / 2 + X_OFFSET - 6,
                           top - size / 2 - 2 + Y_OFFSET, size, size),
                      func=sm.GetService('info').ShowInfo,
                      iconSize=size,
                      args=(typeID, ),
                      texturePath=texturePath,
                      hint=evetypes.GetName(typeID),
                      iconColor=color)
     btn.icon.blendMode = trinity.TR2_SBM_ADD
Ejemplo n.º 30
0
def CreateSensorOverlayHeading():
    topEntry = Container(height=20, align=uiconst.NOALIGN)
    EveLabelMediumBold(
        parent=topEntry,
        align=uiconst.CENTERLEFT,
        text=localization.GetByLabel('UI/Inflight/Scanner/SensorOverlay'))
    button = ButtonIcon(
        name='overlayButton',
        parent=topEntry,
        align=uiconst.CENTERRIGHT,
        width=16,
        height=16,
        iconSize=16,
        texturePath=
        'res://UI/Texture/classes/SensorSuite/sensor_overlay_small.png',
        func=OnToggleOverlayActive)
    button.args = button
    SetOverlayButtonActiveState(button,
                                sm.GetService('sensorSuite').IsOverlayActive())
    return topEntry