Esempio n. 1
0
 def ApplyAttributes(self, attributes):
     uicls.InfoPanelBase.ApplyAttributes(self, attributes)
     self.facwarSvc = sm.GetService('facwar')
     self.sovSvc = sm.GetService('sov')
     self.validNearBy = [
         const.groupAsteroidBelt, const.groupMoon, const.groupPlanet,
         const.groupWarpGate, const.groupStargate
     ]
     self.nearby = None
     self.locationTimer = None
     self.lastLocationID = None
     self.headerLabel = self.headerCls(name='header',
                                       parent=self.headerCont,
                                       align=uiconst.CENTERLEFT)
     self.headerLabel.SetRightAlphaFade(
         infoPanelConst.PANELWIDTH - infoPanelConst.LEFTPAD,
         self.HEADER_FADE_WIDTH)
     self.tidiIndicator = uicls.tidiIndicator(parent=self.headerCont,
                                              name='tidiIndicator',
                                              align=uiconst.CENTERLEFT,
                                              pos=(0, 0, 24, 24))
     self.nearestLocationInfo = uicontrols.EveLabelMedium(
         name='nearestLocationInfo',
         parent=self.mainCont,
         align=uiconst.TOTOP)
     self.sovLocationInfo = uicontrols.EveLabelMedium(
         name='sovLocationInfo',
         hint=localization.GetByLabel('UI/Neocom/Sovereignty'),
         parent=self.mainCont,
         align=uiconst.TOTOP)
 def Startup(self, *args):
     listentry.Generic.Startup(self, args)
     picCont = uiprimitives.Container(name='picture', parent=self, align=uiconst.TOLEFT, width=32)
     textCont = uiprimitives.Container(name='textCont', parent=self, align=uiconst.TOALL, padLeft=2)
     self.sr.picture = uiprimitives.Container(name='picture', parent=picCont, align=uiconst.TOPLEFT, pos=(0, 0, 32, 32))
     self.sr.label = uicontrols.EveLabelMedium(text='', parent=textCont, align=uiconst.TOTOP, height=16, state=uiconst.UI_NORMAL)
     self.sr.messageLabel = uicontrols.EveLabelMedium(text='', parent=textCont, align=uiconst.TOTOP, height=16, state=uiconst.UI_DISABLED, left=5)
Esempio n. 3
0
 def Startup(self, *args):
     self.OnSelectCallback = None
     self.sr.label = uicontrols.EveLabelSmall(
         text=localization.GetByLabel('UI/Neocom/NextDNAModification'),
         parent=self,
         left=8,
         top=4,
         maxLines=1)
     self.sr.respecTime = uicontrols.EveLabelMedium(text='',
                                                    parent=self,
                                                    left=8,
                                                    top=18,
                                                    maxLines=1)
     self.sr.numberOfRemaps = uicontrols.EveLabelMedium(
         text='',
         parent=self,
         left=8,
         top=38,
         maxLines=1,
         state=uiconst.UI_HIDDEN)
     self.sr.respecButton = uicontrols.Button(
         parent=self,
         label=localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/RemapStatsNow'
         ),
         align=uiconst.TOPRIGHT,
         pos=(2, 16, 0, 0),
         func=self.OpenRespecWindow,
         args=(False, ))
     self.hint = localization.GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/Attributes/CharacterSheetHint'
     )
Esempio n. 4
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.folder = attributes.get('folder', None)
     self.ownerID = None
     if self.folder is None:
         self.SetCaption(localization.GetByLabel('UI/PeopleAndPlaces/NewFolder'))
         self.isNew = True
     else:
         self.SetCaption(localization.GetByLabel('UI/PeopleAndPlaces/EditFolder'))
         self.isNew = False
     self.SetMinSize([280, 110])
     main = uiprimitives.Container(name='main', parent=self.sr.main, align=uiconst.TOALL, left=4, width=4)
     labelContainer = uiprimitives.Container(name='labelContainer', parent=main, align=uiconst.TOTOP, top=8, height=20, padding=(2, 2, 2, 2))
     uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/Name'), parent=labelContainer, align=uiconst.TOLEFT, width=60)
     self.nameEdit = uicontrols.SinglelineEdit(name='nameEdit', setvalue=self.folder.folderName if self.folder else '', parent=labelContainer, align=uiconst.TOALL, width=0)
     self.nameEdit.OnReturn = self.Confirm
     sectionContainer = uiprimitives.Container(name='sectionContainer', parent=main, align=uiconst.TOTOP, top=8, height=20, padding=(2, 2, 2, 2))
     uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/PeopleAndPlaces/LocationSection'), parent=sectionContainer, align=uiconst.TOLEFT, width=60)
     if not self.isNew or util.IsNPCCorporation(session.corpid):
         if not self.isNew and self.folder.ownerID == session.corpid:
             sectionName = localization.GetByLabel('UI/PeopleAndPlaces/CorporationLocations')
             self.ownerID = session.corpid
         else:
             sectionName = localization.GetByLabel('UI/PeopleAndPlaces/PersonalLocations')
             self.ownerID = session.charid
         uicontrols.EveLabelMedium(text=sectionName, parent=sectionContainer, align=uiconst.TOALL, width=60)
     else:
         ownerID = settings.char.ui.Get('bookmarkFolderDefaultOwner', session.charid)
         self.sectionCombo = uicontrols.Combo(name='sectionCombo', parent=sectionContainer, align=uiconst.TOALL, width=0, select=ownerID, options=[(localization.GetByLabel('UI/PeopleAndPlaces/PersonalLocations'), session.charid), (localization.GetByLabel('UI/PeopleAndPlaces/CorporationLocations'), session.corpid)])
     buttons = self.GetButtons()
     buttonGroup = uicontrols.ButtonGroup(name='buttonGroup', parent=main, btns=buttons)
     submitButton = buttonGroup.GetBtnByIdx(0)
     submitButton.OnSetFocus()
 def CreateActiveKillInfo(self):
     leftContainer = uiprimitives.Container(name='leftContainer',
                                            parent=self.sr.activekill,
                                            align=uiconst.TOALL,
                                            padding=(5, 0, 0, 0))
     rightContainer = uiprimitives.Container(name='rightContainer',
                                             parent=self.sr.activekill,
                                             align=uiconst.TORIGHT,
                                             padding=(0, 0, 5, 0))
     uicontrols.EveLabelMedium(
         text=localization.GetByLabel('UI/Sovereignty/KillsLast24H'),
         parent=leftContainer,
         align=uiconst.TOPLEFT)
     uicontrols.EveLabelMedium(
         text=localization.GetByLabel('UI/Sovereignty/CynoFieldsActive'),
         parent=leftContainer,
         align=uiconst.TOPLEFT,
         top=14)
     self.killsText = uicontrols.EveLabelMedium(text='0 / 0',
                                                parent=rightContainer,
                                                align=uiconst.TOPRIGHT)
     self.activeText = uicontrols.EveLabelMedium(text='0 / 0',
                                                 parent=rightContainer,
                                                 align=uiconst.TOPRIGHT,
                                                 top=14)
     maxwidth = max(self.killsText.width, self.activeText.width)
     rightContainer.width = maxwidth
     self.UpdateActiveKillInfo()
Esempio n. 6
0
 def AddEntry(self, rowPos, colPos, variableName, humanName,
              associatedObject):
     if not hasattr(associatedObject, variableName):
         uicontrols.EveLabelMedium(text=humanName +
                                   ': Not on current camera',
                                   parent=self.sr.main,
                                   align=uiconst.RELATIVE,
                                   left=colPos,
                                   top=rowPos)
     else:
         if variableName not in cameras.ORIGINAL_SETTINGS:
             cameras.ORIGINAL_SETTINGS[variableName] = getattr(
                 associatedObject, variableName)
         uicontrols.EveLabelMedium(text=humanName + ':',
                                   parent=self.sr.main,
                                   align=uiconst.RELATIVE,
                                   left=colPos,
                                   top=rowPos)
         edit = uicontrols.SinglelineEdit(name=variableName,
                                          readonly=False,
                                          parent=self.sr.main,
                                          maxLines=1,
                                          align=uiconst.RELATIVE,
                                          pos=(colPos + 145, rowPos - 5,
                                               100, 25),
                                          padding=(0, 0, 0, 0))
         edit.OnReturn = self.EditEnterPressed
         edit.associatedObject = associatedObject
         self.editControls.append(edit)
         edit.SetValue(str(getattr(associatedObject, variableName)))
     rowPos += 30
     return rowPos
 def Startup(self, *args):
     self.sr.main = uiprimitives.Container(name='main',
                                           parent=self,
                                           align=uiconst.TOALL,
                                           pos=(0, 0, 0, 0),
                                           padding=(0, 0, 0, 0))
     self.sr.main.OnDropData = self.OnDropData
     self.sr.icons = uiprimitives.Container(name='icons',
                                            parent=self.sr.main,
                                            align=uiconst.TOLEFT,
                                            pos=(0, 0, 40, 0),
                                            padding=(1, 0, 2, 0))
     self.sr.textstuff = uiprimitives.Container(name='textstuff',
                                                parent=self.sr.main,
                                                align=uiconst.TOALL,
                                                pos=(0, 0, 0, 0),
                                                padding=(0, 0, 0, 0))
     self.sr.infoIcons = uiprimitives.Container(name='textstuff',
                                                parent=self.sr.main,
                                                align=uiconst.TORIGHT,
                                                pos=(0, 0, 20, 0),
                                                padding=(0, 0, 0, 0))
     self.sr.status = uiprimitives.Container(name='status',
                                             parent=self.sr.icons,
                                             align=uiconst.TOLEFT,
                                             pos=(0, 0, 18, 0),
                                             padding=(0, 0, 0, 0))
     self.sr.icon = uiprimitives.Container(name='icon',
                                           parent=self.sr.icons,
                                           align=uiconst.TOALL,
                                           pos=(0, 0, 0, 0),
                                           padding=(0, 0, 0, 0))
     self.sr.name = uiprimitives.Container(name='name',
                                           parent=self.sr.textstuff,
                                           align=uiconst.TOTOP,
                                           pos=(0, 0, 0, 16),
                                           padding=(0, 0, 0, 0))
     self.sr.level = uiprimitives.Container(name='level',
                                            parent=self.sr.textstuff,
                                            align=uiconst.TOALL,
                                            pos=(0, 0, 0, 0),
                                            padding=(0, 0, 0, 0))
     self.sr.nameLabel = uicontrols.EveLabelMedium(
         text='',
         parent=self.sr.name,
         align=uiconst.TOPLEFT,
         state=uiconst.UI_DISABLED,
         maxLines=1)
     self.sr.levelLabel = uicontrols.EveLabelMedium(
         text='',
         parent=self.sr.level,
         align=uiconst.TOPLEFT,
         state=uiconst.UI_DISABLED,
         maxLines=1)
     self.sr.infoicon = InfoIcon(parent=self.sr.infoIcons,
                                 idx=0,
                                 align=uiconst.CENTERRIGHT,
                                 name='infoicon')
     self.sr.infoicon.OnClick = self.ShowInfo
 def ActivateKillRightMenu(self, menuParent):
     cont = menuParent.AddContainer(align=uiconst.TOTOP,
                                    padding=const.defaultPadding)
     cont.GetEntryWidth = lambda mc=cont: 230
     charName = cfg.eveowners.Get(self.charID).name
     charNamelabel = localization.GetByLabel(
         'UI/Contracts/ContractsWindow/ShowInfoLink',
         showInfoName=charName,
         info=('showinfo', const.typeCharacterAmarr, self.charID))
     if self.price is not None:
         headerText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/BuyKillRight')
         explainText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/PurchaseLabel',
             charName=charNamelabel)
         priceText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/AcativationCost',
             costAmount=util.FmtISK(self.price, 0))
     else:
         headerText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/ActivateKillRight')
         explainText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/ActivateLabel',
             charName=charNamelabel)
         priceText = ''
     headerLabel = uicontrols.EveLabelLarge(text=headerText,
                                            parent=cont,
                                            align=uiconst.TOTOP,
                                            state=uiconst.UI_NORMAL,
                                            bold=True)
     helpTextCont = uiprimitives.Container(name='helpTextCont',
                                           parent=cont,
                                           align=uiconst.TOTOP,
                                           height=40,
                                           padTop=const.defaultPadding)
     helpText = uicontrols.EveLabelMedium(text=explainText,
                                          parent=helpTextCont,
                                          state=uiconst.UI_NORMAL,
                                          align=uiconst.TOTOP,
                                          color=(1.0, 0.0, 0.0, 0.8))
     buttonCont = uiprimitives.Container(name='buttonCont',
                                         parent=cont,
                                         align=uiconst.TOTOP,
                                         height=20)
     priceLabel = uicontrols.EveLabelMedium(text=priceText,
                                            parent=buttonCont)
     buttonLabel = localization.GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/Activate')
     if self.price is None:
         self.func = 'ActivateKillRight'
         self.params = (self.killRightID, self.charID, self.shipID)
     else:
         self.func = 'BuyKillRight'
         self.params = (self.killRightID, self.charID, self.shipID,
                        self.price)
     self.activateBtn = uicontrols.Button(parent=buttonCont,
                                          label=buttonLabel,
                                          align=uiconst.TORIGHT,
                                          func=self.ActivateKillRight)
 def Startup(self, name, iconpath, flag, dogmaLocation):
     self.flag = flag
     self.sr.icon = uicontrols.Icon(parent=self,
                                    size=32,
                                    state=uiconst.UI_DISABLED,
                                    ignoreSize=True,
                                    icon=iconpath)
     self.sr.hint = name
     self.sr.hilite = uiprimitives.Fill(parent=self,
                                        name='hilite',
                                        align=uiconst.RELATIVE,
                                        state=uiconst.UI_HIDDEN,
                                        idx=-1,
                                        width=32,
                                        height=self.height)
     self.sr.icon.color.a = 0.8
     uiprimitives.Container(name='push',
                            parent=self,
                            align=uiconst.TOLEFT,
                            width=32)
     self.sr.statusCont = uiprimitives.Container(name='statusCont',
                                                 parent=self,
                                                 align=uiconst.TOLEFT,
                                                 width=50)
     self.sr.statustext1 = uicontrols.EveLabelMedium(
         text='status',
         parent=self.sr.statusCont,
         name='cargo_statustext',
         left=0,
         top=2,
         idx=0,
         state=uiconst.UI_DISABLED,
         align=uiconst.TOPRIGHT)
     self.sr.statustext2 = uicontrols.EveLabelMedium(
         text='status',
         parent=self.sr.statusCont,
         name='cargo_statustext',
         left=0,
         top=14,
         idx=0,
         state=uiconst.UI_DISABLED,
         align=uiconst.TOPRIGHT)
     m3TextCont = uiprimitives.Container(name='m3Cont',
                                         parent=self,
                                         align=uiconst.TOLEFT,
                                         width=12)
     self.sr.m3Text = uicontrols.EveLabelMedium(
         text=localization.GetByLabel(
             'UI/Fitting/FittingWindow/CubicMeters'),
         parent=m3TextCont,
         name='m3',
         left=4,
         top=14,
         idx=0,
         state=uiconst.UI_NORMAL)
     self.dogmaLocation = dogmaLocation
     sm.GetService('inv').Register(self)
     self.invReady = 1
Esempio n. 10
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
     self.controller.on_stats_changed.connect(self.UpdateCargoSpace)
     invController = self.GetInvController()
     self.sr.icon = uicontrols.Icon(parent=self,
                                    size=32,
                                    state=uiconst.UI_DISABLED,
                                    ignoreSize=True,
                                    icon=invController.GetIconName())
     self.sr.hint = invController.GetName()
     self.sr.hilite = Fill(parent=self,
                           name='hilite',
                           align=uiconst.RELATIVE,
                           state=uiconst.UI_HIDDEN,
                           idx=-1,
                           width=32,
                           height=self.height)
     self.sr.icon.color.a = 0.8
     Container(name='push', parent=self, align=uiconst.TOLEFT, width=32)
     self.sr.statusCont = Container(name='statusCont',
                                    parent=self,
                                    align=uiconst.TOLEFT,
                                    width=50)
     self.sr.statustext1 = uicontrols.EveLabelMedium(
         text='status',
         parent=self.sr.statusCont,
         name='cargo_statustext',
         left=0,
         top=2,
         idx=0,
         state=uiconst.UI_DISABLED,
         align=uiconst.TOPRIGHT)
     self.sr.statustext2 = uicontrols.EveLabelMedium(
         text='status',
         parent=self.sr.statusCont,
         name='cargo_statustext',
         left=0,
         top=14,
         idx=0,
         state=uiconst.UI_DISABLED,
         align=uiconst.TOPRIGHT)
     m3TextCont = Container(name='m3Cont',
                            parent=self,
                            align=uiconst.TOLEFT,
                            width=12)
     self.sr.m3Text = uicontrols.EveLabelMedium(
         text=localization.GetByLabel(
             'UI/Fitting/FittingWindow/CubicMeters'),
         parent=m3TextCont,
         name='m3',
         left=4,
         top=14,
         idx=0)
     sm.GetService('inv').Register(self)
     self.invReady = 1
     self.UpdateCargoSpace()
Esempio n. 11
0
 def CreateTextFeedback(self):
     self.pveText = uicontrols.EveLabelMedium(parent=self.sr.main,
                                              name='goodEffectText',
                                              align=uiconst.CENTERBOTTOM,
                                              top=66)
     self.pvpText = uicontrols.EveLabelMedium(parent=self.sr.main,
                                              name='badEffectText',
                                              align=uiconst.CENTERBOTTOM,
                                              top=48)
Esempio n. 12
0
 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 Startup(self):
     self.state = uiconst.UI_NORMAL
     self.shouldKill = False
     sub = uiprimitives.Container(name='sub',
                                  parent=self,
                                  align=uiconst.TOALL,
                                  pos=(0, 0, 0, 0),
                                  state=uiconst.UI_DISABLED)
     uicontrols.Frame(parent=self)
     uiprimitives.Fill(parent=self,
                       color=(0, 0, 0, 1),
                       idx=-1,
                       state=uiconst.UI_DISABLED)
     closex = uicontrols.Icon(icon='ui_38_16_220',
                              parent=self,
                              idx=0,
                              state=uiconst.UI_NORMAL,
                              align=uiconst.TOPRIGHT)
     closex.OnClick = self.CloseNotification
     closex.sr.hint = localization.GetByLabel('UI/Common/CloseNotification')
     iconCont = uiprimitives.Container(name='iconCont',
                                       parent=sub,
                                       align=uiconst.TOLEFT,
                                       pos=(0, 0, 60, 0))
     textCont = uiprimitives.Container(name='textCont',
                                       parent=sub,
                                       align=uiconst.TOALL,
                                       pos=(0, 0, 0, 0),
                                       state=uiconst.UI_NORMAL)
     self.sr.icon = uicontrols.Icon(parent=iconCont,
                                    icon='50_11',
                                    pos=(-2, 2, 64, 64),
                                    align=uiconst.CENTERLEFT,
                                    state=uiconst.UI_DISABLED)
     self.sr.headerText = uicontrols.EveLabelSmall(
         text='',
         parent=textCont,
         padTop=12,
         align=uiconst.TOTOP,
         state=uiconst.UI_DISABLED,
         bold=True)
     self.sr.text1 = uicontrols.EveLabelMedium(text='',
                                               parent=textCont,
                                               state=uiconst.UI_DISABLED,
                                               align=uiconst.TOTOP,
                                               padding=(0, -2, 4, 0))
     self.sr.text2 = uicontrols.EveLabelMedium(text='',
                                               parent=textCont,
                                               state=uiconst.UI_HIDDEN,
                                               align=uiconst.TOTOP,
                                               padding=(0, -2, 4, 0))
     self.sr.text3 = uicontrols.EveLabelMedium(text='',
                                               parent=textCont,
                                               state=uiconst.UI_HIDDEN,
                                               align=uiconst.TOTOP,
                                               padding=(0, -2, 4, 0))
 def SetEndPointDates(self):
     uix.Flush(self.sr.dates)
     uicontrols.EveLabelMedium(text=util.FmtDate(
         blue.os.GetWallclockTime()),
                               parent=self.sr.dates,
                               align=uiconst.TORIGHT)
     uicontrols.EveLabelMedium(text=util.FmtDate(
         blue.os.GetWallclockTime()),
                               parent=self.sr.dates,
                               align=uiconst.TOLEFT)
Esempio n. 15
0
 def Startup(self, *args):
     self.sr.picture = uiprimitives.Container(parent=self,
                                              pos=(0, 0, 64, 64),
                                              name='picture',
                                              state=uiconst.UI_DISABLED,
                                              align=uiconst.RELATIVE)
     self.sr.picture.width = 32
     self.sr.picture.height = 32
     self.sr.picture.left = 2
     self.sr.picture.top = 2
     self.sr.extraIconCont = uiprimitives.Container(
         name='extraIconCont',
         parent=self,
         idx=0,
         pos=(0, 0, 16, 16),
         align=uiconst.BOTTOMLEFT,
         state=uiconst.UI_HIDDEN)
     self.sr.namelabel = uicontrols.EveLabelMedium(
         text='', parent=self, state=uiconst.UI_DISABLED, idx=0)
     self.sr.contactLabels = uicontrols.EveLabelMedium(
         text='',
         parent=self,
         state=uiconst.UI_DISABLED,
         idx=0,
         align=uiconst.BOTTOMLEFT)
     self.sr.contactLabels.top = 2
     self.sr.voiceIcon = None
     self.sr.eveGateIcon = None
     l = uiprimitives.Line(parent=self,
                           align=uiconst.TOBOTTOM,
                           idx=0,
                           color=uiconst.ENTRY_LINE_COLOR)
     l.opacity = 0.05
     self.sr.standingLabel = uicontrols.EveLabelMedium(
         text='',
         parent=self,
         state=uiconst.UI_DISABLED,
         idx=0,
         align=uiconst.TOPRIGHT)
     self.sr.statusIcon = uiprimitives.Sprite(
         parent=self,
         name='statusIcon',
         align=uiconst.TOPRIGHT,
         pos=(3, 3, 10, 10),
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/Chat/Status.png',
         idx=0)
     self.sr.corpApplicationLabel = uicontrols.EveLabelMedium(
         text='',
         parent=self,
         state=uiconst.UI_DISABLED,
         idx=0,
         align=uiconst.CENTERRIGHT)
     self.sr.corpApplicationLabel.left = 16
     sm.RegisterNotify(self)
Esempio n. 16
0
 def Startup(self, *args):
     listentry.Generic.Startup(self, *args)
     self.bgColor = uiprimitives.Fill(bgParent=self, color=(0.0, 1.0, 0.0, 0.1), state=uiconst.UI_HIDDEN)
     qtyCont = uiprimitives.Container(name='qtyCont', parent=self, align=uiconst.TORIGHT, width=80, padRight=defaultPadding)
     self.itemCont = uiprimitives.Container(name='itemCont', parent=self, align=uiconst.TOALL, clipChildren=True)
     self.sr.label = uicontrols.EveLabelMedium(text='', parent=self.itemCont, state=uiconst.UI_DISABLED, maxLines=1, align=uiconst.CENTERLEFT)
     self.sr.qtyLabel = uicontrols.EveLabelMedium(text='', parent=qtyCont, state=uiconst.UI_DISABLED, maxLines=1, align=uiconst.CENTERRIGHT)
     iconCont = uiprimitives.Container(parent=self.itemCont, pos=(16, 0, 24, 24), align=uiconst.CENTERLEFT)
     uiprimitives.Sprite(bgParent=iconCont, name='background', texturePath='res:/UI/Texture/classes/InvItem/bgNormal.png')
     self.sr.icon = uicontrols.Icon(parent=iconCont, pos=(0, 1, 24, 24), align=uiconst.TOPLEFT, idx=0)
     self.sr.techIcon = uiprimitives.Sprite(name='techIcon', parent=iconCont, left=0, width=12, height=12, idx=0)
     self.sr.line.display = False
 def Startup(self, *args):
     LineUnderlay(parent=self, align=uiconst.TOBOTTOM)
     self.text = uicontrols.EveLabelMedium(
         parent=self,
         align=uiconst.TOTOP,
         state=uiconst.UI_NORMAL,
         padding=const.defaultPadding,
         linkStyle=uiconst.LINKSTYLE_REGULAR)
     self.postedBy = uicontrols.EveLabelMedium(parent=self,
                                               align=uiconst.BOTTOMRIGHT,
                                               state=uiconst.UI_NORMAL,
                                               maxLines=1,
                                               top=const.defaultPadding,
                                               left=const.defaultPadding)
Esempio n. 18
0
 def OnSpeakingEvent_Local(self, data):
     if self.destroyed:
         return
     caption = localization.GetByLabel(
         'UI/Fleet/FleetBroadcast/BroadcastEventSpeaking',
         charID=data.charID,
         channelName=data.channelName)
     iconName = '73_35'
     roleIcon = fleetbr.GetRoleIconFromCharID(data.charID)
     uix.Flush(self.sr.lastVoiceEventCont)
     t = uicontrols.EveLabelMedium(text=caption,
                                   parent=self.sr.lastVoiceEventCont,
                                   align=uiconst.TOALL,
                                   left=25,
                                   maxLines=1)
     lt = t
     lt.GetMenu = lambda: fleetbr.GetVoiceMenu(None, data.charID, data.
                                               channelID)
     lt.hint = localization.GetByLabel(
         'UI/Fleet/FleetBroadcast/VoiceBroadcastReceivedAt', time=data.time)
     icon = uicontrols.Icon(align=uiconst.RELATIVE,
                            left=6,
                            top=0,
                            icon=iconName,
                            width=16,
                            height=16)
     icon.state = uiconst.UI_DISABLED
     self.sr.lastVoiceEventCont.children.append(icon)
Esempio n. 19
0
 def AddLabeltext(self):
     """
          labeltext (label text)
          
          PARAMS:
             - height [int]    : text container height (not font height)
             - label [str]     : label text 
             - text [str]      : same as label
     """
     self.new = uiprimitives.Container(name='labeltextField',
                                       parent=self.parent,
                                       align=uiconst.TOTOP,
                                       height=self.type.get('height', 20))
     text = uicontrols.EveLabelMedium(text=self.type.get('text', ''),
                                      parent=self.new,
                                      align=uiconst.TOTOP,
                                      name='text',
                                      padding=(self.leftPush, 3, 0, 0),
                                      state=uiconst.UI_NORMAL)
     label = self.type.get('label', '')
     if label and label != '_hide':
         label = uicontrols.EveLabelSmall(text=label,
                                          parent=self.new,
                                          name='label',
                                          left=7,
                                          width=self.leftPush - 6,
                                          top=5)
         self.refresh.append((self.new, text, label))
     else:
         self.refresh.append((self.new, text))
Esempio n. 20
0
 def ApplyAttributes(self, attributes):
     uicontrols.SE_BaseClassCore.ApplyAttributes(self, attributes)
     self.sr.contractParent = uiprimitives.Container(
         parent=self,
         name='contractParent',
         align=uiconst.TOLEFT,
         state=uiconst.UI_PICKCHILDREN,
         padTop=2)
     self.sr.contractIconParent = uiprimitives.Container(
         parent=self.sr.contractParent,
         name='contractIconParent',
         align=uiconst.TOLEFT,
         width=self.iconSize + 5)
     self.sr.techIcon = uicontrols.Icon(parent=self.sr.contractIconParent,
                                        pos=(2, 2, 16, 16),
                                        align=uiconst.TOPLEFT,
                                        state=uiconst.UI_NORMAL)
     self.sr.icon = uicontrols.Icon(parent=self.sr.contractIconParent,
                                    pos=(2, 2, 32, 32),
                                    ignoreSize=True,
                                    align=uiconst.TOPLEFT,
                                    state=uiconst.UI_DISABLED)
     subPar = uiprimitives.Container(parent=self.sr.contractParent,
                                     name='contractLabelClipper',
                                     state=uiconst.UI_DISABLED,
                                     align=uiconst.TOALL,
                                     clipChildren=True,
                                     padLeft=2)
     self.sr.contractLabel = uicontrols.EveLabelMedium(
         parent=subPar,
         left=self.labelMargin,
         align=uiconst.TOTOP,
         padRight=const.defaultPadding)
Esempio n. 21
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     cmdname = attributes.cmdname
     self.SetCaption(uicore.cmd.FuncToDesc(cmdname))
     self.SetTopparentHeight(0)
     self.SetMainIconSize(0)
     self.MakeUnResizeable()
     self.MakeUnpinable()
     self.mouseCookie = uicore.event.RegisterForTriuiEvents(
         uiconst.UI_MOUSEUP, self.OnGlobalMouseUp)
     self.keyCookie = uicore.event.RegisterForTriuiEvents(
         uiconst.UI_KEYUP, self.OnGlobalKeyUp)
     currShortcut = uicore.cmd.GetShortcutStringByFuncName(
         cmdname) or localization.GetByLabel('UI/Common/None')
     lbl = uicontrols.EveLabelMedium(text=localization.GetByLabel(
         'UI/Commands/EnterNewShortcutPrompt', currShortcut=currShortcut),
                                     parent=self.sr.main,
                                     state=uiconst.UI_DISABLED,
                                     width=self.default_width - 100,
                                     left=50,
                                     top=10,
                                     maxLines=None)
     btnGroup = uicontrols.ButtonGroup(btns=[
         (localization.GetByLabel('UI/Common/Cancel'), self.Close, None)
     ],
                                       parent=self.sr.main,
                                       line=True)
     self.SetHeight(self.GetHeaderHeight() + lbl.textheight +
                    btnGroup.height + 20)
Esempio n. 22
0
 def GetEulaConfirmation(self):
     self.waitingForEula = 1
     self.eulaclosex.state = uiconst.UI_HIDDEN
     self.eulaBlock = uiprimitives.Fill(
         parent=self.eulaParent.parent,
         idx=self.eulaParent.parent.children.index(self.eulaParent) + 1,
         state=uiconst.UI_NORMAL,
         color=(0.0, 0.0, 0.0, 0.75))
     par = uiprimitives.Container(name='btnpar',
                                  parent=self.eulaBrowser,
                                  align=uiconst.TOBOTTOM,
                                  height=40,
                                  idx=0)
     self.scrollText = uicontrols.EveLabelMedium(
         text=localization.GetByLabel('UI/Login/ScrollToBottom'),
         parent=par,
         align=uiconst.CENTER,
         idx=0,
         state=uiconst.UI_NORMAL)
     btns = uicontrols.ButtonGroup(
         btns=[[
             localization.GetByLabel('UI/Login/Accept'), self.AcceptEula, 2,
             81, uiconst.ID_OK, 0, 0
         ],
               [
                   localization.GetByLabel('UI/Login/Decline'),
                   self.ClickExit, (), 81, uiconst.ID_CANCEL, 0, 1
               ]],
         line=0)
     btns.state = uiconst.UI_HIDDEN
     par.children.insert(0, btns)
     self.acceptbtns = btns
     self.pushButtons.SelectByID('eula')
     self.eulaBrowser.OnUpdatePosition = self.ScrollingEula
     self.waitingForEula = 1
 def Startup(self, *args):
     self.sr.label = uicontrols.EveLabelMedium(text='',
                                               parent=self,
                                               left=5,
                                               state=uiconst.UI_DISABLED,
                                               maxLines=1)
     self.sr.line = uiprimitives.Line(parent=self,
                                      align=uiconst.TOBOTTOM,
                                      color=uiconst.ENTRY_LINE_COLOR)
     self.sr.infoicon = uicontrols.InfoIcon(size=16,
                                            left=0,
                                            parent=self,
                                            idx=0,
                                            align=uiconst.CENTERRIGHT)
     self.sr.infoicon.OnClick = self.ShowInfo
     self.sr.icon = uiprimitives.Container(parent=self,
                                           width=24,
                                           height=24,
                                           left=2,
                                           top=1,
                                           align=uiconst.TOPLEFT)
     self.sr.events = ('OnClick', 'OnMouseDown', 'OnMouseUp', 'OnDblClick',
                       'OnMouseHover')
     for eventName in self.sr.events:
         setattr(self.sr, eventName, None)
Esempio n. 24
0
 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()
Esempio n. 25
0
 def ApplyAttributes(self, attributes):
     uicontrols.ContainerAutoSize.ApplyAttributes(self, attributes)
     data = attributes.data
     text = r'<fontsize=18><b>%s</b></fontsize> %s %s, by %s<br><br>%s' % (
         data.display_name, data.name, data.version, data.author,
         data.description)
     uicontrols.EveLabelMedium(text=text,
                               parent=self,
                               align=uiconst.TOTOP,
                               padding=const.defaultPadding)
     self.buttonCont = Container(name='buttonCont',
                                 parent=self,
                                 align=uiconst.TOTOP,
                                 height=18,
                                 padTop=4)
     for button in getattr(data.module, 'BUTTONS', ()):
         try:
             uicontrols.Button(parent=self.buttonCont,
                               align=uiconst.TORIGHT,
                               label=button[0],
                               func=button[1],
                               args=button[2],
                               padRight=4,
                               hint=button[3])
         except:
             pass
     LineThemeColored(parent=self, align=uiconst.TOTOP, padTop=4)
Esempio n. 26
0
 def _LoadSupportCareer(self, parent):
     funnelpar = uiprimitives.Container(name='funnelpar',
                                        parent=parent,
                                        align=uiconst.TOTOP)
     funnelpar.padTop = 4
     funneltext = uicontrols.EveLabelMedium(
         name='label',
         text=localization.GetByLabel('UI/Help/CareerAdvancementFull'),
         parent=funnelpar,
         align=uiconst.TOPLEFT,
         pos=(8, 0, 280, 0),
         state=uiconst.UI_NORMAL)
     funnelpar.height = funneltext.textheight + 4
     funnelbtnparent = uiprimitives.Container(name='funnelbtnparent',
                                              parent=parent,
                                              align=uiconst.TOTOP,
                                              width=96)
     funnelbtnparent.padTop = 4
     funnelbtn = uicontrols.Button(
         parent=funnelbtnparent,
         label=localization.GetByLabel('UI/Help/ShowCareerAgents'),
         func=self.ShowTutorialAgents,
         args=('support', ),
         pos=(6, 0, 0, 0),
         align=uiconst.TOPRIGHT)
     funnelbtnparent.height = funnelbtn.height + 4
     return funnelpar.height + funnelbtnparent.height + 8
Esempio n. 27
0
 def _LoadSupportHelpChannel(self, parent):
     helpchannelpar = uiprimitives.Container(name='helpchannelpar',
                                             parent=parent,
                                             align=uiconst.TOTOP)
     helpchannelpar.padTop = 4
     helptext = uicontrols.EveLabelMedium(
         name='label',
         text=localization.GetByLabel('UI/Help/JoinChannelHint'),
         parent=helpchannelpar,
         align=uiconst.TOPLEFT,
         pos=(8, 0, 280, 0),
         state=uiconst.UI_NORMAL)
     helpchannelpar.height = helptext.textheight + 4
     helpbtnparent = uiprimitives.Container(name='helpbtnparent',
                                            parent=parent,
                                            align=uiconst.TOTOP)
     helpbtnparent.padTop = 4
     helpchannelbtn = uicontrols.Button(
         parent=helpbtnparent,
         label=localization.GetByLabel('UI/Help/JoinChannel'),
         func=self.JoinHelpChannel,
         btn_default=0,
         align=uiconst.TOPRIGHT)
     helpchannelbtn.left = 6
     helpbtnparent.height = helpchannelbtn.height + 4
     return helpchannelpar.height + helpbtnparent.height + 8
Esempio n. 28
0
 def ApplyAttributes(self, attributes):
     form.ManageLabelsBase.ApplyAttributes(self, attributes)
     labelType = attributes.labelType
     self.storedSelection = []
     if labelType == 'contact':
         labelText = localization.GetByLabel(
             'UI/PeopleAndPlaces/LabelsTextContacts')
     elif labelType == 'corpcontact':
         labelText = localization.GetByLabel(
             'UI/PeopleAndPlaces/LabelsTextCorpContacts')
     else:
         labelText = localization.GetByLabel(
             'UI/PeopleAndPlaces/LabelsTextAllianceContacts')
     self.labelType = labelType
     self.sr.textCont.state = uiconst.UI_DISABLED
     text = uicontrols.EveLabelMedium(text=labelText,
                                      parent=self.sr.textCont,
                                      left=10,
                                      top=0,
                                      state=uiconst.UI_DISABLED,
                                      align=uiconst.TOALL)
     btns = uicontrols.ButtonGroup(
         btns=[[
             localization.GetByLabel('UI/Mail/AssignLabel'),
             self.AssignLabelFromBtn, None, 81
         ],
               [
                   localization.GetByLabel('UI/Mail/LabelRemove'),
                   self.RemoveLabelFromBtn, None, 81
               ]],
         parent=self.sr.bottom,
         idx=0,
         line=1)
     self.LoadScroll()
Esempio n. 29
0
 def _LoadSupportBugReport(self, parent):
     bugreportpar = uiprimitives.Container(name='bugreportpar',
                                           parent=parent,
                                           align=uiconst.TOTOP)
     bugreportpar.padTop = 4
     bugreporttext = uicontrols.EveLabelMedium(
         name='label',
         text=localization.GetByLabel('UI/Help/ReportBugFull'),
         parent=bugreportpar,
         align=uiconst.TOPLEFT,
         pos=(8, 0, 280, 0),
         state=uiconst.UI_NORMAL)
     bugreportpar.height = bugreporttext.textheight + 4
     bugreportbtnparent = uiprimitives.Container(name='bugreportbtnparent',
                                                 parent=parent,
                                                 align=uiconst.TOTOP,
                                                 width=96)
     bugreportbtnparent.padTop = 4
     bugreportbtn = uicontrols.Button(
         parent=bugreportbtnparent,
         label=localization.GetByLabel('UI/Help/ReportBug'),
         func=self.CreateBugReport,
         pos=(6, 0, 0, 0),
         align=uiconst.TOPRIGHT)
     bugreportbtnparent.height = bugreportbtn.height + 4
     return bugreportpar.height + bugreportbtnparent.height + 8
Esempio n. 30
0
 def Load(self, args):
     if not self.sr.Get('inited', 0):
         self.sr.inited = 1
         self.sr.wndButtonContainer = uiprimitives.Container(name='results', parent=self, align=uiconst.TOTOP, height=16)
         showHide = uiprimitives.Container(name='filters', parent=self.sr.wndButtonContainer, height=48, align=uiconst.TOTOP)
         uiprimitives.Line(parent=showHide, align=uiconst.TOTOP, top=15, color=(0.0, 0.0, 0.0, 0.25))
         uiprimitives.Line(parent=showHide, align=uiconst.TOTOP)
         self.sr.showHide = showHide
         uicontrols.EveHeaderSmall(text=localization.GetByLabel('UI/Corporations/BaseCorporationUI/Query'), parent=showHide, left=8, top=3, state=uiconst.UI_NORMAL)
         a = uicontrols.EveHeaderSmall(text='', parent=showHide, left=18, top=3, state=uiconst.UI_NORMAL, align=uiconst.TOPRIGHT)
         a.OnClick = self.ShowHideQuery
         a.GetMenu = None
         self.sr.ml = a
         expander = uiprimitives.Sprite(parent=showHide, pos=(6, 2, 11, 11), name='expandericon', state=uiconst.UI_NORMAL, texturePath='res:/UI/Texture/Shared/expanderDown.png', align=uiconst.TOPRIGHT)
         expander.OnClick = self.ShowHideQuery
         self.sr.showHideExp = expander
         self.sr.wndButtonContainer.state = uiconst.UI_HIDDEN
         wndQueryForm = self.sr.wndQuery.Load(self, self.PopulateView)
         wndQueryForm.align = uiconst.TOTOP
         wndQueryForm.height = 180
         self.sr.wndQueryForm = wndQueryForm
         wndForm = uiprimitives.Container(name='form', parent=self, align=uiconst.TOALL, pos=(0, 0, 0, 0))
         self.sr.wndForm = wndForm
         wndOutputTypeArea = uiprimitives.Container(name='output_type', parent=wndForm, align=uiconst.TOTOP, height=24)
         uiprimitives.Container(name='push', parent=wndOutputTypeArea, align=uiconst.TOTOP, height=6)
         label = uiprimitives.Container(name='text', parent=wndOutputTypeArea, align=uiconst.TOLEFT, width=150)
         uicontrols.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/ShowResultsUsingLabel'), parent=label, align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
         optlist = [[localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/SimpleList'), form.CorpMembersViewSimple], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/RoleManagementList'), form.CorpMembersViewRoleManagement], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/TaskManagementList'), form.CorpMembersViewTaskManagement]]
         countcombo = uicontrols.Combo(label='', parent=wndOutputTypeArea, options=optlist, name='resultViewType', callback=self.OnComboChange, width=146, align=uiconst.TOLEFT)
         self.sr.outputTypeCombo = countcombo
         self.sr.outputWindowContainer = None
         viewClass = self.sr.outputTypeCombo.GetValue()
         self.SwitchToView(viewClass)
     sm.GetService('corpui').LoadTop('res:/ui/Texture/WindowIcons/corporationmembers.png', localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/FindMemberInRole'))