예제 #1
0
파일: log.py 프로젝트: R4M80MrX/eve-1
 def ApplyAttributes(self, attributes):
     uicls.Window.ApplyAttributes(self, attributes)
     self.SetCaption(localization.GetByLabel('UI/Accessories/Log/Log'))
     self.SetMinSize([256, 100])
     self.SetWndIcon('ui_34_64_4', hidden=True)
     self.SetTopparentHeight(0)
     self.SetScope('all')
     margin = const.defaultPadding
     scroll = uicls.Scroll(parent=self.sr.main, padding=const.defaultPadding)
     scroll.padTop = 20
     scroll.Load(contentList=[], fixedEntryHeight=18, headers=[localization.GetByLabel('UI/Common/DateWords/Time'), localization.GetByLabel('UI/Accessories/Log/Type'), localization.GetByLabel('UI/Accessories/Log/Message')])
     scroll.sr.id = 'logScroll'
     self.sr.scroll = scroll
     self.settingMenu = uicls.UtilMenu(menuAlign=uiconst.TOPLEFT, parent=self.sr.main, align=uiconst.TOPLEFT, GetUtilMenu=self.GetNotificationsSettingsMenu, left=const.defaultPadding, label=localization.GetByLabel('UI/Accessories/Log/CombatSettings'), texturePath='res:/UI/Texture/Icons/38_16_229.png', closeTexturePath='res:/UI/Texture/Icons/38_16_230.png')
     self.filterMenu = uicls.UtilMenu(menuAlign=uiconst.TOPRIGHT, parent=self.sr.main, align=uiconst.TOPRIGHT, GetUtilMenu=self.GetLogFilterMenu, left=const.defaultPadding, width=20, height=20, iconSize=16, texturePath='res:/UI/Texture/Icons/38_16_205.png')
     self.localizedMessages = {'error': localization.GetByLabel('UI/Accessories/Log/LogError'),
      'warning': localization.GetByLabel('UI/Accessories/Log/LogWarn'),
      'slash': localization.GetByLabel('UI/Accessories/Log/LogSlash'),
      'combat': localization.GetByLabel('UI/Accessories/Log/LogCombat'),
      'notify': localization.GetByLabel('UI/Accessories/Log/LogNotify'),
      'question': localization.GetByLabel('UI/Accessories/Log/LogQuestion'),
      'info': localization.GetByLabel('UI/Accessories/Log/LogInfo'),
      'hint': localization.GetByLabel('UI/Accessories/Log/LogHint')}
     self.LoadAllMessages()
     self.timer = base.AutoTimer(1000, self.CheckMessages)
예제 #2
0
 def ConstructNormal(self):
     self.mainCont.Flush()
     self.state = uiconst.UI_NORMAL
     top = 0
     for bmInfo in sm.GetService('infoPanel').GetAgentMissions():
         if isinstance(bmInfo.missionNameID, (int, long)):
             missionName = localization.GetByMessageID(bmInfo.missionNameID)
         else:
             missionName = bmInfo.missionNameID
         missionHint = MissionInfo(parent=self.mainCont,
                                   infoPanelMissions=self,
                                   align=uiconst.TOPLEFT,
                                   bmInfo=bmInfo,
                                   left=0,
                                   top=top)
         m = uicls.UtilMenu(
             menuAlign=uiconst.TOPLEFT,
             parent=self.mainCont,
             align=uiconst.TOPLEFT,
             top=top,
             left=20,
             label=missionName,
             texturePath='res:/UI/Texture/Icons/38_16_229.png',
             closeTexturePath='res:/UI/Texture/Icons/38_16_230.png',
             GetUtilMenu=(self.MissionMenu, bmInfo),
             maxWidth=infoPanelConst.PANELWIDTH - infoPanelConst.LEFTPAD)
         left = m.width + 4
         top += 20
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.ownerID = attributes.ownerID
     if self.ownerID == session.charid:
         self.myView = True
     else:
         self.myView = False
     self.quickFilterSetting = 'applicationsQuickFilter_OwnerID%s' % self.ownerID
     self.filteringBy = settings.char.ui.Get(self.quickFilterSetting, '')
     self.showingOld = settings.char.ui.Get('applicationsShowOld_%s' % self.ownerID, False)
     self.InitViewingStatus()
     self.topContainer = uiprimitives.Container(parent=self, name='topContainer', align=uiconst.TOTOP, height=20, padding=const.defaultPadding)
     self.quickFilter = uicls.QuickFilterEdit(parent=self.topContainer, align=uiconst.CENTERRIGHT, setvalue=self.filteringBy)
     self.quickFilter.ReloadFunction = self.OnSearchFieldChanged
     self.quickFilter.OnReturn = self.SearchByCharacterName
     self.statusFilter = uicls.UtilMenu(parent=self.topContainer, align=uiconst.CENTERRIGHT, padding=(1, 1, 1, 1), left=103, GetUtilMenu=self.StatusFilterMenu, texturePath='res:/ui/texture/icons/38_16_205.png', hint=localization.GetByLabel('UI/Corporations/CorpApplications/FilterByStatus'))
     self.inviteButton = Button(name='inviteButton', align=uiconst.CENTERLEFT, parent=self.topContainer, label=localization.GetByLabel('UI/Corporations/CorpApplications/InviteToCorp'), func=self.OpenInviteWindow)
     if not const.corpRolePersonnelManager & session.corprole == const.corpRolePersonnelManager:
         self.inviteButton.display = False
     if self.myView:
         self.topContainer.display = False
     self.applicationContainer = uiprimitives.Container(name='applications', parent=self, align=uiconst.TOALL, padding=const.defaultPadding)
     self.applicationScroll = uicontrols.BasicDynamicScroll(name='applicationsScroll', parent=self.applicationContainer, align=uiconst.TOALL)
     self.applicationScroll.noContentHint = localization.GetByLabel('UI/Corporations/CorpApplications/NoApplicationsFound')
     self.applicationScroll.multiSelect = 0
예제 #4
0
 def Load(self, node):
     listentry.Generic.Load(self, node)
     self.portraitCont.Flush()
     self.utilMenuCont.Flush()
     data = self.data = node
     charID = self.charID = data.charID
     killRight = data.killRight
     self.killRightID = killRight.killRightID
     self.price = killRight.price
     self.restrictedTo = killRight.restrictedTo
     isMine = data.isMine
     self.inWatchlist = sm.GetService('addressbook').IsInWatchlist(charID)
     charName = cfg.eveowners.Get(charID).name
     self.nameText = localization.GetByLabel(
         'UI/Contracts/ContractsWindow/ShowInfoLink',
         showInfoName=charName,
         info=('showinfo', const.typeCharacterAmarr, charID))
     portrait = uicls.Sprite(parent=self.portraitCont,
                             align=uiconst.TOPRIGHT,
                             pos=(0, 2, 64, 64),
                             state=uiconst.UI_PICKCHILDREN)
     sm.GetService('photo').GetPortrait(charID, 64, portrait)
     self.SetRelationship(data)
     self.statusIcon = uicls.Sprite(
         parent=self.portraitCont,
         name='statusIcon',
         pos=(2, 3, 10, 10),
         state=uiconst.UI_NORMAL,
         texturePath='res:/UI/Texture/classes/Chat/Status.png',
         idx=0)
     if not self.inWatchlist:
         self.statusIcon.display = False
     else:
         self.statusIcon.display = False
         online = sm.GetService('onlineStatus').GetOnlineStatus(charID,
                                                                fetch=False)
         self.SetOnline(online)
     uthread.new(self.SetTimeRemaining)
     if self.price is not None:
         self.saleLabel.display = True
         self.availableLabel.display = True
         saleText, availableText = self.GetForSaleText()
         if self.price > 0:
             self.saleLabel.text = saleText
         else:
             self.availableLabel.top = 19
         self.availableLabel.text = availableText
     else:
         self.saleLabel.display = False
         self.availableLabel.display = False
     if isMine:
         self.utilMenuCont.display = True
         utilMenu = uicls.UtilMenu(
             menuAlign=uiconst.TOPRIGHT,
             parent=self.utilMenuCont,
             align=uiconst.CENTERRIGHT,
             GetUtilMenu=self.SellKillRight,
             texturePath='res:/UI/Texture/Icons/73_16_50.png',
             left=2)
예제 #5
0
파일: eveWindow.py 프로젝트: R4M80MrX/eve-1
 def SetUtilMenu(self, utilMenuFunc):
     if self.sr.tab:
         self.sr.tab.SetUtilMenu(utilMenuFunc)
     else:
         self.sr.caption.left = 20
         utilMenu = uicls.UtilMenu(menuAlign=uiconst.TOPLEFT, parent=self.sr.captionParent, align=uiconst.TOPLEFT, GetUtilMenu=utilMenuFunc, texturePath='res:/UI/Texture/Icons/73_16_50.png', pos=(const.defaultPadding,
          1,
          14,
          14))
예제 #6
0
 def ConstructHeaderButton(self):
     return uicls.UtilMenu(name='headerButton',
                           parent=self.headerBtnCont,
                           align=uiconst.CENTERRIGHT,
                           menuAlign=uiconst.TOPLEFT,
                           pos=(0, 0, self.topCont.height,
                                self.topCont.height),
                           iconSize=18,
                           texturePath=self.default_iconTexturePath,
                           GetUtilMenu=self.GetSettingsMenu)
예제 #7
0
파일: tabgroup.py 프로젝트: R4M80MrX/eve-1
 def SetUtilMenu(self, utilMenuFunc):
     self.sr.label.left = 14
     utilMenu = uicls.UtilMenu(
         menuAlign=uiconst.TOPLEFT,
         parent=self,
         align=uiconst.TOPLEFT,
         GetUtilMenu=utilMenuFunc,
         texturePath='res:/UI/Texture/Icons/73_16_50.png',
         pos=(const.defaultPadding, const.defaultPadding, 14, 14))
     self.UpdateTabSize()
     self.sr.tabgroup.UpdateSizes()
예제 #8
0
    def Load(self):
        self.Flush()
        toggleButtonCont = Container(name='btnGroupCont',
                                     parent=self,
                                     align=uiconst.TOTOP,
                                     height=45)
        btnGroup = ToggleButtonGroup(parent=toggleButtonCont,
                                     align=uiconst.CENTER,
                                     height=toggleButtonCont.height,
                                     width=330,
                                     padding=(10, 4, 10, 3),
                                     callback=self.LoadMasteryLevel)
        for level, iconPath in BUTTONS:
            hint = localization.GetByLabel(
                'UI/InfoWindow/MasteryLevelButtonHint', level=level)
            if level == 5:
                color = Color(*shipTreeConst.COLOR_MASTERED).SetBrightness(
                    0.2).GetRGBA()
            else:
                color = Color(
                    *shipTreeConst.COLOR_BG).SetBrightness(0.35).GetRGBA()
            btnGroup.AddButton(btnID=level,
                               iconPath=iconPath,
                               iconSize=45,
                               hint=hint,
                               colorSelected=color)

        self.masteryHeader = Container(name='masteryHeader',
                                       parent=self,
                                       align=uiconst.TOTOP,
                                       height=25)
        self.settingsMenu = uicls.UtilMenu(
            menuAlign=uiconst.TOPLEFT,
            parent=self.masteryHeader,
            align=uiconst.BOTTOMLEFT,
            left=4,
            GetUtilMenu=self.GetSettingsMenu,
            texturePath='res:/UI/Texture/SettingsCogwheel.png',
            width=16,
            height=16,
            iconSize=18)
        self.masteryTimeLabel = EveLabelMediumBold(name='masteryTimeLabel',
                                                   parent=self.masteryHeader,
                                                   align=uiconst.BOTTOMLEFT,
                                                   left=24)
        self.masteryScroll = Scroll(name='masteryScroll',
                                    parent=self,
                                    padding=const.defaultPadding)
        level = sm.GetService('certificates').GetCurrCharMasteryLevel(
            self.typeID)
        level = max(level, 1)
        btnGroup.SelectByID(level)
예제 #9
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     self.ownerID = attributes.ownerID
     if self.ownerID == session.charid:
         self.myView = True
     else:
         self.myView = False
     self.quickFilterSetting = 'applicationsQuickFilter_OwnerID%s' % self.ownerID
     self.filteringBy = settings.char.ui.Get(self.quickFilterSetting, '')
     self.showingOld = settings.char.ui.Get(
         'applicationsShowOld_%s' % self.ownerID, False)
     self.InitViewingStatus()
     self.topContainer = uicls.Container(parent=self,
                                         name='topContainer',
                                         align=uiconst.TOTOP,
                                         height=20)
     self.quickFilter = uicls.QuickFilterEdit(parent=self.topContainer,
                                              align=uiconst.TOPRIGHT,
                                              padding=(1, 1, 1, 1),
                                              setvalue=self.filteringBy)
     self.quickFilter.ReloadFunction = self.OnSearchFieldChanged
     self.quickFilter.OnReturn = self.SearchByCharacterName
     self.statusFilter = uicls.UtilMenu(
         parent=self.topContainer,
         align=uiconst.TOPRIGHT,
         padding=(1, 1, 1, 1),
         left=100,
         GetUtilMenu=self.StatusFilterMenu,
         texturePath='res:/ui/texture/icons/38_16_205.png',
         hint=localization.GetByLabel(
             'UI/Corporations/CorpApplications/FilterByStatus'))
     if self.myView:
         self.topContainer.display = False
     self.applicationContainer = uicls.Container(name='applications',
                                                 parent=self,
                                                 align=uiconst.TOALL)
     self.applicationScroll = uicls.BasicDynamicScroll(
         name='applicationsScroll',
         parent=self.applicationContainer,
         align=uiconst.TOALL)
     self.applicationScroll.noContentHint = localization.GetByLabel(
         'UI/Corporations/CorpApplications/NoApplicationsFound')
     self.applicationScroll.multiSelect = 0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.scope = 'all'
     self.sr.browser = uicontrols.Edit(parent=self.sr.main, padding=const.defaultPadding, readonly=1)
     self.sr.browser.HideBackground(True)
     self.sr.browser.AllowResizeUpdates(0)
     self.sr.browser.sr.window = self
     m = uicls.UtilMenu(menuAlign=uiconst.TOPRIGHT, parent=self.sr.topParent, align=uiconst.TOPRIGHT, left=const.defaultPadding, top=18, GetUtilMenu=self.SettingMenu, texturePath='res:/UI/Texture/Icons/73_16_50.png')
     self.nextFunc = attributes.nextFunc
     self.backFunc = attributes.backFunc
     self.onStartScalingWidth = None
     self.onStartScalingHeight = None
     self.constrainScreen = True
     if self.sr.stack is not None:
         self.sr.stack.RemoveWnd(self, 0, 0)
     if sm.GetService('tutorial').IsTutorialWindowUnkillable():
         self.MakeUnKillable()
         repairSysSkill = sm.GetService('skills').HasSkill(const.typeRepairSystems)
         shieldOpsSkill = sm.GetService('skills').HasSkill(const.typeShieldOperations)
         if repairSysSkill or shieldOpsSkill:
             self.MakeKillable()
     Sprite(parent=self.sr.topParent, name='mainicon', pos=(0, 2, 64, 64), texturePath='res:/UI/Texture/Icons/74_64_13.png')
     self.HideHeader()
     self.MakeUnstackable()
     self.SetMinSize([350, 220])
     self.imgpar = uiprimitives.Container(name='imgpar', parent=self.sr.main, align=uiconst.TOLEFT, width=64, idx=4, state=uiconst.UI_HIDDEN, clipChildren=1)
     imgparclipper = uiprimitives.Container(name='imgparclipper', parent=self.imgpar, align=uiconst.TOALL, left=5, top=5, width=5, height=5, clipChildren=1)
     self.img = uiprimitives.Sprite(parent=imgparclipper, align=uiconst.RELATIVE, left=1, top=1)
     self.bottomCont = uiprimitives.Container(name='bottom', parent=self.sr.maincontainer, align=uiconst.TOBOTTOM, height=32, idx=0)
     self.backBtn = Button(parent=self.bottomCont, label=localization.GetByLabel('UI/Commands/Back'), name='tutorialBackBtn', func=self.backFunc, align=uiconst.TOLEFT, padding=(8, 0, 0, 6))
     self.nextBtn = Button(parent=self.bottomCont, label=localization.GetByLabel('UI/Commands/Next'), name='tutorialNextBtn', func=self.nextFunc, align=uiconst.TORIGHT, padding=(0, 0, 8, 6), btn_default=1)
     self.Confirm = self.nextFunc
     self.sr.text = uicontrols.EveLabelMedium(text='', parent=self.bottomCont, state=uiconst.UI_DISABLED, align=uiconst.CENTER)
     top = self.tTop = uiprimitives.Container(name='tTop', parent=self.sr.topParent, align=uiconst.TOALL, padding=(64, 0, 24, 0), idx=0)
     self.captionText = uicontrols.EveLabelLarge(text='', parent=top, align=uiconst.TOTOP, top=10, state=uiconst.UI_DISABLED)
     self.captionText.OnSizeChanged = self.CheckTopHeight
     self.subcaption = uicontrols.Label(text='', parent=top, align=uiconst.TOTOP, state=uiconst.UI_DISABLED, fontsize=18, color=TutorialColor.HINT_FRAME)
     self.sr.browser.AllowResizeUpdates(1)
     self.SetParent(uicore.layer.abovemain)
     uicore.animations.SpSwoopBlink(self.blinkFill, rotation=math.pi - 0.5, duration=3.0, loops=TutorialConstants.NUM_BLINKS)
     uicore.animations.SpSwoopBlink(self.blinkBorder, rotation=math.pi - 0.5, duration=3.0, loops=TutorialConstants.NUM_BLINKS)