Exemple #1
0
 def ApplyAttributes(self, attributes):
     uicontrols.ContainerAutoSize.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
     self.viewMode = None
     self.btnViewModeIcons = uicontrols.ButtonIcon(texturePath='res:/UI/Texture/Icons/38_16_188.png', parent=self, width=self.height, align=uiconst.TOLEFT, func=self.SetViewModeIcons, hint=localization.GetByLabel('UI/Inventory/Icons'))
     self.btnViewModeIconList = uicontrols.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 = uicontrols.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'))
Exemple #2
0
 def ConstructLayout(self):
     topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOTOP, height=135, clipChildren=True, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      0))
     self.loadingCont = uiprimitives.Container(name='loadingCont', parent=self.sr.main, align=uiconst.TOALL)
     self.loadingText = uicontrols.EveCaptionMedium(text='', parent=self.loadingCont, align=uiconst.CENTER)
     self.loadingCont.display = True
     self.historyCont = uiprimitives.Container(name='historyCont', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      const.defaultPadding * 2,
      const.defaultPadding,
      const.defaultPadding))
     self.historyCont.display = False
     textCont = uiprimitives.Container(name='textCont', parent=topCont, align=uiconst.TOTOP, height=35)
     self.warDateLabel = uicontrols.EveLabelMedium(text='', parent=textCont, align=uiconst.CENTER)
     self.mutualWarLabel = uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/Wars/MutualWar'), parent=textCont, align=uiconst.CENTER)
     self.mutualWarLabel.display = False
     warInfoCont = uiprimitives.Container(name='buttonCont', parent=topCont, align=uiconst.TOBOTTOM, height=33)
     self.surrenderBtn = uicontrols.ButtonIcon(name='surrenderBtn', parent=warInfoCont, align=uiconst.TOLEFT, width=24, iconSize=24, texturePath='res:/UI/Texture/Icons/Surrender_64.png', func=self.OpenSurrenderWnd)
     self.surrenderBtn.display = False
     self.allyBtn = uicontrols.ButtonIcon(name='allyBtn', parent=warInfoCont, align=uiconst.TORIGHT, width=24, iconSize=24, texturePath='res:/UI/Texture/Icons/Mercenary_64.png', func=self.OpenAllyWnd)
     warCont = uiprimitives.Container(name='warCont', parent=topCont, align=uiconst.TOALL)
     attackerCont = uiprimitives.Container(name='attackerCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.45)
     attackerLogoCont = uiprimitives.Container(name='attackerLogoCont', parent=attackerCont, align=uiconst.TORIGHT, width=64)
     self.attackerLogoDetailed = uiprimitives.Container(name='attackerLogoDetailed', parent=attackerLogoCont, align=uiconst.TOPRIGHT, width=64, height=64)
     attackerTextCont = uiprimitives.Container(name='attackerTextCont', parent=attackerCont, align=uiconst.TOALL, padding=(4, 0, 8, 4))
     self.attackerNameLabel = uicontrols.EveLabelLarge(text='', parent=attackerTextCont, align=uiconst.TOPRIGHT, state=uiconst.UI_NORMAL)
     self.attackerISKLostLabel = uicontrols.EveLabelMedium(text='', parent=attackerTextCont, align=uiconst.CENTERRIGHT, height=16)
     self.attackerShipsLostLabel = uicontrols.EveLabelMedium(text='', parent=attackerTextCont, align=uiconst.BOTTOMRIGHT)
     centerCont = uiprimitives.Container(name='centerCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.1)
     swords = uicontrols.Icon(name='warIcon', parent=centerCont, align=uiconst.CENTER, size=32, ignoreSize=True, state=uiconst.UI_NORMAL, opacity=0.3)
     swords.LoadIcon('res:/UI/Texture/WindowIcons/wars.png')
     swords.hint = localization.GetByLabel('UI/Corporations/Wars/Vs')
     defenderCont = uiprimitives.Container(name='defenderCont', parent=warCont, align=uiconst.TOLEFT_PROP, width=0.45)
     defenderLogoCont = uiprimitives.Container(name='defenderLogoCont', parent=defenderCont, align=uiconst.TOLEFT, width=64)
     self.defenderLogoDetailed = uiprimitives.Container(name='defenderLogoDetailed', parent=defenderLogoCont, align=uiconst.TOPLEFT, width=64, height=64)
     defenderTextCont = uiprimitives.Container(name='defenderTextCont', parent=defenderCont, align=uiconst.TOALL, padding=(8, 0, 4, 4))
     self.defenderNameLabel = uicontrols.EveLabelLarge(text='', parent=defenderTextCont, state=uiconst.UI_NORMAL)
     self.defenderISKKilledLabel = uicontrols.EveLabelMedium(text='', parent=defenderTextCont, align=uiconst.CENTERLEFT, height=16)
     self.defenderShipsKilledLabel = uicontrols.EveLabelMedium(text='', parent=defenderTextCont, align=uiconst.BOTTOMLEFT)
     killsFilterCont = uiprimitives.Container(name='killsFilterCont', parent=self.historyCont, align=uiconst.TOTOP, height=24)
     killOptions = [(localization.GetByLabel('UI/Corporations/Wars/ShowAllKills'), None), (localization.GetByLabel('UI/Corporations/Wars/ShowAggressorKills'), 'attacker'), (localization.GetByLabel('UI/Corporations/Wars/ShowDefenderKills'), 'defender')]
     comboSetting = settings.user.ui.Get('killComboValue', 0)
     self.killsFilterCombo = uicontrols.Combo(name='killsFilterCombo', parent=killsFilterCont, options=killOptions, adjustWidth=True, select=comboSetting, callback=self.OnKillComboChange)
     showGraph = settings.user.ui.Get('killShowGraph', 0)
     self.showGraph = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/Wars/ShowGraph'), parent=killsFilterCont, padLeft=self.killsFilterCombo.width + const.defaultPadding, checked=showGraph, callback=self.ShowGraph)
     self.killsParent = uiprimitives.Container(name='killsParent', parent=self.historyCont, align=uiconst.TOALL)
     self.killsScroll = uicontrols.Scroll(name='killsScroll', parent=self.killsParent)
     self.killsByGroupParent = uiprimitives.Container(name='killsByGroupParent', parent=self.historyCont, align=uiconst.TOALL)
     killGroupsCont = uiprimitives.Container(name='killsFilterCont', parent=self.killsByGroupParent, align=uiconst.TOTOP, height=188)
     self.killGroupsTextCont = uiprimitives.Container(name='killGroupsTextCont', parent=killGroupsCont, align=uiconst.TOLEFT, width=90)
     self.killGroupsLegendCont = uiprimitives.Container(name='killGroupsTextCont', parent=killGroupsCont, align=uiconst.TOBOTTOM, height=20)
     self.killGroupsDataCont = uiprimitives.Container(name='killGroupsDataCont', parent=killGroupsCont, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      0,
      const.defaultPadding), bgColor=util.Color.GetGrayRGBA(0.4, 0.2))
     self.killGroupsScroll = uicontrols.Scroll(name='killGroupsScroll', parent=self.killsByGroupParent)
     self.LoadInfo(self.warID)
Exemple #3
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.filterType = None
     self.criteriaValue = None
     self.controller = attributes.controller
     condition = attributes.get('condition', None)
     self.isRemovable = attributes.get('isRemovable', False)
     self.removeButton = uicontrols.ButtonIcon(
         name='removeButton',
         parent=self,
         align=uiconst.TOLEFT,
         width=16,
         iconSize=9,
         texturePath='res:/UI/Texture/Icons/Minus.png',
         func=self.OnRemoveBtn)
     self.SetRemovable(self.isRemovable)
     self.filterTypeCombo = uicontrols.Combo(
         name='filterOptionsCombo',
         align=uiconst.TOLEFT_PROP,
         parent=self,
         width=0.3,
         padLeft=4,
         options=self.GetFilterTypeComboOptions(),
         callback=self.OnFilterTypeCombo)
     self.filterDetailCont = uiprimitives.Container(name='filterDetailCont',
                                                    parent=self)
     if condition:
         self.SetFilterType(*condition)
 def setup_layout(self):
     self.dialogue_container = uiprimitives.Container(name='dialogue_container', parent=self.parent, idx=0)
     self.left_main_container = uiprimitives.Container(name='left_main_container', parent=self, align=uiconst.TOLEFT_PROP, width=0.5, clipChildren=True, top=20)
     self.category_container = uiprimitives.Container(name='category_container', parent=self, align=uiconst.TOLEFT_PROP, width=0.5, padTop=45, clipChildren=True)
     self.loading_container = uiprimitives.Container(name='loadingContainer', parent=self.category_container, align=uiconst.CENTER, width=100, height=100, state=uiconst.UI_HIDDEN)
     self.loading_result_label = themeColored.LabelThemeColored(name='loadingResultLabel', parent=self.loading_container, align=uiconst.CENTERTOP, text=localization.GetByLabel('UI/ProjectDiscovery/LoadingResultLabel'), fontsize=20)
     self.loading_wheel = LoadingWheel(name='ResultLoadingIndicator', parent=self.loading_container, align=uiconst.CENTER, width=64, height=64)
     self.error_container = uiprimitives.Container(parent=self.category_container, align=uiconst.CENTER, width=100, height=100, state=uiconst.UI_HIDDEN)
     self.error_label = themeColored.LabelThemeColored(parent=self.error_container, align=uiconst.CENTERTOP, text=localization.GetByLabel('UI/ProjectDiscovery/LoadingResultErrorLabel'), fontsize=20)
     self.task_label = themeColored.LabelThemeColored(parent=self.left_main_container, align=uiconst.CENTERTOP, text=localization.GetByLabel('UI/ProjectDiscovery/TaskLabel'), top=40, fontsize=28, opacity=1)
     self.task_image = TaskImage(label=const.Texts.TaskImageLabel, parent=self.left_main_container, align=uiconst.TOPLEFT_PROP, pos=(25, 80, 420, 445), starting_scale=self.starting_scale)
     self.checkbox_container = uiprimitives.Container(name='checkboxContainer', parent=self.task_image, align=uiconst.BOTTOMLEFT, width=110, height=20, left=8, top=10)
     self.report_checkbox = uicontrols.Checkbox(name='reportCheckbox', parent=self.checkbox_container, text=localization.GetByLabel('UI/ProjectDiscovery/ReportCheckboxLabel'))
     SetTooltipHeaderAndDescription(self.report_checkbox, headerText=localization.GetByLabel('UI/ProjectDiscovery/AbnormalSampleTooltipHeader'), descriptionText=localization.GetByLabel('UI/ProjectDiscovery/AbnormalSampleTooltipDescription'))
     self.result_window = ResultWindow(name='ResultWindow', parent=self.parent, align=uiconst.TOALL, opacity=0, isTrainingPhase=False, starting_scale=self.starting_scale, bottom_container=self.bottom_container)
     self.rewards_view = RewardsView(parent=self.parent.parent, opacity=0, align=uiconst.TOALL, playerState=self.playerState, bottom_container=self.bottom_container, idx=1, state=uiconst.UI_DISABLED)
     self.processing_view = ProcessingView(parent=self.parent.parent, opacity=0, idx=2, state=uiconst.UI_DISABLED)
     self.category_selector = CategorySelector(categories=nested_categories_from_json(PROJECT_INFO['info']['classes']), parent=self.category_container, state=uiconst.UI_DISABLED, starting_scale=self.starting_scale)
     self.main_button_container = uiprimitives.Container(name='main_button_container', parent=self.bottom_container, align=uiconst.CENTERBOTTOM, width=355, height=53, bgTexturePath='res:/UI/Texture/classes/ProjectDiscovery/footerBG.png')
     self.submit_button_container = uiprimitives.Container(name='submitButtonContainer', parent=self.main_button_container, width=250, align=uiconst.CENTER, height=40, top=5)
     self.submit_button = uicontrols.Button(name='SubcellularSubmitButton', parent=self.submit_button_container, align=uiconst.CENTER, label=localization.GetByLabel('UI/ProjectDiscovery/SubmitButtonLabel'), fontsize=18, fixedwidth=170, fixedheight=30, func=lambda x: self.submit_solution())
     uiprimitives.Sprite(parent=self.submit_button_container, align=uiconst.CENTERLEFT, width=34, height=20, texturePath='res:/UI/Texture/classes/ProjectDiscovery/submitArrow.png', opacity=0.7)
     uiprimitives.Sprite(parent=uiprimitives.Transform(parent=self.submit_button_container, align=uiconst.CENTERRIGHT, width=34, height=20, rotation=math.pi), align=uiconst.CENTERRIGHT, width=34, height=20, texturePath='res:/UI/Texture/classes/ProjectDiscovery/submitArrow.png', opacity=0.7)
     self.task_id = uicontrols.Label(name='TaskID', parent=self.bottom_container, align=uiconst.BOTTOMRIGHT, height=20, opacity=0, left=10)
     self.new_task_button = uicontrols.ButtonIcon(name='newTaskButton', parent=self.left_main_container, align=uiconst.TOPLEFT, texturePath='res:/UI/Texture/classes/ProjectDiscovery/recycleButtonUp.png', hoverTexture='res:/UI/Texture/classes/ProjectDiscovery/recycleButtonOver.png', downTexture='res:/UI/Texture/classes/ProjectDiscovery/recycleButtonDown.png', iconSize=24, func=lambda : self.reset_and_get_new_task(), idx=0, left=32, top=54)
     SetTooltipHeaderAndDescription(self.new_task_button, headerText='', descriptionText=localization.GetByLabel('UI/ProjectDiscovery/NewTaskButtonTooltipDescription'))
 def LoadTooltip(self, header, description, on_continue, on_quit):
     self.AddCell(EveLabelLarge(text=header,
                                state=uiconst.UI_DISABLED,
                                width=250),
                  width=250)
     self.AddCell(uicontrols.ButtonIcon(
         texturePath='res:/UI/Texture/icons/38_16_220.png',
         iconSize=16,
         width=16,
         height=16,
         func=on_quit),
                  margin=(0, 0, 0, 0))
     self.AddCell(Fill(align=uiconst.TOTOP,
                       state=uiconst.UI_DISABLED,
                       color=(1, 1, 1, 0.3),
                       height=1,
                       padding=(0, 3, 0, 3)),
                  colSpan=self.columns)
     self.AddCell(EveLabelMedium(text=description,
                                 state=uiconst.UI_DISABLED,
                                 width=250),
                  width=250,
                  colSpan=self.columns)
     self.AddCell(uicontrols.Button(label=localization.GetByLabel(
         'UI/ProjectDiscovery/TutorialContinueButtonLabel'),
                                    align=uiconst.CENTER,
                                    func=lambda _: on_continue()),
                  colSpan=self.columns)
 def Startup(self, *args):
     self.divisionName = ''
     self.agentName = ''
     self.levelName = ''
     self.agentType = ''
     self.agentLocation = ''
     self.missionState = ''
     self.locationLabel = None
     uiprimitives.Line(parent=self,
                       align=uiconst.TOBOTTOM,
                       idx=0,
                       color=uiconst.ENTRY_LINE_COLOR)
     picCont = uiprimitives.Container(parent=self,
                                      pos=(1, 0, 50, 0),
                                      name='picture',
                                      state=uiconst.UI_PICKCHILDREN,
                                      align=uiconst.TOLEFT)
     self.sr.pic = uiprimitives.Sprite(parent=picCont,
                                       align=uiconst.TOALL,
                                       state=uiconst.UI_PICKCHILDREN)
     textCont = uiprimitives.Container(parent=self,
                                       name='textCont',
                                       state=uiconst.UI_PICKCHILDREN,
                                       align=uiconst.TOALL,
                                       padLeft=6,
                                       padTop=2,
                                       padRight=6)
     self.textCont = uiprimitives.Container(parent=textCont,
                                            name='text',
                                            state=uiconst.UI_PICKCHILDREN,
                                            align=uiconst.TOALL,
                                            clipChildren=True,
                                            padTop=2)
     self.sr.namelabel = uicontrols.EveLabelMedium(text='',
                                                   align=uiconst.TOPLEFT,
                                                   parent=self.textCont)
     self.sr.levelLabel = uicontrols.EveLabelMedium(text='',
                                                    align=uiconst.TOPLEFT,
                                                    parent=self.textCont,
                                                    top=14)
     self.sr.missionLabel = uicontrols.EveLabelMedium(
         text='', parent=self.textCont, align=uiconst.TOPRIGHT)
     self.agentChatBtn = uicontrols.ButtonIcon(
         name='removeButton',
         parent=self,
         align=uiconst.BOTTOMRIGHT,
         width=22,
         iconSize=16,
         left=3,
         top=-1,
         texturePath='res:/UI/Texture/classes/Chat/AgentChat.png',
         hint=localization.GetByLabel('UI/Chat/StartConversationAgent'),
         func=self.StartConversation)
     buttonIconOnMouseEnter = self.agentChatBtn.OnMouseEnter
     self.agentChatBtn.OnMouseEnter = (self.OnChatButtonMouseEnter,
                                       self.agentChatBtn,
                                       buttonIconOnMouseEnter)
 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)
Exemple #8
0
 def setup_layout(self):
     self.setup_side_panels()
     self.bottom_container = uiprimitives.Container(name='bottom_container',
                                                    parent=self.sr.main,
                                                    align=uiconst.TOBOTTOM,
                                                    height=50)
     self.project_container = uiprimitives.Container(
         name='ProjectContainer',
         parent=self.main,
         align=uiconst.TOPLEFT,
         height=self.default_minSize[1],
         width=self.default_minSize[0],
         top=-20)
     self.original_project_height = self.project_container.height
     self.original_project_width = self.project_container.width
     self.show_background_grid()
     self.header = WindowHeader(
         parent=self.main.parent,
         align=uiconst.CENTERTOP,
         height=53,
         width=355,
         idx=0,
         top=2,
         bgTexturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/headerBG.png',
         playerState=self.playerState,
         playerStatistics=self.player_statistics)
     self.help_button = uicontrols.ButtonIcon(
         name='helpButton',
         parent=self.bottom_container,
         align=uiconst.BOTTOMLEFT,
         iconSize=22,
         width=22,
         height=22,
         texturePath='res:/UI/Texture/WindowIcons/question.png',
         func=lambda: self.start_tutorial())
     SetTooltipHeaderAndDescription(
         targetObject=self.help_button,
         headerText='',
         descriptionText=localization.GetByLabel(
             'UI/ProjectDiscovery/HelpTutorialTooltip'))
     uthread.new(self.animate_background)
Exemple #9
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.fleetSvc = attributes.fleetSvc
     self.setupInfo = setupInfo = attributes.get('setupInfo', {})
     motd = setupInfo.get('motd', None)
     isFreeMove = setupInfo.get('isFreeMove', None)
     isVoiceEnabled = setupInfo.get('isVoiceEnabled', None)
     settingName = setupInfo.get('setupName')
     self.settingConfigName = attributes.get('settingConfigName',
                                             settingName)
     uiprimitives.Line(parent=self,
                       align=uiconst.TOBOTTOM,
                       color=(1, 1, 1, 0.15))
     nameLabel = uicontrols.EveLabelSmall(parent=self,
                                          name='nameLabel',
                                          align=uiconst.CENTERLEFT,
                                          text=settingName,
                                          padLeft=6,
                                          state=uiconst.UI_NORMAL)
     nameLabel.hint = self.GetMouseOver(setupInfo)
     nameLabel.GetMenu = self.GetMenu
     deleteBtn = uicontrols.ButtonIcon(
         parent=self,
         texturePath='res:/UI/Texture/Icons/38_16_111.png',
         pos=(8, 0, 16, 16),
         align=uiconst.CENTERRIGHT,
         func=self.DeleteSetup,
         hint=localization.GetByLabel('UI/Common/Buttons/Delete'))
     settingCont = Container(parent=self,
                             left=deleteBtn.width + deleteBtn.left + 12,
                             align=uiconst.TORIGHT,
                             width=54)
     motdCont = Container(parent=settingCont,
                          name='motdCont',
                          align=uiconst.TOLEFT,
                          width=18)
     voiceCont = Container(parent=settingCont,
                           name='voiceCont',
                           align=uiconst.TOLEFT,
                           width=18)
     freeMoveCont = Container(parent=settingCont,
                              name='freeMoveCont',
                              align=uiconst.TOLEFT,
                              width=18)
     iconPos = (0, 0, 16, 16)
     if motd is not None:
         sprite = uiprimitives.Sprite(
             parent=motdCont,
             pos=iconPos,
             align=uiconst.CENTER,
             texturePath='res:/ui/texture/icons/6_64_7.png')
         sprite.hint = localization.GetByLabel('UI/Chat/ChannelMotd',
                                               motd=motd)
         if not motd:
             sprite.opacity = self.disabledOpacity
     if isVoiceEnabled is not None:
         sprite = uiprimitives.Sprite(
             parent=freeMoveCont,
             pos=iconPos,
             align=uiconst.CENTER,
             texturePath='res:/ui/texture/icons/73_16_35.png')
         if isVoiceEnabled:
             sprite.hint = localization.GetByLabel(
                 'UI/Fleet/FleetWindow/VoiceEnabled')
         else:
             sprite.hint = localization.GetByLabel(
                 'UI/Fleet/FleetWindow/VoiceDisabled')
             sprite.opacity = self.disabledOpacity
     if isFreeMove is not None:
         sprite = uiprimitives.Sprite(
             parent=voiceCont,
             pos=iconPos,
             align=uiconst.CENTER,
             texturePath='res:/ui/texture/icons/44_32_32.png')
         if isFreeMove:
             sprite.hint = localization.GetByLabel(
                 'UI/Fleet/FleetWindow/FreeMoveOn')
         else:
             sprite.hint = localization.GetByLabel(
                 'UI/Fleet/FleetWindow/FreeMoveOff')
             sprite.opacity = self.disabledOpacity
 def ConstructLayout(self):
     mainCont = uiprimitives.Container(name='mainCont',
                                       parent=self.sr.main,
                                       padding=const.defaultPadding)
     headerText = uicontrols.EveLabelMedium(text=localization.GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/Availability'),
                                            parent=mainCont,
                                            align=uiconst.TOTOP,
                                            state=uiconst.UI_NORMAL,
                                            bold=True,
                                            padBottom=const.defaultPadding)
     self.searchCont = uiprimitives.Container(name='searchCont',
                                              parent=mainCont,
                                              align=uiconst.TOTOP,
                                              height=30)
     self.verifiedCont = uiprimitives.Container(name='verifiedCont',
                                                parent=mainCont,
                                                align=uiconst.TOTOP,
                                                height=30)
     self.verifiedCont.display = False
     imgCont = uiprimitives.Container(name='imgCont',
                                      parent=self.searchCont,
                                      width=30,
                                      align=uiconst.TOLEFT)
     killerLogo = uiprimitives.Sprite(
         parent=imgCont,
         align=uiconst.TOALL,
         idx=0,
         texturePath='res:/UI/Texture/silhouette_64.png')
     self.searchEdit = uicontrols.SinglelineEdit(
         name='searchEdit',
         parent=self.searchCont,
         maxLength=32,
         align=uiconst.TOALL,
         hinttext=localization.GetByLabel(
             'UI/Station/BountyOffice/SearchForUser'),
         pos=(0, 0, 0, 0))
     self.searchEdit.OnReturn = self.SearchKillRights
     self.imgCont = uiprimitives.Container(name='imgCont',
                                           parent=self.verifiedCont,
                                           width=30,
                                           align=uiconst.TOLEFT)
     clearCont = uiprimitives.Container(name='clearCont',
                                        parent=self.verifiedCont,
                                        width=24,
                                        align=uiconst.TORIGHT)
     textCont = uiprimitives.Container(name='textCont',
                                       parent=self.verifiedCont,
                                       align=uiconst.TOALL,
                                       padLeft=const.defaultPadding)
     self.killRightOwner = uiprimitives.Sprite(
         parent=self.imgCont,
         align=uiconst.TOALL,
         idx=0,
         texturePath='res:/UI/Texture/silhouette_64.png')
     self.clearBtn = uicontrols.ButtonIcon(
         name='surrenderBtn',
         parent=clearCont,
         align=uiconst.CENTER,
         width=16,
         iconSize=16,
         texturePath='res:/UI/Texture/Icons/73_16_210.png',
         hint=localization.GetByLabel('UI/Inventory/Clear'),
         func=self.ClearKillRight)
     self.nameLabel = uicontrols.EveLabelMedium(name='bountyName',
                                                parent=textCont,
                                                align=uiconst.CENTERLEFT,
                                                state=uiconst.UI_NORMAL,
                                                maxLines=1)
     amountCont = uiprimitives.Container(parent=mainCont,
                                         align=uiconst.TOBOTTOM,
                                         height=20)
     self.sellKillRightBtn = uicontrols.Button(
         parent=amountCont,
         label=localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/SellKillRightBtn'),
         align=uiconst.TORIGHT,
         func=self.SellKillRight)
     self.killRightAmount = uicontrols.SinglelineEdit(
         name='sellEdit',
         parent=amountCont,
         align=uiconst.TOALL,
         width=0,
         floats=[0, const.MAX_BOUNTY_AMOUNT, 0],
         hinttext=localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/EnterAmount'),
         padRight=const.defaultPadding,
         top=0)
     self.killRightAmount.OnReturn = self.SellKillRight
     if self.sellToID == 'open':
         self.searchCont.display = False
         openForPublicText = uicontrols.EveCaptionSmall(
             text=localization.GetByLabel(
                 'UI/CharacterSheet/CharacterSheetWindow/Everyone'),
             parent=mainCont,
             align=uiconst.TOTOP,
             state=uiconst.UI_NORMAL,
             top=const.defaultPadding)
     elif self.sellToID is not None:
         self.ownerID = self.sellToID
         self.ShowResult(self.ownerID)
     else:
         self.sellKillRightBtn.Disable()
Exemple #11
0
 def setup_layout(self):
     self.transmitting_container = uiprimitives.Container(
         name='transmitting_container',
         parent=self,
         align=uiconst.CENTER,
         width=self.width,
         height=70,
         top=-15,
         opacity=0,
         state=uiconst.UI_DISABLED)
     self._create_processing_label()
     self.expandTopContainer = uiprimitives.Container(
         name='expandTopContainer',
         parent=self.transmitting_container,
         width=364,
         height=8,
         align=uiconst.TOTOP)
     self.expandTop = uiprimitives.Sprite(
         name='expandTop',
         parent=self.expandTopContainer,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/expandTop.png',
         width=174,
         height=5,
         align=uiconst.CENTERTOP)
     self.original_expand_width = self.expandTop.width
     self.expandBracketTop = uiprimitives.Sprite(
         name='expandbracketsTop',
         parent=self.expandTopContainer,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/expandBrackets.png',
         width=364,
         height=3,
         align=uiconst.CENTERTOP,
         top=5)
     self.original_expand_bracket_width = self.expandBracketTop.width
     self.expandBottomContainer = uiprimitives.Transform(
         name='expandBottomContainer',
         parent=self.transmitting_container,
         width=364,
         height=8,
         align=uiconst.TOBOTTOM,
         rotation=math.pi)
     self.expandBracketBot = uiprimitives.Sprite(
         name='expandbracketBot',
         parent=self.expandBottomContainer,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/expandBrackets.png',
         width=364,
         height=3,
         align=uiconst.CENTERTOP,
         top=5)
     self.expandBot = uiprimitives.Sprite(
         name='expandBot',
         parent=self.expandBottomContainer,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/expandTop.png',
         width=174,
         height=5,
         align=uiconst.CENTERBOTTOM,
         top=3)
     self.expandGradient = uiprimitives.Sprite(
         parent=self.transmitting_container,
         align=uiconst.CENTER,
         width=364,
         height=64,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/expandGradient.png')
     self.colorFilterContainer = uiprimitives.Container(
         name='colorFilterContainer',
         parent=self,
         align=uiconst.TOBOTTOM_PROP,
         height=0.065)
     self.colorFilterButtonsContainer = uiprimitives.Container(
         name='colorFilterButtonsContainer',
         parent=self.colorFilterContainer,
         align=uiconst.CENTERTOP,
         width=120,
         height=24)
     self.colorCube = uicontrols.ButtonIcon(
         name='colorCube',
         parent=self.colorFilterButtonsContainer,
         align=uiconst.TOLEFT,
         width=30,
         height=24,
         opacity=2,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterCube.png',
         func=self.toggle_all_channels)
     self.colorCube.icon.SetSize(30, 24)
     self.colorCubeSelectedSprite = uiprimitives.Sprite(
         name='selectedFilter',
         parent=self.colorFilterButtonsContainer,
         width=30,
         height=24,
         align=uiconst.TOPLEFT,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterSelection.png'
     )
     self.colorSwatchRed = uicontrols.ButtonIcon(
         parent=self.colorFilterButtonsContainer,
         align=uiconst.TOLEFT,
         width=30,
         height=24,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterSwatch_R.png',
         func=self.toggle_red_channel)
     self.colorSwatchRed.icon.SetSize(30, 24)
     self.redSelectedSprite = uiprimitives.Sprite(
         name='selectedFilter',
         parent=self.colorFilterButtonsContainer,
         width=30,
         height=24,
         align=uiconst.TOPLEFT,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterSelection.png',
         left=30,
         opacity=0)
     self.colorSwatchGreen = uicontrols.ButtonIcon(
         name='colorSwatchGreen',
         parent=self.colorFilterButtonsContainer,
         align=uiconst.TOLEFT,
         width=30,
         height=24,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterSwatch_G.png',
         func=self.toggle_green_channel)
     self.colorSwatchGreen.icon.SetSize(30, 24)
     self.greenSelectedSprite = uiprimitives.Sprite(
         name='selectedFilter',
         parent=self.colorFilterButtonsContainer,
         width=30,
         height=24,
         align=uiconst.TOPLEFT,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterSelection.png',
         left=60,
         opacity=0)
     self.colorSwatchBlue = uicontrols.ButtonIcon(
         parent=self.colorFilterButtonsContainer,
         align=uiconst.TOLEFT,
         width=30,
         height=24,
         iconSize=30,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterSwatch_B.png',
         func=self.toggle_blue_channel)
     self.colorSwatchBlue.icon.SetSize(30, 24)
     self.blueSelectedSprite = uiprimitives.Sprite(
         name='selectedFilter',
         parent=self.colorFilterButtonsContainer,
         width=30,
         height=24,
         align=uiconst.TOPLEFT,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterSelection.png',
         left=90,
         opacity=0)
     self.colorFilterBack = uiprimitives.Sprite(
         parent=self.colorFilterContainer,
         align=uiconst.CENTERTOP,
         width=187,
         height=32,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/colorFilterBack.png')
     self.images_container = uiprimitives.Container(
         name='ImagesContainer',
         parent=self,
         align=uiconst.TOPLEFT_PROP,
         clipChildren=True,
         width=self.ORIGINAL_WIDTH,
         height=self.ORIGINAL_HEIGHT)
     self.image_locked_sprite = uiprimitives.Sprite(
         name='lockImage',
         parent=self.images_container,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/magnifyLocked.png',
         width=54,
         height=64,
         align=uiconst.CENTER,
         opacity=0,
         state=uiconst.UI_DISABLED)
     self.image_unlocked_sprite = uiprimitives.Sprite(
         name='unlockImage',
         parent=self.images_container,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/magnifyUnlocked.png',
         width=108,
         height=64,
         align=uiconst.CENTER,
         opacity=0,
         state=uiconst.UI_DISABLED)
     self.image_container = uiprimitives.Container(
         name='mainImageContainer',
         parent=self.images_container,
         align=uiconst.TOALL,
         clipChildren=True)
     self.image_frame = uicontrols.Frame(
         name='imageFrame',
         bgParent=self.images_container,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/SampleBack.png',
         cornerSize=20)
     self.loading_wheel = LoadingWheel(name='SampleLoadingIndicator',
                                       parent=self.images_container,
                                       align=uiconst.CENTER,
                                       width=64,
                                       height=64)
     self.image_sprite = SubCellularSprite(name='mainImage',
                                           parent=self.image_container,
                                           align=uiconst.TOALL,
                                           opacity=1,
                                           pos=(10, 10, 10, 10))
     self.image_sprite.texture = None
     self.mini_map_container = uiprimitives.Container(
         name='miniMapContainer',
         parent=self.images_container,
         align=uiconst.BOTTOMRIGHT,
         width=100,
         height=100,
         top=12,
         left=12)
     self.mini_map_container_frame = uicontrols.Frame(
         name='zoomContainerFrame',
         parent=self.mini_map_container,
         state=uiconst.UI_HIDDEN)
     self.mini_map_frame_container = uiprimitives.Container(
         name='miniMapFrameContainer',
         parent=self.mini_map_container,
         align=uiconst.TOPLEFT,
         width=30,
         height=30)
     self.mini_map_frame = uicontrols.Frame(
         name='zoomFrame',
         parent=self.mini_map_frame_container,
         state=uiconst.UI_HIDDEN)
     self.mini_map_image_sprite = uiprimitives.Sprite(
         name='miniMapSprite',
         parent=self.mini_map_container,
         width=100,
         height=100)
     self.zoom_image_container = uiprimitives.Container(
         name='zoomContainer',
         parent=self.images_container,
         align=uiconst.TOALL,
         clipChildren=True,
         pos=(10, 10, 10, 10))
     self.zoom_image_sprite = uiprimitives.Sprite(
         name='zoomSprite',
         parent=self.zoom_image_container,
         align=uiconst.TOALL,
         opacity=0,
         pos=(0, 0, -1200, -1200))
     self.error_message = uicontrols.Label(
         parent=self.images_container,
         align=uiconst.CENTER,
         text=localization.GetByLabel(
             'UI/ProjectDiscovery/NoImageErrorLabel'),
         opacity=0)