def ConstructLayout(self):
     corpName = cfg.eveowners.Get(self.corpid).name
     corpInfoCont = uiprimitives.Container(name='corpInfo', parent=self.sr.main, align=uiconst.TOTOP, height=68, padding=const.defaultPadding)
     corpLogoCont = uiprimitives.Container(name='corpLogo', parent=corpInfoCont, align=uiconst.TOLEFT, width=68)
     corpTextCont = uiprimitives.Container(name='corpName', parent=corpInfoCont, align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(name='corpInfo', parent=self.sr.main, align=uiconst.TOALL, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     uiutil.GetOwnerLogo(corpLogoCont, self.corpid, size=64, noServerCall=True)
     corpText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/ApplyForMembership', corporation=corpName)
     corpNameLabel = uicontrols.EveLabelLarge(parent=corpTextCont, text=corpText, top=12, align=uiconst.TOPLEFT, width=270)
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, align=uiconst.TOTOP)
     tax = self.corporation.taxRate * 100
     taxText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CurrentTaxRateForCorporation', corporation=corpName, taxRate=tax)
     taxLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=taxText, align=uiconst.TOBOTTOM)
     corpService = sm.GetService('corp')
     aggressionSettings = corpService.GetAggressionSettings(self.corpid)
     statusText = corpService.GetCorpFriendlyFireStatus(aggressionSettings)
     ffText = localization.GetByLabel('UI/Corporations/FriendlyFire/FriendlyFireStatus', ffStatus=statusText)
     ffCont = uiprimitives.Container(parent=applicationCont, align=uiconst.TOBOTTOM, height=16)
     friendlyFireLabel = uicontrols.EveLabelSmall(parent=ffCont, text=ffText, align=uiconst.TOLEFT)
     helpIcon = MoreInfoIcon(parent=ffCont, align=uiconst.TORIGHT, hint=localization.GetByLabel('UI/Corporations/FriendlyFire/Description'))
     if self.corporation and not self.corporation.isRecruiting:
         notRecruitingText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/RecruitmentMayBeClosed')
         notRecruiting = uicontrols.EveLabelSmall(parent=applicationCont, text=notRecruitingText, align=uiconst.TOBOTTOM, idx=0)
         self.SetMinSize((self.default_width, self.default_height + notRecruiting.textheight), refresh=True)
     self.applicationText = uicls.EditPlainText(setvalue='', parent=applicationCont, align=uiconst.TOALL, maxLength=1000)
예제 #2
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.SetWndIcon(self.iconNum, mainTop=-8)
     wndCaption = WndCaptionLabel(text=GetByLabel(
         self.default_captionLabelPath),
                                  parent=self.sr.topParent,
                                  align=uiconst.RELATIVE)
     left = wndCaption.left + wndCaption.textwidth + 4
     self.helpIcon = MoreInfoIcon(parent=self.sr.topParent,
                                  hint=GetByLabel(
                                      self.explanationLabelPath),
                                  left=left,
                                  top=10)
     if not settings.user.ui.Get('accessGroup_seenExtraInfo', False):
         self.helpIcon.ConstructGlow()
         uicore.animations.BlinkIn(self.helpIcon.bgGradient,
                                   startVal=0.1,
                                   endVal=0.5,
                                   duration=1.0,
                                   loops=uiconst.ANIM_REPEAT,
                                   curveType=uiconst.ANIM_BOUNCE)
         self.helpIcon.OnMouseEnter = self.OnHelpIconMouseEnter
     self.controller = sm.GetService(
         'structureControllers').GetAccessGroupController()
     self.mainCont = Container(name='mainCont',
                               parent=self.sr.main,
                               padding=4)
     self.searchCont = SearchCont(name='seachCont',
                                  parent=self.sr.topParent,
                                  align=uiconst.BOTTOMRIGHT,
                                  height=30,
                                  top=6,
                                  controller=self.controller)
     groupListParent = DragResizeCont(name='groupListCont',
                                      parent=self.mainCont,
                                      align=uiconst.TOLEFT_PROP,
                                      minSize=0.1,
                                      maxSize=0.5,
                                      defaultSize=0.5)
     self.groupCont = GroupCont(name='groupCont',
                                parent=self.mainCont,
                                padding=(0, 2, 0, 2),
                                controller=self.controller)
     self.groupListCont = GroupListCont(name='groupListCont',
                                        parent=groupListParent,
                                        controller=self.controller)
예제 #3
0
 def Startup(self, *args):
     LabelTextTop.Startup(self, args)
     self.statusText = ''
     self.changeAtTime = None
     self.isEnabled = True
     self.SetCorpFFStatus()
     helpIcon = MoreInfoIcon(parent=self, align=uiconst.CENTERRIGHT, hint=localization.GetByLabel('UI/Corporations/FriendlyFire/Description'))
     self.ffButton = Button(name='ffButton', align=uiconst.CENTERRIGHT, parent=self, label='', func=self.OnFFClick, left=20)
     self.UpdateButton()
     canEditCorp = not util.IsNPC(session.corpid) and const.corpRoleDirector & session.corprole == const.corpRoleDirector
     if not canEditCorp:
         self.ffButton.display = False
예제 #4
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.schedule = attributes.schedule
     self.requiredHours = self.schedule.GetRequiredHours()
     self.schedulerCallback = attributes.schedulerCallback
     self.nameChangedCallback = attributes.nameChangedCallback
     controller = attributes.controller
     self.ChangeSignalConnection()
     self.commonlyUsedPickedCB = None
     self.nameCont = Container(parent=self,
                               name='topCont',
                               align=uiconst.TOTOP,
                               height=40)
     self.topCont = Container(parent=self,
                              name='topCont',
                              align=uiconst.TOTOP,
                              height=40,
                              padTop=10)
     text = GetByLabel('UI/Structures/Deployment/SetVulnerabilityHours')
     self.vulnerabilityLabel = EveLabelMedium(name='explanationLabel',
                                              parent=self.topCont,
                                              left=4,
                                              align=uiconst.TOPLEFT,
                                              text=text,
                                              top=4)
     helpText = GetByLabel('UI/Structures/Deployment/VulnerabilityHint')
     left = self.vulnerabilityLabel.left + self.vulnerabilityLabel.textwidth + 6
     self.vulnerabilityHelpIcon = MoreInfoIcon(parent=self.topCont,
                                               hint=helpText,
                                               left=left,
                                               top=4,
                                               align=uiconst.TOPLEFT)
     self.scheduler = VulnerabilitySchedulerWithReinforcement(
         parent=self,
         schedule=self.schedule,
         callback=self.schedulerCallback)
     self.BuildNameCont()
     self.AddScheduleCombo()
예제 #5
0
 def AddHeader(self):
     headerCont = Container(name='headerCont',
                            parent=self,
                            align=uiconst.TOTOP,
                            height=32,
                            clipChildren=True)
     fill = FillThemeColored(parent=headerCont,
                             padBottom=1,
                             colorType=uiconst.COLORTYPE_UIHEADER)
     text = GetByLabel('UI/StructureProfiles/StructureProfiles')
     label = EveLabelMedium(text=text,
                            parent=headerCont,
                            left=8,
                            top=0,
                            state=uiconst.UI_DISABLED,
                            maxLines=1,
                            align=uiconst.CENTERLEFT,
                            bold=True)
     left = label.left + label.textwidth + 4
     helpIcon = MoreInfoIcon(parent=headerCont,
                             hint=GetByLabel(self.explanationLabelPath),
                             left=left,
                             top=2)
예제 #6
0
 def ApplyAttributes(self, attributes):
     MouseInsideScrollEntry.ApplyAttributes(self, attributes)
     self.node = attributes.node
     statusNameText = self.node.statusNameText
     texturePath = self.node.get('texturePath', None)
     currentIndex = self.node.get('currentIndex', None)
     partialValue = self.node.get('partialValue', 0)
     bonusMultiplier = self.node.get('bonusMultiplier', None)
     isCapital = self.node.get('isCapital', None)
     boxTooltipFunc = self.node.get('boxTooltipFunc', None)
     extraHelpLabelPath = self.node.get('extraHelpLabelPath', None)
     indexID = self.node.get('indexID', None)
     statusIcon = Sprite(parent=self, name='icon', texturePath=texturePath, pos=(LEFT_PADDING,
      0,
      16,
      16), align=uiconst.CENTERLEFT, opacity=0.75)
     self.statusNamelabel = EveLabelMedium(parent=self, text=statusNameText, align=uiconst.CENTERLEFT, left=statusIcon.width + statusIcon.left + 6, state=uiconst.UI_NORMAL)
     if extraHelpLabelPath:
         helpText = GetByLabel(extraHelpLabelPath)
         helpIcon = MoreInfoIcon(parent=self, align=uiconst.CENTERRIGHT, hint=helpText, left=2)
         rightPadding = helpIcon.left + helpIcon.width + 4
     else:
         rightPadding = RIGHT_PADDING
     self.indexBars = IndexBars(parent=self, boxTooltipFunc=boxTooltipFunc, align=uiconst.CENTERRIGHT, left=rightPadding)
     self.indexBars.display = False
     self.bonusMultiplierLabel = EveLabelMedium(parent=self, align=uiconst.CENTERRIGHT, left=rightPadding)
     self.bonusMultiplierLabel.display = False
     if currentIndex is not None:
         self.indexBars.SetIndexStatus(currentIndex, partialValue)
         self.indexBars.display = True
         if indexID != const.attributeDevIndexSovereignty:
             self.AddDeltaSprite(indexID)
     elif bonusMultiplier is not None:
         text = GetByLabel('UI/Sovereignty/DefenseMultiplierDisplayNumber', bonusMultiplier=bonusMultiplier)
         self.bonusMultiplierLabel.text = text
         self.bonusMultiplierLabel.display = True
예제 #7
0
 def OnHelpIconMouseEnter(self, *args):
     settings.user.ui.Set('accessGroup_seenExtraInfo', True)
     self.helpIcon.bgGradient.StopAnimations()
     MoreInfoIcon.OnMouseEnter(self.helpIcon, *args)
예제 #8
0
class AccessGroupsWnd(Window):
    default_captionLabelPath = 'UI/Structures/AccessGroups/GroupWndName'
    descriptionLabelPath = 'UI/Structures/AccessGroups/GroupsDescription'
    explanationLabelPath = 'UI/Structures/AccessGroups/GroupsExplanation'
    default_name = 'Groups window'
    default_windowID = 'GroupsWnd'
    default_width = 800
    default_height = 600
    default_minSize = (600, 400)
    default_iconNum = 'res:/UI/Texture/WindowIcons/accessGroups.png'

    def ApplyAttributes(self, attributes):
        Window.ApplyAttributes(self, attributes)
        self.SetWndIcon(self.iconNum, mainTop=-8)
        wndCaption = WndCaptionLabel(text=GetByLabel(
            self.default_captionLabelPath),
                                     parent=self.sr.topParent,
                                     align=uiconst.RELATIVE)
        left = wndCaption.left + wndCaption.textwidth + 4
        self.helpIcon = MoreInfoIcon(parent=self.sr.topParent,
                                     hint=GetByLabel(
                                         self.explanationLabelPath),
                                     left=left,
                                     top=10)
        if not settings.user.ui.Get('accessGroup_seenExtraInfo', False):
            self.helpIcon.ConstructGlow()
            uicore.animations.BlinkIn(self.helpIcon.bgGradient,
                                      startVal=0.1,
                                      endVal=0.5,
                                      duration=1.0,
                                      loops=uiconst.ANIM_REPEAT,
                                      curveType=uiconst.ANIM_BOUNCE)
            self.helpIcon.OnMouseEnter = self.OnHelpIconMouseEnter
        self.controller = sm.GetService(
            'structureControllers').GetAccessGroupController()
        self.mainCont = Container(name='mainCont',
                                  parent=self.sr.main,
                                  padding=4)
        self.searchCont = SearchCont(name='seachCont',
                                     parent=self.sr.topParent,
                                     align=uiconst.BOTTOMRIGHT,
                                     height=30,
                                     top=6,
                                     controller=self.controller)
        groupListParent = DragResizeCont(name='groupListCont',
                                         parent=self.mainCont,
                                         align=uiconst.TOLEFT_PROP,
                                         minSize=0.1,
                                         maxSize=0.5,
                                         defaultSize=0.5)
        self.groupCont = GroupCont(name='groupCont',
                                   parent=self.mainCont,
                                   padding=(0, 2, 0, 2),
                                   controller=self.controller)
        self.groupListCont = GroupListCont(name='groupListCont',
                                           parent=groupListParent,
                                           controller=self.controller)

    def OnHelpIconMouseEnter(self, *args):
        settings.user.ui.Set('accessGroup_seenExtraInfo', True)
        self.helpIcon.bgGradient.StopAnimations()
        MoreInfoIcon.OnMouseEnter(self.helpIcon, *args)
예제 #9
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.ShowLoad()
     self.SetCaption(self.caption)
     self.DefineButtons(
         uiconst.OK,
         okLabel=localization.GetByLabel('UI/Generic/Submit'),
         okFunc=self.Submit)
     self.SetMinSize([320, 410], 1)
     self.SetWndIcon()
     self.SetTopparentHeight(0)
     self.pickingTicker = 0
     self.layerNumSelected = None
     self.sr.prefs = [None, None, None, None, None, None]
     self.sr.priorlogo = (None, None, None, None, None, None)
     self.sr.priordesc = self.description
     self.sr.priorurl = self.url
     self.sr.priortaxRate = self.taxRate
     par = uiprimitives.Container(name='logoControl',
                                  parent=self.sr.main,
                                  align=uiconst.TOTOP,
                                  height=100,
                                  width=310,
                                  padding=(5, 5, 5, 0))
     self.sr.logocontrol = uiprimitives.Container(name='controlpanel',
                                                  parent=par,
                                                  height=100,
                                                  width=160,
                                                  align=uiconst.CENTER)
     self.sr.inputcontrol = uiprimitives.Container(name='controlpanel',
                                                   parent=self.sr.main,
                                                   align=uiconst.TOALL,
                                                   pos=(0, 0, 0, 0),
                                                   padding=(5, 5, 5, 0))
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/CorpName'))
     if boot.region == 'optic':
         defaultCorpName = localization.GetByLabel(
             'UI/Corporations/CorpDetails/DefaultCorpName')
     else:
         defaultCorpName = localization.GetByLabel(
             'UI/Corporations/CorpDetails/DefaultCorpName',
             localization.const.LOCALE_SHORT_ENGLISH)
     self.sr.corpNameEdit_container = uiprimitives.Container(
         name='corpNameEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP,
         height=56)
     self.sr.corpNameEdit = uicontrols.SinglelineEdit(
         name='nameEdit',
         parent=self.sr.corpNameEdit_container,
         setvalue=defaultCorpName,
         align=uiconst.TOTOP,
         maxLength=100,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/CorpName'),
         top=top)
     self.sr.corpNameEdit_container.height = self.sr.corpNameEdit.height + top + const.defaultPadding
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/Ticker'))
     self.sr.corpTickerEdit_container = uiprimitives.Container(
         name='corpTickerEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP,
         height=56)
     btn = uicontrols.Button(parent=self.sr.corpTickerEdit_container,
                             label=localization.GetByLabel(
                                 'UI/Corporations/CorpDetails/Ticker'),
                             align=uiconst.BOTTOMRIGHT,
                             func=self.GetPickTicker,
                             idx=0)
     self.sr.corpTickerEdit = uicontrols.SinglelineEdit(
         name='corpTickerEdit',
         parent=self.sr.corpTickerEdit_container,
         setvalue='',
         align=uiconst.TOPLEFT,
         maxLength=5,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/Ticker'),
         top=top,
         width=min(300 - btn.width, 240))
     self.sr.corpTickerEdit_container.height = self.sr.corpTickerEdit.height + top + const.defaultPadding
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/MemberLimit'))
     self.sr.memberLimit_container = uiprimitives.Container(
         name='memberLimit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP,
         height=24)
     btn = uicontrols.Button(
         parent=self.sr.memberLimit_container,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/UpdateWithMySkills'),
         align=uiconst.BOTTOMRIGHT,
         func=self.UpdateWithSkills,
         idx=0)
     uicontrols.EveLabelSmall(text=localization.GetByLabel(
         'UI/Corporations/CorpDetails/MemberLimit'),
                              parent=self.sr.memberLimit_container,
                              left=0,
                              top=0,
                              state=uiconst.UI_NORMAL)
     self.sr.memberLimit = uicontrols.EveLabelMedium(
         text='123',
         parent=self.sr.memberLimit_container,
         left=2,
         top=top,
         state=uiconst.UI_DISABLED,
         idx=0)
     self.sr.memberLimit_container.height = self.sr.memberLimit.height + top + const.defaultPadding
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/TaxRate'))
     self.sr.taxRateEdit_container = uiprimitives.Container(
         name='taxRateEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP,
         height=24)
     self.sr.taxRateEdit = uicontrols.SinglelineEdit(
         name='taxRateEdit',
         parent=self.sr.taxRateEdit_container,
         floats=(0.0, 100.0, 1),
         setvalue=self.taxRate,
         align=uiconst.TOPLEFT,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/TaxRate'),
         top=top)
     self.sr.taxRateEdit_container.height = self.sr.taxRateEdit.height + top + const.defaultPadding
     top = uix.GetTextHeight('http://')
     self.sr.urlEdit_container = uiprimitives.Container(
         name='urlEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOTOP)
     self.sr.urlEdit = uicontrols.SinglelineEdit(
         name='urlEdit',
         parent=self.sr.urlEdit_container,
         setvalue=self.url,
         maxLength=2048,
         align=uiconst.TOTOP,
         label=localization.GetByLabel(
             'UI/Corporations/CorpDetails/HomePage'),
         top=top)
     self.sr.urlEdit_container.height = self.sr.urlEdit.height + top + const.defaultPadding + 20
     self.friendlyFireCont = uiprimitives.Container(
         name='friendlyFireCont',
         parent=self.sr.inputcontrol,
         align=uiconst.TOBOTTOM,
         height=24)
     self.friendlyFireCb = Checkbox(
         name='friendlyFireCb',
         parent=self.friendlyFireCont,
         text=localization.GetByLabel(
             'UI/Corporations/CorpUIHome/AllowFriendlyFire'),
         checked=False,
         align=uiconst.TOLEFT,
         width=200)
     helpIcon = MoreInfoIcon(
         parent=self.friendlyFireCont,
         align=uiconst.TOPRIGHT,
         hint=localization.GetByLabel(
             'UI/Corporations/FriendlyFire/Description'))
     top = uix.GetTextHeight(
         localization.GetByLabel('UI/Corporations/CorpDetails/Description'))
     self.sr.descEdit_container = uiprimitives.Container(
         name='descEdit_container',
         parent=self.sr.inputcontrol,
         align=uiconst.TOALL,
         pos=(0, 0, 0, 0))
     uicontrols.EveLabelSmall(text=localization.GetByLabel(
         'UI/Corporations/CorpDetails/Description'),
                              parent=self.sr.descEdit_container,
                              top=-16)
     self.sr.descEdit = uicls.EditPlainText(
         setvalue=self.description,
         parent=self.sr.descEdit_container,
         maxLength=4000,
         showattributepanel=1)
     self.logopicker = uicls.CorpLogoPickerContainer(
         parent=self.sr.logocontrol,
         pos=(100, 0, 57, 90),
         align=uiconst.TOPLEFT)