def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.filePath = blue.paths.ResolvePathForWriting(u'settings:/windowmonitor.txt')
     self.SetCaption('Window Monitor')
     self.SetTopparentHeight(0)
     topCont = uiprimitives.Container(parent=self.sr.main, align=uiconst.TOALL, height=95)
     margin = 10
     self.openedScroll = uicontrols.Scroll(parent=topCont, padding=(margin,
      margin,
      margin,
      0), align=uiconst.TOLEFT, width=150)
     self.allWindowsScroll = uicontrols.Scroll(parent=topCont, padding=(0,
      margin,
      margin,
      0), align=uiconst.TOALL)
     self.messageScroll = uicontrols.Scroll(parent=self.sr.main, padding=(margin,
      0,
      margin,
      margin), align=uiconst.TOBOTTOM, height=50)
     self.messageScroll.Load(contentList=[], headers=[], scrollTo=0)
     midCont = uiprimitives.Container(parent=self.sr.main, align=uiconst.TOBOTTOM, padding=(0, 5, 0, 5), height=25)
     self.infoLabel = uicontrols.Label(text='', parent=midCont, align=uiconst.CENTERLEFT, left=margin, state=uiconst.UI_NORMAL)
     self.infoLabel.OnClick = self.OpenPrefs
     self.infoLabel.hint = 'Click to open windowmonitor save file location.'
     uicontrols.Button(parent=midCont, label='Clear', align=uiconst.TORIGHT, left=margin, func=self.Clear)
     self.DoSetup()
Beispiel #2
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetTopparentHeight(0)
     self.topPanel = Container(parent=self.sr.main,
                               align=uiconst.TOTOP,
                               height=30)
     uicontrols.Button(parent=self.topPanel,
                       align=uiconst.TOLEFT,
                       label='Pause',
                       width=120,
                       height=30,
                       func=self.Pause)
     uicontrols.Button(parent=self.topPanel,
                       align=uiconst.TOLEFT,
                       label='Resume',
                       width=120,
                       height=30,
                       func=self.Resume)
     self.mainQueue = uicontrols.Scroll(parent=self.sr.main,
                                        id='mainQueueScroll',
                                        align=uiconst.TOLEFT,
                                        width=300)
     self.subQueue = uicontrols.Scroll(parent=self.sr.main,
                                       id='subQueueScroll',
                                       align=uiconst.TOALL)
     self.queue = []
     uthread.new(self.PopulateMainQueueScrollTasklet)
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.events = []
     self.settingsName = self.__guid__.split('.')[1] + 'ignoreEvents'
     settings.user.ui.Set(self.settingsName, self.default_ignoreEvents)
     self.ignoreEvents = settings.user.ui.Get(self.settingsName,
                                              self.default_ignoreEvents)
     self.updatePending = False
     self.showMax = 100
     self.scrollUpdateRequested = False
     self.isPaused = False
     self.rightCont = uiprimitives.Container(name='rightCont',
                                             parent=self,
                                             align=uiconst.TORIGHT,
                                             width=150,
                                             padding=3)
     uicontrols.Label(parent=self.rightCont,
                      align=uiconst.TOTOP,
                      text='<color=red>IGNORE LIST</color>')
     uicontrols.Label(
         parent=self.rightCont,
         align=uiconst.TOBOTTOM,
         text='Right-click logged entries to add that event type to ignore')
     self.ignoreScroll = uicontrols.Scroll(parent=self.rightCont,
                                           align=uiconst.TOALL)
     self._UpdateIgnoreScroll()
     btns = (('Clear', self.ResetEventData, ()),
             ('<color=green>Pause logging</color>', self.PauseResumeLogging,
              ()))
     btnGroup = uicontrols.ButtonGroup(parent=self, btns=btns)
     self.pauseResumeBtn = btnGroup.GetBtnByIdx(1)
     self.scroll = uicontrols.Scroll(parent=self,
                                     align=uiconst.TOALL,
                                     padding=3)
     uthread.new(self._UpdateScrollThread)
Beispiel #4
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)
Beispiel #5
0
 def Show(self):
     self.wnd = wnd = uicontrols.Window.GetIfOpen(windowID='typedb')
     if wnd:
         self.wnd.Maximize()
         return
     self.wnd = wnd = uicontrols.Window.Open(windowID='typedb')
     wnd.SetWndIcon(None)
     wnd.SetMinSize([350, 270])
     wnd.SetTopparentHeight(0)
     wnd.SetCaption('Type Browser')
     mainpar = uiutil.GetChild(wnd, 'main')
     wnd.sr.tabs = uicontrols.TabGroup(name='tabsparent', parent=mainpar)
     main = uiprimitives.Container(
         name='main',
         parent=mainpar,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     body = uiprimitives.Container(name='body',
                                   parent=main,
                                   align=uiconst.TOALL,
                                   pos=(0, 0, 0, 0))
     wnd.sr.browser = uicontrols.Scroll(name='scroll',
                                        parent=body,
                                        pos=(0, 0, 0, 0))
     wnd.sr.browser.multiSelect = False
     wnd.sr.browser.Startup()
     searchParent = uiprimitives.Container(name='search',
                                           parent=body,
                                           align=uiconst.TOALL,
                                           pos=(0, 0, 0, 0))
     searchTop = uiprimitives.Container(name='search',
                                        parent=searchParent,
                                        height=25,
                                        align=uiconst.TOTOP)
     btn = uicontrols.Button(parent=searchTop,
                             label='Search',
                             func=self.Search,
                             align=uiconst.TORIGHT)
     wnd.sr.input = uicontrols.SinglelineEdit(name='Search',
                                              parent=searchTop,
                                              width=-1,
                                              left=1,
                                              align=uiconst.TOALL)
     uiprimitives.Container(name='div',
                            parent=searchParent,
                            height=5,
                            align=uiconst.TOTOP)
     wnd.sr.input.OnReturn = self.Search
     wnd.sr.scroll = uicontrols.Scroll(parent=searchParent)
     wnd.sr.scroll.multiSelect = False
     wnd.sr.tabs.Startup([['Browse', wnd.sr.browser, self, 0],
                          ['Search', searchParent, self, 1]],
                         'typebrowsertabs')
     self.Search()
     stuff = self.GetContent(None, False)
     wnd.sr.browser.Load(contentList=stuff, headers=['Name', 'typeID'])
     wnd.sr.browser.Sort('Name')
 def InitCloneFacilityPanel(self):
     panel = self.sr.clonefacilityPanel
     btns = [(localization.GetByLabel('UI/Ship/ShipConfig/Invite'),
              self.InviteClone, (), 84),
             (localization.GetByLabel('UI/Ship/ShipConfig/Destroy'),
              self.DestroyClone, (), 84)]
     self.cloneFacilityButtons = uicontrols.ButtonGroup(btns=btns,
                                                        parent=panel)
     if not session.solarsystemid:
         self.cloneFacilityButtons.GetBtnByIdx(0).Disable()
     numClones = int(0)
     totalClones = int(
         getattr(
             sm.GetService('godma').GetItem(self.shipItem.itemID),
             'maxJumpClones', 0))
     text = localization.GetByLabel('UI/Ship/ShipConfig/NumJumpClones',
                                    numClones=numClones,
                                    totalClones=totalClones)
     self.sr.cloneInfo = uicontrols.EveLabelSmall(
         text=text,
         parent=panel,
         align=uiconst.TOTOP,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, 0),
         state=uiconst.UI_NORMAL)
     self.sr.clonescroll = uicontrols.Scroll(name='clonescroll',
                                             parent=panel,
                                             padding=const.defaultPadding)
     self.cloneinited = 1
Beispiel #7
0
    def _ConstructExperimental(self, column, columnWidth):
        lst = []
        if lst:
            uiprimitives.Container(name='toppush',
                                   align=uiconst.TOTOP,
                                   height=4,
                                   parent=column)
            uix.GetContainerHeader(localization.GetByLabel(
                'UI/SystemMenu/GeneralSettings/Experimental/Header'),
                                   column,
                                   xmargin=-5)
            uiprimitives.Container(name='toppush',
                                   align=uiconst.TOTOP,
                                   height=2,
                                   parent=column)
            scroll = uicontrols.Scroll(parent=column)
            scroll.name = 'experimentalFeatures'
            scroll.HideBackground()
            scroll.minimumHeight = 64
            scrollList = []
            for each in lst:
                scrollList.append(
                    listentry.Get(
                        'Button', {
                            'label': each['label'],
                            'caption': each['caption'],
                            'OnClick': each['OnClick'],
                            'args': (each['args'], ),
                            'maxLines': None,
                            'entryWidth': columnWidth - 16
                        }))

            scroll.Load(contentList=scrollList)
Beispiel #8
0
 def Setup(self, template = None, readonly = False):
     self.typeID = None
     self.readonly = readonly
     self.boven = uiprimitives.Container(name='ccip_top', parent=self, height=ICONSIZE, align=uiconst.TOTOP)
     self.toolbar = uiprimitives.Container(name='ccip_bar', parent=self.boven, left=ICONSIZE + 2, top=ICONSIZE - TOOLSIZE, height=TOOLSIZE, align=uiconst.TOPLEFT, width=240)
     uiprimitives.Container(name='ccip_push', parent=self, height=3, align=uiconst.TOTOP)
     cont = uiprimitives.Container(name='mainicon', parent=self.boven, width=ICONSIZE, align=uiconst.TOLEFT)
     self.infoframe = uicontrols.Frame(parent=cont)
     self.infoicon = infoicon = InfoIcon(left=1, top=1, parent=cont, idx=0, align=uiconst.TOPRIGHT, state=uiconst.UI_DISABLED)
     infoicon.OnClick = lambda *x: self.ShowInfo()
     self.icon = uicontrols.Icon(parent=cont)
     self.icon.OnClick = self.ShowInfo
     self.icon.LoadTexture('res:/UI/Texture/notavailable.dds')
     self.icon.width = self.icon.height = ICONSIZE
     uiprimitives.Container(name='ccip_push', parent=self.boven, width=6, align=uiconst.TOLEFT)
     cont = uiprimitives.Container(name='ccip_icon', parent=self.boven, align=uiconst.TOTOP, height=24)
     self.capt = uicontrols.CaptionLabel(text='', parent=cont)
     cont = uiprimitives.Container(name='ccip_textcont', parent=self.boven, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     self.text = uicontrols.Label(text='', parent=cont, align=uiconst.TOTOP, height=self.boven.height, state=uiconst.UI_NORMAL)
     self.scroll = uicontrols.Scroll(name='ccip_top', parent=self)
     if template:
         self.Load(template)
     else:
         self.typeID = None
         self.capt.text = 'Copycat'
         self.text.text = 'Select a ship setup from the list to display details in this panel'
         self.scroll.Load(contentList=[], headers=['qty', 'name'])
Beispiel #9
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.zactionLoggerSvc = attributes['service']
     self.entityClient = sm.GetService('entityClient')
     self.playerEntID = self.entityClient.GetPlayerEntity().entityID
     self.entityList = []
     self.categoryList = []
     self.selectedCategory = self.DEFAULT_COMBO_OPTION
     self.selectedEntity = self.DEFAULT_COMBO_OPTION
     self.lineNumber = 0
     self.comboElementVersion = 0
     self.minsize = (540, 200)
     self.maincontainer = uiprimitives.Container(parent=self.sr.content,
                                                 align=uiconst.TOALL,
                                                 pos=(0, 0, 0, 0),
                                                 padding=(5, 5, 5, 5),
                                                 padTop=20)
     self.combatLogLines = uicontrols.Scroll(parent=self.maincontainer,
                                             name='logScroll',
                                             align=uiconst.TOALL,
                                             pos=(0, 0, 0, 0),
                                             padTop=20)
     self.entityCombo = uicontrols.Combo(parent=self.maincontainer,
                                         callback=self._ForceEntityUpdate,
                                         name='entityCombo',
                                         align=uiconst.TOPLEFT,
                                         width=350)
     self.categoryCombo = uicontrols.Combo(
         parent=self.maincontainer,
         callback=self._ForceCategoryUpdate,
         name='categoryCombo',
         align=uiconst.TOPRIGHT,
         width=150)
     self._GetCombatLogLines(bForceUpdate=True)
     self.sr.updateTimer = base.AutoTimer(100, self._GetCombatLogLines)
Beispiel #10
0
 def Load(self, key):
     alliancesLabel = localization.GetByLabel(
         'UI/Corporations/CorporationWindow/Alliances/Alliances')
     sm.GetService('corpui').LoadTop(
         'res:/ui/Texture/WindowIcons/alliances.png', alliancesLabel)
     if not self.sr.Get('inited', 0):
         self.sr.inited = 1
         self.sr.wndViewParent = uiprimitives.Container(
             name='wndViewParent',
             align=uiconst.TOALL,
             pos=(0, 0, 0, 0),
             parent=self)
         if session.allianceid:
             self.sr.contacts = form.ContactsForm(
                 name='alliancecontactsform',
                 parent=self,
                 pos=(0, 0, 0, 0),
                 startupParams=())
             self.sr.contacts.Setup('alliancecontact')
         else:
             self.sr.contacts = uicontrols.Scroll(
                 name='alliancecontactsform',
                 parent=self,
                 padding=(const.defaultPadding, const.defaultPadding,
                          const.defaultPadding, const.defaultPadding))
         self.sr.tabs = uicontrols.TabGroup(name='tabparent',
                                            parent=self,
                                            idx=0)
         self.sr.tabs.Startup(self._GetTabs(), 'corpaccounts')
         return
     self.LoadViewClass(key)
Beispiel #11
0
 def Show(self):
     if self.wnd:
         self.wnd.Maximize()
         return
     self.wnd = wnd = uicontrols.Window.Open(windowID='Cap Simulator')
     wnd._OnClose = self.Hide
     wnd.SetWndIcon(None)
     wnd.SetTopparentHeight(0)
     wnd.SetCaption('Capacitor Simulator')
     wnd.SetMinSize([256, 384])
     main = uiprimitives.Container(
         name='main',
         parent=uiutil.GetChild(wnd, 'main'),
         pos=(const.defaultPadding, const.defaultPadding,
              const.defaultPadding, const.defaultPadding))
     bottom = uiprimitives.Container(name='bottom',
                                     parent=main,
                                     align=uiconst.TOBOTTOM,
                                     height=60)
     wnd.sr.text = uicontrols.Label(text='<br><br><br><br>',
                                    parent=bottom,
                                    align=uiconst.TOALL,
                                    left=const.defaultPadding,
                                    state=uiconst.UI_NORMAL)
     wnd.sr.scroll = uicontrols.Scroll(name='attributescroll', parent=main)
     wnd.sr.scroll.sr.id = 'capsim_modulescroll'
     wnd.sr.scroll.hiliteSorted = 0
     btns = uicontrols.ButtonGroup(
         btns=[['Run Simulation', self.Simulate, (), None]],
         parent=main,
         idx=0,
         unisize=0)
     self.Load()
     wnd.Maximize(1)
 def PanelShowSchematics(self):
     self.schematicsCont = cont = uiprimitives.Container(
         parent=self.actionCont,
         name='schematicsCont',
         pos=(0, 0, 0, 155),
         align=uiconst.TOTOP,
         state=uiconst.UI_HIDDEN)
     self.schematicsScroll = uicontrols.Scroll(parent=cont,
                                               name='schematicsScroll',
                                               align=uiconst.TOTOP,
                                               height=148)
     self.schematicsScroll.Startup()
     self.schematicsScroll.sr.id = 'planetProcessorSchematicsScroll'
     self.schematicsScroll.multiSelect = False
     self.schematicsScroll.HideUnderLay()
     self.schematicsScroll.OnSelectionChange = self.OnSchematicScrollSelectionChange
     uicontrols.Frame(parent=self.schematicsScroll,
                      color=(1.0, 1.0, 1.0, 0.2))
     self.LoadSchematicsScroll()
     self.selectedSchematicCont = uiprimitives.Container(
         parent=cont,
         name='selectedSchematicCont',
         pos=(0, 0, 0, 0),
         padding=(0, 7, 0, 0),
         align=uiconst.TOALL,
         state=uiconst.UI_PICKCHILDREN)
     return cont
Beispiel #13
0
 def PostStartup(self):
     if not self or self.destroyed:
         return
     self.SetTopparentHeight(0)
     self.SetMinSize((240, 80))
     self.SetUtilMenu(utilMenuFunc=self.DroneSettings)
     self.sr.scroll = uicontrols.Scroll(name='dronescroll', align=uiconst.TOALL, parent=self.sr.main)
     self.sr.scroll.multiSelect = 1
     self.sr.scroll.OnChar = self.OnDronesScrollChar
     self.sr.inSpace = None
     self.sr.lastUpdate = None
     self.settingsName = 'droneBlah2'
     self.reloading = 0
     self.pending = None
     openState = uicore.registry.GetListGroupOpenState(('dronegroups', 'inbay'), default=False)
     uicore.registry.GetLockedGroup('dronegroups', 'inbay', localization.GetByLabel('UI/Inflight/Drone/DronesInBay'), openState=openState)
     openState = uicore.registry.GetListGroupOpenState(('dronegroups', 'inlocalspace'), default=False)
     uicore.registry.GetLockedGroup('dronegroups', 'inlocalspace', localization.GetByLabel('UI/Inflight/Drone/DronesInLocalSpace'), openState=openState)
     uicore.registry.GetLockedGroup('dronegroups', 'indistantspace', localization.GetByLabel('UI/Inflight/Drone/DronesInDistantSpace'))
     self.groups = self.SettifyGroups(settings.user.ui.Get(self.settingsName, {}))
     droneSettingChanges = {}
     droneSettingChanges[const.attributeDroneIsAggressive] = settings.char.ui.Get('droneAggression', self.droneAggressionDefVal)
     droneSettingChanges[const.attributeDroneFocusFire] = settings.char.ui.Get('droneFocusFire', self.droneFFDefVal)
     sm.GetService('godma').GetStateManager().ChangeDroneSettings(droneSettingChanges)
     if self and not self.destroyed:
         uthread.new(self.CheckDrones)
Beispiel #14
0
 def PanelShowStats(self, *args):
     cont = uiprimitives.Container(parent=self.actionCont,
                                   state=uiconst.UI_HIDDEN)
     self.statsScroll = scroll = uicontrols.Scroll(parent=cont,
                                                   name='StatsScroll',
                                                   align=uiconst.TOALL)
     scrolllist = []
     link = self.pin.link
     strCpuUsage = localization.GetByLabel('UI/PI/Common/TeraFlopsAmount',
                                           amount=int(link.GetCpuUsage()))
     data = util.KeyVal(
         label='%s<t>%s' %
         (localization.GetByLabel('UI/PI/Common/CpuUsage'), strCpuUsage))
     scrolllist.append(listentry.Get('Generic', data=data))
     strPowerUsage = localization.GetByLabel('UI/PI/Common/MegaWattsAmount',
                                             amount=int(
                                                 link.GetPowerUsage()))
     data = util.KeyVal(label='%s<t>%s' %
                        (localization.GetByLabel('UI/PI/Common/PowerUsage'),
                         strPowerUsage))
     scrolllist.append(listentry.Get('Generic', data=data))
     scroll.Load(contentList=scrolllist,
                 headers=[
                     localization.GetByLabel('UI/PI/Common/Attribute'),
                     localization.GetByLabel('UI/Common/Value')
                 ])
     return cont
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.searchStr = ''
     self.scope = 'all'
     self.SetMinSize([320, 300])
     self.SetWndIcon(self.iconNum)
     self.scroll = uicontrols.Scroll(parent=self.sr.main, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding))
     self.scroll.Startup()
     self.scroll.multiSelect = 0
     self.standardBtns = uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Ship/ShipConfig/Invite'),
       self.InviteToCorp,
       (),
       81], [localization.GetByLabel('UI/Common/Buttons/Cancel'),
       self.OnCancel,
       (),
       81]])
     self.inviteButton = self.standardBtns.GetBtnByIdx(0)
     self.inviteButton.Disable()
     self.sr.main.children.insert(0, self.standardBtns)
     self.SetCaption(localization.GetByLabel('UI/Messages/SelectCharacterTitle'))
     self.label = uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Shared/TypeSearchString'), parent=self.sr.topParent, left=70, top=16, state=uiconst.UI_NORMAL)
     self.nameInput = uicontrols.SinglelineEdit(name='edit', parent=self.sr.topParent, pos=(70,
      self.label.top + self.label.height + 2,
      86,
      0), align=uiconst.TOPLEFT, maxLength=32)
     self.nameInput.OnReturn = self.Search
     btn = uicontrols.Button(parent=self.sr.topParent, label=localization.GetByLabel('UI/Wallet/WalletWindow/WalletSearch'), pos=(self.nameInput.left + self.nameInput.width + 2,
      self.nameInput.top,
      0,
      0), func=self.Search, btn_default=1)
     self.SetHint(localization.GetByLabel('UI/Common/TypeInSearch'))
Beispiel #16
0
    def LoadTutorialVideos(self, panel, *args):
        if self.tutorialVideosLoaded:
            return

        def LoadIcon(icon, *args):
            icon.LoadIcon('res:/ui/texture/icons/bigplay_64.png')

        def GetSubContent(group):
            scrolllist = []
            for each in TUTORIAL_VIDEOS_INDEX.get_videos_in_group(group.index):
                node = dict(each)
                node['LoadIcon'] = LoadIcon
                scrolllist.append(
                    listentry.Get(data=node, decoClass=_TutorialVideoItem))

            return scrolllist

        scrolllist = []
        for index, each in TUTORIAL_VIDEOS_INDEX.get_groups():
            data = {
                'GetSubContent': GetSubContent,
                'BlockOpenWindow': True,
                'label': each,
                'showicon': 'hide',
                'showlen': 0,
                'index': index,
                'state': 'locked',
                'id': ('tutorialvideo', 'tutorialvideocat_%s' % index)
            }
            scrolllist.append(listentry.Get('Group', data))

        scroll = uicontrols.Scroll(parent=panel, align=uiconst.TOALL)
        scroll.LoadContent(contentList=scrolllist)
        self.tutorialVideosLoaded = True
Beispiel #17
0
 def CreateWindow(self):
     btns = []
     self.toolbarContainer = uiprimitives.Container(name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self)
     if eve.session.allianceid is None:
         corporation = sm.GetService('corp').GetCorporation(eve.session.corpid)
         if corporation.ceoID == eve.session.charid:
             createAllianceLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Home/CreateAlliance')
             btns.append([createAllianceLabel,
              self.CreateAllianceForm,
              None,
              None])
     elif eve.session.corprole & const.corpRoleDirector == const.corpRoleDirector:
         editAllianceLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Home/EditAlliance')
         declareWarLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Home/DeclareWar')
         btns.append([editAllianceLabel,
          self.EditAllianceForm,
          None,
          None])
         btns.append([declareWarLabel,
          self.DeclareWarForm,
          None,
          None])
     if len(btns):
         buttons = uicontrols.ButtonGroup(btns=btns, parent=self.toolbarContainer)
     self.toolbarContainer.height = 20 if not len(btns) else buttons.height
     self.sr.scroll = uicontrols.Scroll(parent=self, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding))
     if eve.session.allianceid is None:
         corpNotInAllianceLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Home/CorporationNotInAlliance', corpName=cfg.eveowners.Get(eve.session.corpid).ownerName)
         self.sr.scroll.Load(fixedEntryHeight=19, contentList=[], noContentHint=corpNotInAllianceLabel)
         return
     self.LoadScroll()
Beispiel #18
0
 def CreateWindow(self):
     btns = []
     self.toolbarContainer = uiprimitives.Container(name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self)
     if eve.session.allianceid is None:
         corporation = sm.GetService('corp').GetCorporation(eve.session.corpid)
         if corporation.ceoID == eve.session.charid:
             createAllianceLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Home/CreateAlliance')
             btns.append([createAllianceLabel,
              self.CreateAllianceForm,
              None,
              None])
     elif const.corpRoleChatManager & eve.session.corprole == const.corpRoleChatManager:
         addBulletinLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Home/AddBulletin')
         btns.append([addBulletinLabel,
          self.AddBulletin,
          None,
          None])
     if len(btns):
         buttons = uicontrols.ButtonGroup(btns=btns, parent=self.toolbarContainer)
     self.toolbarContainer.height = 20 if not len(btns) else buttons.height
     bulletinParent = uiprimitives.Container(name='bulletinParent', parent=self, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     uiprimitives.Container(name='push', parent=bulletinParent, align=uiconst.TOLEFT, width=const.defaultPadding)
     self.messageArea = uicontrols.Scroll(parent=bulletinParent)
     self.messageArea.HideBackground()
     self.messageArea.RemoveActiveFrame()
     if session.allianceid is not None:
         self.LoadBulletins()
Beispiel #19
0
    def _closure():
        winID = 'Insider' + name + 'Window'
        uicontrols.Window.CloseIfOpen(windowID=winID)
        wnd = uicontrols.Window.Open(windowID=winID)
        wnd.SetTopparentHeight(0)
        wnd.SetMinSize([minWidth, 100])
        wnd.SetCaption(caption)
        main = wnd.GetMainArea()
        scroll = uicontrols.Scroll(parent=main)
        scroll.sr.id = 'insider' + name + 'Scroll'

        def _updateList():
            while uicontrols.Window.IsOpen(windowID=winID):
                contentList, layout, headers = contentFunction()
                scrolllist = []
                for entry in contentList:
                    label = layout % entry
                    scrolllist.append(
                        uicontrols.ScrollEntryNode(
                            decoClass=uicontrols.SE_GenericCore, label=label))

                scroll.Load(contentList=scrolllist,
                            headers=headers,
                            fixedEntryHeight=18)
                blue.synchro.SleepWallclock(updateFreq)

        uthread.new(_updateList)
 def PanelShowStats(self, *args):
     """
     Show stats of current pin, kinda like showinfo
     """
     cont = uiprimitives.Container(parent=self.actionCont,
                                   pos=(0, 0, 0, 175),
                                   align=uiconst.TOTOP,
                                   state=uiconst.UI_HIDDEN)
     self.statsScroll = scroll = uicontrols.Scroll(parent=cont,
                                                   name='StatsScroll',
                                                   align=uiconst.TOTOP,
                                                   height=170)
     scroll.HideUnderLay()
     uicontrols.Frame(parent=scroll, color=(1.0, 1.0, 1.0, 0.2))
     scrolllist = []
     link = self.pin.link
     strCpuUsage = localization.GetByLabel('UI/PI/Common/TeraFlopsAmount',
                                           amount=int(link.GetCpuUsage()))
     data = util.KeyVal(
         label='%s<t>%s' %
         (localization.GetByLabel('UI/PI/Common/CpuUsage'), strCpuUsage))
     scrolllist.append(listentry.Get('Generic', data=data))
     strPowerUsage = localization.GetByLabel('UI/PI/Common/MegaWattsAmount',
                                             amount=int(
                                                 link.GetPowerUsage()))
     data = util.KeyVal(label='%s<t>%s' %
                        (localization.GetByLabel('UI/PI/Common/PowerUsage'),
                         strPowerUsage))
     scrolllist.append(listentry.Get('Generic', data=data))
     scroll.Load(contentList=scrolllist,
                 headers=[
                     localization.GetByLabel('UI/PI/Common/Attribute'),
                     localization.GetByLabel('UI/Common/Value')
                 ])
     return cont
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.specialGroups = util.GetNPCGroups()
     self.filterID = None
     self.scope = 'inflight'
     self.SetCaption(localization.GetByLabel('UI/Inflight/Scanner/ScannerFilterEditor'))
     self.SetMinSize([300, 250])
     self.SetWndIcon()
     self.SetTopparentHeight(0)
     self.sr.main = uiutil.GetChild(self, 'main')
     topParent = uiprimitives.Container(name='topParent', parent=self.sr.main, height=64, align=uiconst.TOTOP)
     topParent.padRight = 6
     topParent.padLeft = 6
     uicontrols.EveHeaderSmall(text=localization.GetByLabel('UI/Inflight/Scanner/FilterName'), parent=topParent, state=uiconst.UI_DISABLED, idx=0, top=2)
     nameEdit = uicontrols.SinglelineEdit(name='name', parent=topParent, setvalue=None, align=uiconst.TOTOP, maxLength=64)
     nameEdit.top = 16
     self.sr.nameEdit = nameEdit
     hint = uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Inflight/Scanner/SelectGroupsToFilter'), parent=topParent, align=uiconst.TOTOP)
     hint.top = 4
     self.sr.topParent = topParent
     self.sr.scroll = uicontrols.Scroll(parent=self.sr.main, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding))
     self.sr.scroll.multiSelect = 0
     self.DefineButtons(uiconst.OKCANCEL, okLabel=localization.GetByLabel('UI/Common/Buttons/Save'), okFunc=self.SaveChanges, cancelFunc=self.Close)
     self.scanGroupsNames = {const.probeScanGroupSignatures: localization.GetByLabel('UI/Inflight/Scanner/CosmicSignature'),
      const.probeScanGroupShips: localization.GetByLabel('UI/Inflight/Scanner/Ship'),
      const.probeScanGroupStructures: localization.GetByLabel('UI/Inflight/Scanner/Structure'),
      const.probeScanGroupDronesAndProbes: evetypes.GetCategoryNameByCategory(const.categoryDrone)}
     self.Maximize()
     self.OnResizeUpdate()
Beispiel #22
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     shipID = attributes.shipID
     cargoList = attributes.cargoList
     bp = sm.GetService('michelle').GetBallpark()
     if not bp:
         return
     slimItem = bp.slimItems[shipID]
     shipName = uix.GetSlimItemName(slimItem)
     self.SetCaption(
         localization.GetByLabel('UI/Ship/ShipScan/ShipNameCargo',
                                 shipName=shipName,
                                 cargoListLen=len(cargoList)))
     self.SetMinSize([200, 200])
     self.SetWndIcon(self.iconNum, mainTop=-13)
     self.DefineButtons(uiconst.CLOSE)
     self.sr.scroll = uicontrols.Scroll(
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     t = uicontrols.EveHeaderSmall(
         text=localization.GetByLabel('UI/Ship/ShipScan/hdrCargoScan'),
         parent=self.sr.topParent,
         left=8,
         state=uiconst.UI_DISABLED,
         align=uiconst.BOTTOMLEFT)
Beispiel #23
0
 def Load(self, args):
     sm.GetService('corpui').LoadTop(
         'res:/ui/Texture/WindowIcons/corporationdecorations.png',
         localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Members/Decorations/CorpMemberDecorations'
         ))
     if not self.sr.Get('inited', 0):
         if const.corpRolePersonnelManager & eve.session.corprole == const.corpRolePersonnelManager:
             btns = []
             btns.append([
                 localization.GetByLabel(
                     'UI/Corporations/CorporationWindow/Members/Decorations/CreateDecorationButton'
                 ), self.CreateDecorationForm, None, None
             ])
             self.toolbarContainer = uiprimitives.Container(
                 name='toolbarContainer',
                 align=uiconst.TOBOTTOM,
                 parent=self)
             buttons = uicontrols.ButtonGroup(btns=btns,
                                              parent=self.toolbarContainer)
             self.toolbarContainer.height = 20 if not len(
                 btns) else buttons.height
         self.sr.scroll = uicontrols.Scroll(
             name='decorations',
             parent=self,
             padding=(const.defaultPadding, const.defaultPadding,
                      const.defaultPadding, const.defaultPadding))
         self.sr.scroll.sr.id = 'corp_decorations_scroll'
         self.sr.inited = 1
     self.LoadDecorations()
Beispiel #24
0
 def DrawLeftSide(self):
     self.sr.leftside = uiprimitives.Container(name='leftside', parent=self.sr.main, align=uiconst.TOLEFT, width=256)
     uiprimitives.Container(name='push', parent=self.sr.leftside, align=uiconst.TOTOP, height=6)
     self.sr.leftMainPanel = uiprimitives.Container(name='leftMainPanel', parent=self.sr.leftside, align=uiconst.TOALL, pos=(const.defaultPadding,
      0,
      const.defaultPadding,
      0))
     dummyParent = uiprimitives.Container(name='dummy', parent=self.sr.leftMainPanel, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     ownerParent = uiprimitives.Container(name='ownerParent', parent=dummyParent, align=uiconst.TOTOP, height=20)
     uiprimitives.Container(name='push', parent=ownerParent, align=uiconst.TORIGHT, width=1)
     options = [(localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/PersonalFittings'), session.charid), (localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/CorporationFittings'), session.corpid)]
     selected = settings.user.ui.Get('savedFittingsCombo', None)
     if selected != session.charid and selected != session.corpid:
         selected = session.charid
     self.ownerID = selected
     self.sr.ownerCombo = uicontrols.Combo(label=None, parent=ownerParent, options=options, name='savedFittingsCombo', select=selected, callback=self.ChangeOwnerFilter, pos=(1, 1, 0, 0), align=uiconst.TOALL)
     searchContainer = uiprimitives.Container(name='searchContainer', parent=dummyParent, align=uiconst.TOTOP, top=const.defaultPadding, height=20)
     self.sr.searchTextField = uicontrols.SinglelineEdit(name='searchTextField', parent=searchContainer, align=uiconst.TOLEFT, width=160, maxLength=40, left=1)
     self.sr.searchTextField.OnReturn = self.Search
     self.sr.searchButton = uicontrols.Button(parent=searchContainer, label=localization.GetByLabel('UI/Common/Buttons/Search'), align=uiconst.CENTERRIGHT, func=self.Search)
     self.sr.scroll = uicontrols.Scroll(parent=dummyParent, align=uiconst.TOALL, padding=(0,
      const.defaultPadding,
      0,
      const.defaultPadding))
     self.sr.scroll.multiSelect = 0
     fitButtons = FlowContainer(name='buttonParent', parent=self.sr.leftside, align=uiconst.TOBOTTOM, padding=6, autoHeight=True, centerContent=True, contentSpacing=uiconst.BUTTONGROUPMARGIN, idx=0)
     self.exportButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Commands/Export'), func=self.ExportFittings, align=uiconst.NOALIGN)
     self.importButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Commands/Import'), func=self.ImportFittings, align=uiconst.NOALIGN)
     if boot.region != 'optic':
         self.importFromClipboardButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/ImportFromClipboard'), func=sm.GetService('fittingSvc').ImportFittingFromClipboard, align=uiconst.NOALIGN)
         self.importFromClipboardButton.hint = localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/ImportFromClipboardHint')
     self.DrawFittings()
Beispiel #25
0
    def Refresh(self, *args):
        self.station_inited = 0
        self.search_inited = 0
        self.filt_inited = 0
        try:
            self.scrollPosition[
                self.key] = self.sr.scroll.GetScrollProportion()
        except:
            self.scrollPosition[self.key] = 0.0

        uix.Flush(self.sr.main)
        self.sr.scroll = uicontrols.Scroll(
            parent=self.sr.main,
            padding=(const.defaultPadding, const.defaultPadding,
                     const.defaultPadding, const.defaultPadding))
        self.sr.scroll.sr.id = 'assets'
        self.sr.scroll.sr.minColumnWidth = {
            localization.GetByLabel('UI/Common/Name'): 44
        }
        self.sr.scroll.allowFilterColumns = 1
        self.sr.scroll.OnNewHeaders = self.ReloadTabs
        self.sr.scroll.sortGroups = True
        self.sr.scroll.SetColumnsHiddenByDefault(
            uix.GetInvItemDefaultHiddenHeaders())
        tabs = [
            [
                localization.GetByLabel('UI/Inventory/AssetsWindow/AllItems'),
                self.sr.scroll, self, 'allitems'
            ],
            [
                localization.GetByLabel('UI/Common/LocationTypes/Region'),
                self.sr.scroll, self, 'regitems'
            ],
            [
                localization.GetByLabel(
                    'UI/Common/LocationTypes/Constellation'), self.sr.scroll,
                self, 'conitems'
            ],
            [
                localization.GetByLabel('UI/Common/LocationTypes/SolarSystem'),
                self.sr.scroll, self, 'sysitems'
            ],
            [
                localization.GetByLabel('UI/Common/Buttons/Search'),
                self.sr.scroll, self, 'search'
            ]
        ]
        if eve.session.stationid:
            tabs.insert(4, [
                localization.GetByLabel('UI/Common/LocationTypes/Station'),
                self.sr.scroll, self, 'station'
            ])
        self.sr.maintabs = uicontrols.TabGroup(name='tabparent',
                                               parent=self.sr.main,
                                               idx=0,
                                               tabs=tabs,
                                               groupID='assetspanel',
                                               silently=True)
 def Load(self, key):
     alliancesLabel = localization.GetByLabel(
         'UI/Corporations/CorporationWindow/Alliances/Alliances')
     sm.GetService('corpui').LoadTop(
         'res:/ui/Texture/WindowIcons/alliances.png', alliancesLabel)
     if not self.sr.Get('inited', 0):
         self.sr.inited = 1
         self.sr.wndViewParent = uiprimitives.Container(
             name='wndViewParent',
             align=uiconst.TOALL,
             pos=(0, 0, 0, 0),
             parent=self)
         if session.allianceid:
             self.sr.contacts = form.ContactsForm(
                 name='alliancecontactsform',
                 parent=self,
                 pos=(0, 0, 0, 0),
                 startupParams=())
             self.sr.contacts.Setup('alliancecontact')
         else:
             self.sr.contacts = uicontrols.Scroll(
                 name='alliancecontactsform',
                 parent=self,
                 padding=(const.defaultPadding, const.defaultPadding,
                          const.defaultPadding, const.defaultPadding))
         homeLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Home')
         rnksLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Rankings')
         apliLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Applications')
         mbrsLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/Members')
         cntcLabel = localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Alliances/AllianceContacts')
         tabs = [
             [homeLabel, self.sr.wndViewParent, self, 'alliances_home'],
             [rnksLabel, self.sr.wndViewParent, self, 'alliances_rankings'],
             [
                 apliLabel, self.sr.wndViewParent, self,
                 'alliances_applications'
             ],
             [mbrsLabel, self.sr.wndViewParent, self, 'alliances_members'],
             [cntcLabel, self.sr.contacts, self, 'alliancecontact']
         ]
         if session.allianceid is not None:
             bulletinsLabel = localization.GetByLabel(
                 'UI/Corporations/CorporationWindow/Alliances/Bulletins')
             tabs.insert(0, [
                 bulletinsLabel, self.sr.wndViewParent, self,
                 'alliances_bulletins'
             ])
         self.sr.tabs = uicontrols.TabGroup(name='tabparent',
                                            parent=self,
                                            idx=0)
         self.sr.tabs.Startup(tabs, 'corpaccounts')
         return
     self.LoadViewClass(key)
Beispiel #27
0
    def ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        fileList = attributes.fileList
        self.selected = fileList[0][0] + '.pos'
        self.SetCaption('Assemble Starbase')
        self.MakeUnResizeable()
        self.SetMinSize([256, 256], 1)
        self.SetWndIcon(None)
        self.SetTopparentHeight(0)
        guts = uiprimitives.Container(
            parent=self.sr.main,
            pos=(const.defaultPadding, const.defaultPadding,
                 const.defaultPadding, const.defaultPadding),
            align=uiconst.TOALL)
        uicontrols.Combo(label='Select POS file',
                         parent=guts,
                         options=fileList,
                         name='fileselect',
                         select=0,
                         align=uiconst.TOTOP,
                         pos=(0, 20, 0, 0),
                         width=200,
                         callback=self.OnComboChange)
        scroll = uicontrols.Scroll(parent=guts,
                                   padding=(0, const.defaultPadding, 0,
                                            const.defaultPadding))
        scrolllist = []
        for cfgname, var, label, group in [
            ['posTowerAnchor', 'TowerAnchor', 'Anchor Control Tower', None],
            [
                'posTowerFuel', 'TowerFuel',
                'Fuel Control Tower (for onlining)', None
            ], ['posTowerOnline', 'TowerOnline', 'Online Control Tower', None],
            ['posStructAnchor', 'StructAnchor', 'Anchor All Structures', None],
            [
                'posStructFuel', 'StructFuel',
                'Fuel Control Tower (for structures)', None
            ],
            ['posStructOnline', 'StructOnline', 'Online All Structures', None],
            ['posArmWeapons', 'ArmWeapons', 'Arm Weapon Batteries', None]
        ]:
            data = util.KeyVal()
            data.label = label
            data.checked = True
            data.cfgname = cfgname
            data.retval = var
            data.group = group
            data.OnChange = self.CheckBoxChange
            le = listentry.Get('Checkbox', data=data)
            scrolllist.append(le)
            setattr(self, var, True)
            setattr(self, var + 'LE', le)

        scroll.Load(contentList=scrolllist)
        buttons = [['Execute', self.Execute, None, 81],
                   ['Cancel', self.Cancel, None, 81]]
        self.sr.main.children.insert(0, uicontrols.ButtonGroup(btns=buttons))
Beispiel #28
0
    def Load(self, args):
        toparea = sm.GetService('corpui').LoadTop(
            'res:/ui/Texture/WindowIcons/corporationmembers.png',
            localization.GetByLabel(
                'UI/Corporations/BaseCorporationUI/MemberList'),
            localization.GetByLabel('UI/Corporations/Common/UpdateDelay'))
        if not self.sr.Get('inited', 0):
            self.sr.inited = 1
            toppar = uiprimitives.Container(name='options',
                                            parent=self,
                                            align=uiconst.TOTOP,
                                            height=18,
                                            top=10)
            viewOptionsList2 = [(localization.GetByLabel('UI/Common/All'),
                                 None)]
            self.sr.roleGroupings = sm.GetService('corp').GetRoleGroupings()
            for grp in self.sr.roleGroupings.itervalues():
                if grp.roleGroupID in (1, 2):
                    for c in grp.columns:
                        role = c[1][0][1]
                        viewOptionsList2.append(
                            [role.shortDescription, role.roleID])

            i = 0
            self.sr.fltRole = uicontrols.Combo(
                label=localization.GetByLabel('UI/Corporations/Common/Role'),
                parent=toppar,
                options=viewOptionsList2,
                name='rolegroup',
                callback=self.OnFilterChange,
                width=146,
                pos=(5, 0, 0, 0))
            i += 1
            self.sr.fltOnline = c = uicontrols.Checkbox(
                text=localization.GetByLabel(
                    'UI/Corporations/CorporationWindow/Members/Tracking/OnlineOnly'
                ),
                parent=toppar,
                configName='online',
                retval=1,
                checked=0,
                align=uiconst.TOPLEFT,
                callback=self.OnFilterChange,
                pos=(self.sr.fltRole.width + 16, 0, 250, 0))
            self.quickFilter = QuickFilterEdit(name='filterMembers',
                                               parent=toppar,
                                               align=uiconst.TORIGHT,
                                               left=4)
            self.quickFilter.ReloadFunction = lambda: self.ShowMemberTracking()
            memberIDs = sm.GetService('corp').GetMemberIDs()
            cfg.eveowners.Prime(memberIDs)
            self.sr.scroll = uicontrols.Scroll(
                name='member_tracking',
                parent=self,
                padding=(const.defaultPadding, const.defaultPadding,
                         const.defaultPadding, const.defaultPadding))
            self.ShowMemberTracking()
Beispiel #29
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.invCookie = None
     self.invReady = 0
     self.optionsByItemType = {}
     self.itemToRepairDescription = ''
     self.repairSvc = util.Moniker('repairSvc', session.stationid2)
     self.invCache = sm.GetService('invCache')
     self.SetMinSize([350, 270])
     self.SetWndIcon(self.iconNum, mainTop=-4)
     uicontrols.WndCaptionLabel(
         text=localization.GetByLabel('UI/Station/Repair/RepairFacilities'),
         parent=self.sr.topParent,
         align=uiconst.RELATIVE)
     self.scope = 'station'
     btns = uicontrols.ButtonGroup(
         btns=[(localization.GetByLabel('UI/Commands/PickNewItem'),
                self.DisplayItems, (), 84),
               (localization.GetByLabel('UI/Commands/RepairItem'),
                self.QuoteItems, (), 84),
               (localization.GetByLabel('UI/Commands/RepairAll'),
                self.DoNothing, (), 84)])
     self.sr.main.children.append(btns)
     self.sr.pickSelect = btns
     self.sr.pickBtn = self.sr.pickSelect.GetBtnByLabel(
         localization.GetByLabel('UI/Commands/PickNewItem'))
     self.sr.selBtn = self.sr.pickSelect.GetBtnByLabel(
         localization.GetByLabel('UI/Commands/RepairItem'))
     self.sr.repairAllBtn = self.sr.pickSelect.GetBtnByLabel(
         localization.GetByLabel('UI/Commands/RepairAll'))
     cont = uiprimitives.Container(name='scroll',
                                   align=uiconst.TORIGHT,
                                   parent=self.sr.topParent,
                                   left=const.defaultPadding,
                                   width=200)
     self.sr.scroll = uicontrols.Scroll(
         parent=self.sr.main,
         padding=(const.defaultPadding, const.defaultPadding,
                  const.defaultPadding, const.defaultPadding))
     self.sr.scroll.sr.minColumnWidth = {
         localization.GetByLabel('UI/Common/Type'): 30
     }
     self.sr.avgDamage = uicontrols.EveLabelSmall(text='',
                                                  parent=cont,
                                                  name='avgDamage',
                                                  left=8,
                                                  top=0,
                                                  state=uiconst.UI_NORMAL,
                                                  align=uiconst.BOTTOMRIGHT)
     self.sr.totalCost = uicontrols.EveLabelSmall(text='',
                                                  parent=cont,
                                                  name='totalCost',
                                                  left=8,
                                                  top=12,
                                                  state=uiconst.UI_NORMAL,
                                                  align=uiconst.BOTTOMRIGHT)
     uthread.new(self.DisplayItems)
Beispiel #30
0
 def Load(self, args):
     if not self.sr.Get('inited', False):
         self.sr.inited = 1
         btns = None
         self.toolbarContainer = uiprimitives.Container(
             name='toolbarContainer', align=uiconst.TOBOTTOM, parent=self)
         if btns is not None:
             self.toolbarContainer.height = btns.height
         else:
             self.toolbarContainer.state = uiconst.UI_HIDDEN
         self.sr.contacts = form.ContactsForm(name='corpcontactsform',
                                              parent=self,
                                              pos=(0, 0, 0, 0))
         self.sr.contacts.Setup('corpcontact')
         self.sr.scroll = uicontrols.Scroll(
             name='standings',
             parent=self,
             padding=(const.defaultPadding, const.defaultPadding,
                      const.defaultPadding, const.defaultPadding))
         self.sr.tabs = uicontrols.TabGroup(name='tabparent',
                                            parent=self,
                                            idx=0)
         self.sr.tabs.Startup([
             [
                 localization.GetByLabel(
                     'UI/Corporations/CorporationWindow/Standings/CorpContacts'
                 ), self.sr.contacts, self, 'corpcontact'
             ],
             [
                 localization.GetByLabel(
                     'UI/Corporations/CorporationWindow/Standings/LikedBy'),
                 self.sr.scroll, self, 'mystandings_to_positive'
             ],
             [
                 localization.GetByLabel(
                     'UI/Corporations/CorporationWindow/Standings/DislikedBy'
                 ), self.sr.scroll, self, 'mystandings_to_negative'
             ]
         ],
                              'corporationstandings',
                              autoselecttab=1)
         return
     sm.GetService('corpui').LoadTop(
         'res:/ui/Texture/WindowIcons/corporationstandings.png',
         localization.GetByLabel(
             'UI/Corporations/CorporationWindow/Standings/CorpStandings'))
     self.SetHint()
     if type(args) == types.StringType and args.startswith('mystandings_'):
         self.sr.standingtype = args
         if args == 'mystandings_to_positive':
             positive = True
         else:
             positive = False
         self.ShowStandings(positive)
     else:
         self.sr.contacts.LoadContactsForm('corpcontact')