Пример #1
0
 def ConstructTopLeftCont(self):
     uiprimitives.Line(parent=self.topLeftCont, align=uiconst.TORIGHT)
     uicontrols.Label(parent=self.topLeftCont,
                      text='Select clock:',
                      align=uiconst.TOTOP)
     uicontrols.Checkbox(parent=self.topLeftCont,
                         text='Actual',
                         groupname='clockGroup',
                         align=uiconst.TOTOP,
                         checked=not blue.os.useSmoothedDeltaT,
                         callback=self.OnClockRadioButtonsChanged,
                         retval=False)
     uicontrols.Checkbox(parent=self.topLeftCont,
                         text='Smoothed',
                         groupname='clockGroup',
                         align=uiconst.TOTOP,
                         checked=blue.os.useSmoothedDeltaT,
                         callback=self.OnClockRadioButtonsChanged,
                         retval=True)
     uicontrols.Label(parent=self.topLeftCont,
                      align=uiconst.TOTOP,
                      text='Time Scaler:',
                      pos=(0, 0, 0, 0))
     uicontrols.SinglelineEdit(parent=self.topLeftCont,
                               name='timeScaler',
                               align=uiconst.TOTOP,
                               floats=(0.0, 100.0),
                               setvalue=blue.os.timeScaler,
                               OnChange=self.OnTimeScalerChanged,
                               pos=(0, 0, 20, 12))
 def ConstructLayout(self):
     charInfoCont = uiprimitives.Container(name='charInfo',
                                           parent=self.sr.main,
                                           align=uiconst.TOTOP,
                                           height=68,
                                           padding=const.defaultPadding)
     charLogoCont = uiprimitives.Container(name='charLogo',
                                           parent=charInfoCont,
                                           align=uiconst.TOLEFT,
                                           width=68)
     charTextCont = uiprimitives.Container(name='charName',
                                           parent=charInfoCont,
                                           align=uiconst.TOALL)
     applicationCont = uiprimitives.Container(
         name='charInfo',
         parent=self.sr.main,
         align=uiconst.TOALL,
         padding=(const.defaultPadding, 0, const.defaultPadding,
                  const.defaultPadding))
     uiutil.GetOwnerLogo(charLogoCont,
                         self.charID,
                         size=64,
                         noServerCall=True)
     charText = localization.GetByLabel(
         'UI/Corporations/CorpApplications/ApplicationSubjectLine',
         player=self.charID)
     charNameLabel = uicontrols.EveLabelLarge(parent=charTextCont,
                                              text=charText,
                                              top=12,
                                              align=uiconst.TOPLEFT,
                                              width=270)
     editText = localization.GetByLabel(
         'UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont,
                                          text=editText,
                                          align=uiconst.TOTOP)
     self.rejectRb = uicontrols.Checkbox(text=localization.GetByLabel(
         'UI/Corporations/CorpApplications/RejectApplication'),
                                         parent=applicationCont,
                                         configName='reject',
                                         retval=1,
                                         checked=False,
                                         groupname='state',
                                         align=uiconst.TOBOTTOM)
     self.acceptRb = uicontrols.Checkbox(text=localization.GetByLabel(
         'UI/Corporations/CorpApplications/ApplicationInviteApplicant'),
                                         parent=applicationCont,
                                         configName='accept',
                                         retval=0,
                                         checked=True,
                                         groupname='state',
                                         align=uiconst.TOBOTTOM)
     if self.status not in const.crpApplicationActiveStatuses:
         self.rejectRb.state = uiconst.UI_HIDDEN
         self.acceptRb.state = uiconst.UI_HIDDEN
     self.applicationText = uicls.EditPlainText(setvalue=self.appText,
                                                parent=applicationCont,
                                                maxLength=1000,
                                                readonly=True)
 def ApplyAttributes(self, attributes):
     super(uicls.AIDebugWindow, self).ApplyAttributes(attributes)
     self.SetMinSize([self.default_width, self.default_height])
     self.SetCaption('AI Debug Window')
     self.sr.content.padding = 5
     self.perceptionClient = sm.GetService('perceptionClient')
     self.aimingClient = sm.GetService('aimingClient')
     clientContainer = uiprimitives.Container(parent=self.sr.content,
                                              align=uiconst.TOLEFT_PROP,
                                              width=0.5)
     uiprimitives.Line(parent=clientContainer, align=uiconst.TORIGHT)
     uicontrols.Label(parent=clientContainer,
                      align=uiconst.TOTOP,
                      text='----- CLIENT -----',
                      pos=(0, 0, 0, 0),
                      padding=(5, 5, 5, 5))
     uicontrols.Checkbox(parent=clientContainer,
                         text='Perception',
                         checked=self.perceptionClient.GetPerceptionManager(
                             session.worldspaceid).IsDebugRendering(),
                         callback=self.OnTogglePerception)
     uicontrols.Checkbox(parent=clientContainer,
                         text='Aiming',
                         checked=self.aimingClient.GetAimingManager(
                             session.worldspaceid).IsDebugRendering(),
                         callback=self.OnToggleAiming)
     uicontrols.Button(parent=clientContainer,
                       align=uiconst.CENTERBOTTOM,
                       label='Gaze at Nearest',
                       func=self.GazeNearest,
                       top=6)
     serverContainer = uiprimitives.Container(parent=self.sr.content,
                                              align=uiconst.TORIGHT_PROP,
                                              width=0.5)
     uicontrols.Label(parent=serverContainer,
                      align=uiconst.TOTOP,
                      text='----- SERVER -----',
                      padding=(5, 5, 5, 5))
     uicontrols.Checkbox(parent=serverContainer,
                         text='Perception',
                         checked=self.perceptionClient.GetPerceptionManager(
                             session.worldspaceid).IsDebugRenderingServer(),
                         callback=self.OnTogglePerceptionServer)
     uicontrols.Checkbox(parent=serverContainer,
                         text='Aiming',
                         checked=self.aimingClient.GetAimingManager(
                             session.worldspaceid).IsDebugRenderingServer(),
                         callback=self.OnToggleAimingServer)
     uicontrols.Button(parent=serverContainer,
                       align=uiconst.CENTERBOTTOM,
                       label='Gaze at Nearest',
                       func=self.GazeNearestServer,
                       top=6)
Пример #4
0
 def ConstructLayout(self, oldSetupName):
     cont = uicontrols.ContainerAutoSize(parent=self.sr.main,
                                         align=uiconst.TOTOP,
                                         padding=(const.defaultPadding, 0,
                                                  const.defaultPadding,
                                                  const.defaultPadding),
                                         alignMode=uiconst.TOTOP)
     if oldSetupName:
         label = localization.GetByLabel(
             'UI/Fleet/FleetWindow/StoreFleetSetupTextWithLastLoaded',
             oldFleetSetupName=oldSetupName)
     else:
         label = localization.GetByLabel(
             'UI/Fleet/FleetWindow/StoreFleetSetupText')
     nameLabel = uicontrols.EveLabelSmall(parent=cont,
                                          name='nameLabel',
                                          align=uiconst.TOTOP,
                                          text=label,
                                          padLeft=6)
     self.newName = SinglelineEdit(name='namePopup',
                                   parent=cont,
                                   align=uiconst.TOTOP,
                                   maxLength=self.maxLength,
                                   OnReturn=self.Confirm,
                                   padLeft=6)
     motdText = localization.GetByLabel('UI/Fleet/FleetWindow/IncludeMotd')
     self.motdCb = uicontrols.Checkbox(text=motdText,
                                       parent=cont,
                                       configName='motdCb',
                                       checked=False,
                                       padLeft=6,
                                       align=uiconst.TOTOP)
     voiceText = localization.GetByLabel(
         'UI/Fleet/FleetWindow/IncludeVoiceEnabledSetting')
     self.voiceCb = uicontrols.Checkbox(text=voiceText,
                                        parent=cont,
                                        configName='voiceCb',
                                        checked=False,
                                        padLeft=6,
                                        align=uiconst.TOTOP)
     freeMoveText = localization.GetByLabel(
         'UI/Fleet/FleetWindow/IncludeFreeMoveSetting')
     self.freeMoveCb = uicontrols.Checkbox(text=freeMoveText,
                                           parent=cont,
                                           configName='freeMoveCb',
                                           checked=False,
                                           padLeft=6,
                                           align=uiconst.TOTOP)
     cw, ch = cont.GetAbsoluteSize()
     self.height = ch + 50
     uicore.registry.SetFocus(self.newName)
Пример #5
0
 def ApplyAttributes(self, attributes):
     super(AnimationDebugWindow, self).ApplyAttributes(attributes)
     self.SetCaption('Animation Debug Draw')
     parent = self.GetMainArea()
     parent.SetAlign(uiconst.TOALL)
     parent.padding = 5
     self.entityClient = sm.GetService('entityClient')
     self.animationDebugClient = sm.GetService('animationDebugClient')
     uicontrols.Checkbox(
         parent=parent,
         text='Draw position trace',
         checked=self.animationDebugClient.IsPositionTrace(),
         callback=self.OnPositionTraceCheckbox,
         align=uiconst.TOTOP)
     uicontrols.Checkbox(
         parent=parent,
         text='Draw velocity trace',
         checked=self.animationDebugClient.IsVelocityTrace(),
         callback=self.OnVelocityTraceCheckbox)
     uicontrols.Checkbox(
         parent=parent,
         text='Draw rotational trace',
         checked=self.animationDebugClient.IsRotationalTrace(),
         callback=self.OnRotationalTraceCheckbox)
     uicontrols.Checkbox(
         parent=parent,
         text='Draw Char Controller',
         checked=self.animationDebugClient.IsPlayerAvatarDebugDraw(),
         callback=self.OnPlayerAvatarDebugDraw)
     uicontrols.Checkbox(
         parent=parent,
         text='Draw Morpheme Skeleton',
         checked=self.animationDebugClient.IsAnimationSkeletonEnabled(),
         callback=self.SetAnimationSkeletonDraw)
     uicontrols.Checkbox(
         parent=parent,
         text='Draw Mesh Skeleton',
         checked=self.animationDebugClient.IsMeshSkeletonEnabled(),
         callback=self.SetMeshSkeletonDraw)
     uicontrols.Checkbox(parent=parent,
                         text='Draw Net Controller',
                         checked=self.animationDebugClient.IsNetDebugDraw(),
                         callback=self.OnNetDebugDraw)
     uicontrols.Checkbox(
         parent=parent,
         text='Draw Net History',
         checked=self.animationDebugClient.IsNetDebugDrawHistory(),
         callback=self.OnNetDebugDrawHistory)
     uicontrols.Button(parent=parent,
                       align=uiconst.TOBOTTOM,
                       padding=(0, 5, 0, 0),
                       label='Reload Animation Network',
                       func=self.OnReloadAnimationNetwork)
     button = uicontrols.Button(parent=parent,
                                align=uiconst.TOBOTTOM,
                                label='Reload Static States',
                                func=self.OnReloadStaticStates)
     self.SetMinSize([button.width + 10, 250])
Пример #6
0
    def SetupUi(self):
        self.notifydata = []
        notificationList = [
            'shield', 'armour', 'hull', 'capacitor', 'cargoHold'
        ]
        for name in notificationList:
            notification = SoundNotification(name)
            data = {
                'checkboxLabel':
                localization.GetByLabel(notification.localizationLabel),
                'checkboxName':
                name + 'Notification',
                'checkboxSetting':
                notification.activeFlagSettingsName,
                'checkboxDefault':
                notification.defaultStatus,
                'sliderName':
                name,
                'sliderSetting':
                (name + 'Threshold', ('user', 'notifications'),
                 notification.defaultThreshold)
            }
            self.notifydata.append(data)

        labelWidth = 180
        mainContainer = uiprimitives.Container(name='mainContainer',
                                               parent=self.sr.main,
                                               align=uiconst.TOALL)
        for each in self.notifydata:
            name = each['sliderName']
            notifytop = uiprimitives.Container(name='notifytop',
                                               parent=mainContainer,
                                               align=uiconst.TOTOP,
                                               pos=(const.defaultPadding,
                                                    const.defaultPadding, 0,
                                                    32))
            uicontrols.Checkbox(text=each['checkboxLabel'],
                                parent=notifytop,
                                configName=each['checkboxSetting'],
                                retval=None,
                                prefstype=('user', 'notifications'),
                                checked=settings.user.notifications.Get(
                                    each['checkboxSetting'],
                                    each['checkboxDefault']),
                                callback=self.CheckBoxChange,
                                align=uiconst.TOLEFT,
                                pos=(const.defaultPadding, 0, labelWidth, 0))
            _par = uiprimitives.Container(name=name + '_slider',
                                          align=uiconst.TORIGHT,
                                          width=labelWidth,
                                          parent=notifytop,
                                          pos=(10, 0, 160, 0))
            par = uiprimitives.Container(name=name + '_slider_sub',
                                         align=uiconst.TOTOP,
                                         parent=_par,
                                         pos=(0, const.defaultPadding, 0, 10))
            slider = uicontrols.Slider(parent=par,
                                       gethintfunc=self.GetSliderHint,
                                       endsliderfunc=self.SliderChange)
            slider.Startup(name, 0.0, 1.0, each['sliderSetting'])
 def ConstructCrashesAndExperimentsUI(self, parent, columnWidth):
     column = parent
     uiprimitives.Container(name='toppush', align=uiconst.TOTOP, height=4, parent=column)
     uix.GetContainerHeader(localization.GetByLabel('UI/SystemMenu/GeneralSettings/Crashes/Header'), column, xmargin=-5)
     uiprimitives.Container(name='toppush', align=uiconst.TOTOP, height=2, parent=column)
     uicontrols.Checkbox(text=localization.GetByLabel('UI/SystemMenu/GeneralSettings/Crashes/UploadCrashDumpsToCCPEnabled'), parent=column, checked=blue.IsBreakpadEnabled(), callback=self.EnableDisableBreakpad)
     self._ConstructExperimental(column, columnWidth)
Пример #8
0
 def setup_layout(self):
     self.dialogue_container = uiprimitives.Container(name='dialogue_container', parent=self.parent, idx=0)
     self.left_main_container = uiprimitives.Container(name='left_main_container', parent=self, align=uiconst.TOLEFT_PROP, width=0.5, clipChildren=True, top=20)
     self.category_container = uiprimitives.Container(name='category_container', parent=self, align=uiconst.TOLEFT_PROP, width=0.5, padTop=45, clipChildren=True)
     self.loading_container = uiprimitives.Container(name='loadingContainer', parent=self.category_container, align=uiconst.CENTER, width=100, height=100, state=uiconst.UI_HIDDEN)
     self.loading_result_label = themeColored.LabelThemeColored(name='loadingResultLabel', parent=self.loading_container, align=uiconst.CENTERTOP, text=localization.GetByLabel('UI/ProjectDiscovery/LoadingResultLabel'), fontsize=20)
     self.loading_wheel = LoadingWheel(name='ResultLoadingIndicator', parent=self.loading_container, align=uiconst.CENTER, width=64, height=64)
     self.error_container = uiprimitives.Container(parent=self.category_container, align=uiconst.CENTER, width=100, height=100, state=uiconst.UI_HIDDEN)
     self.error_label = themeColored.LabelThemeColored(parent=self.error_container, align=uiconst.CENTERTOP, text=localization.GetByLabel('UI/ProjectDiscovery/LoadingResultErrorLabel'), fontsize=20)
     self.task_label = themeColored.LabelThemeColored(parent=self.left_main_container, align=uiconst.CENTERTOP, text=localization.GetByLabel('UI/ProjectDiscovery/TaskLabel'), top=40, fontsize=28, opacity=1)
     self.task_image = TaskImage(label=const.Texts.TaskImageLabel, parent=self.left_main_container, align=uiconst.TOPLEFT_PROP, pos=(25, 80, 420, 445), starting_scale=self.starting_scale)
     self.checkbox_container = uiprimitives.Container(name='checkboxContainer', parent=self.task_image, align=uiconst.BOTTOMLEFT, width=110, height=20, left=8, top=10)
     self.report_checkbox = uicontrols.Checkbox(name='reportCheckbox', parent=self.checkbox_container, text=localization.GetByLabel('UI/ProjectDiscovery/ReportCheckboxLabel'))
     SetTooltipHeaderAndDescription(self.report_checkbox, headerText=localization.GetByLabel('UI/ProjectDiscovery/AbnormalSampleTooltipHeader'), descriptionText=localization.GetByLabel('UI/ProjectDiscovery/AbnormalSampleTooltipDescription'))
     self.result_window = ResultWindow(name='ResultWindow', parent=self.parent, align=uiconst.TOALL, opacity=0, isTrainingPhase=False, starting_scale=self.starting_scale, bottom_container=self.bottom_container)
     self.rewards_view = RewardsView(parent=self.parent.parent, opacity=0, align=uiconst.TOALL, playerState=self.playerState, bottom_container=self.bottom_container, idx=1, state=uiconst.UI_DISABLED)
     self.processing_view = ProcessingView(parent=self.parent.parent, opacity=0, idx=2, state=uiconst.UI_DISABLED)
     self.category_selector = CategorySelector(categories=nested_categories_from_json(PROJECT_INFO['info']['classes']), parent=self.category_container, state=uiconst.UI_DISABLED, starting_scale=self.starting_scale)
     self.main_button_container = uiprimitives.Container(name='main_button_container', parent=self.bottom_container, align=uiconst.CENTERBOTTOM, width=355, height=53, bgTexturePath='res:/UI/Texture/classes/ProjectDiscovery/footerBG.png')
     self.submit_button_container = uiprimitives.Container(name='submitButtonContainer', parent=self.main_button_container, width=250, align=uiconst.CENTER, height=40, top=5)
     self.submit_button = uicontrols.Button(name='SubcellularSubmitButton', parent=self.submit_button_container, align=uiconst.CENTER, label=localization.GetByLabel('UI/ProjectDiscovery/SubmitButtonLabel'), fontsize=18, fixedwidth=170, fixedheight=30, func=lambda x: self.submit_solution())
     uiprimitives.Sprite(parent=self.submit_button_container, align=uiconst.CENTERLEFT, width=34, height=20, texturePath='res:/UI/Texture/classes/ProjectDiscovery/submitArrow.png', opacity=0.7)
     uiprimitives.Sprite(parent=uiprimitives.Transform(parent=self.submit_button_container, align=uiconst.CENTERRIGHT, width=34, height=20, rotation=math.pi), align=uiconst.CENTERRIGHT, width=34, height=20, texturePath='res:/UI/Texture/classes/ProjectDiscovery/submitArrow.png', opacity=0.7)
     self.task_id = uicontrols.Label(name='TaskID', parent=self.bottom_container, align=uiconst.BOTTOMRIGHT, height=20, opacity=0, left=10)
     self.new_task_button = uicontrols.ButtonIcon(name='newTaskButton', parent=self.left_main_container, align=uiconst.TOPLEFT, texturePath='res:/UI/Texture/classes/ProjectDiscovery/recycleButtonUp.png', hoverTexture='res:/UI/Texture/classes/ProjectDiscovery/recycleButtonOver.png', downTexture='res:/UI/Texture/classes/ProjectDiscovery/recycleButtonDown.png', iconSize=24, func=lambda : self.reset_and_get_new_task(), idx=0, left=32, top=54)
     SetTooltipHeaderAndDescription(self.new_task_button, headerText='', descriptionText=localization.GetByLabel('UI/ProjectDiscovery/NewTaskButtonTooltipDescription'))
Пример #9
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.isTabStop = True
     self.currData = None
     self.bottomCont = uiprimitives.Container(parent=self.sr.main,
                                              align=uiconst.TOBOTTOM,
                                              height=25)
     self.mainScreen = MainScreen(parent=self.sr.main,
                                  default_align=uiconst.TOPLEFT)
     self.mainScreen.SetNewsTickerData(
         *sm.GetService('holoscreen').GetNewsTickerData())
     playlist = sm.GetService('holoscreen').playlist
     options = [(cls.__guid__, (cls, dataFunc))
                for cls, dataFunc in playlist]
     self.combo = uicontrols.Combo(parent=self.bottomCont,
                                   options=options,
                                   pos=(10, 0, 150, 0),
                                   width=150,
                                   align=uiconst.TOPLEFT,
                                   callback=self.OnCombo)
     uicontrols.Button(parent=self.bottomCont,
                       label='Reload',
                       func=self.UpdateScreen,
                       align=uiconst.TOPLEFT,
                       pos=(165, 0, 100, 0))
     self.checkbox = uicontrols.Checkbox(parent=self.bottomCont,
                                         text='Render to screen',
                                         align=uiconst.TOPLEFT,
                                         pos=(230, 0, 250, 0),
                                         checked=False,
                                         callback=self.OnCheckboxChanged)
     uicontrols.EveLabelMedium(parent=self.bottomCont,
                               text='Press R to reload',
                               align=uiconst.TOPRIGHT)
     self.checkbox.OnKeyDown = self.OnKeyDown
Пример #10
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)
Пример #11
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()
Пример #12
0
 def ConstructSpriteEffectColumn(self):
     spriteEffectCont = uiprimitives.Container(parent=self.bottomCont, align=uiconst.TOLEFT, width=self.COLUMN_WIDTH)
     uiprimitives.Line(parent=spriteEffectCont, align=uiconst.TORIGHT)
     uicontrols.Label(parent=spriteEffectCont, text='spriteEffect', align=uiconst.TOTOP)
     for constName in dir(trinity):
         if not constName.startswith('TR2_SFX_'):
             continue
         constVal = getattr(trinity, constName)
         uicontrols.Checkbox(parent=spriteEffectCont, text=constName, align=uiconst.TOTOP, configName='spriteEffectGroup', groupname='spriteEffectGroup', checked=constVal == uiprimitives.Sprite.default_spriteEffect, callback=self.OnSpriteEffectRadioChanged, retval=constVal)
Пример #13
0
 def Startup(self, *args):
     listentry.LabelTextTop.Startup(self, args)
     cbox = uicontrols.Checkbox(align=uiconst.TOPLEFT,
                                callback=self.CheckBoxChange,
                                pos=(4, 4, 0, 0))
     cbox.data = {}
     self.children.insert(0, cbox)
     self.sr.checkbox = cbox
     self.sr.checkbox.state = uiconst.UI_DISABLED
Пример #14
0
 def Load(self, parentWindow, lpfnQueryCompleted = None):
     self.lpfnQueryCompleted = lpfnQueryCompleted
     parentWindow.left = parentWindow.width = parentWindow.height = const.defaultPadding
     wndForm = uiprimitives.Container(name='form', parent=parentWindow, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     self.wndForm = wndForm
     self.scrollQuery = uicontrols.Scroll(name='queryinput', parent=wndForm, height=100, align=uiconst.TOTOP)
     uiprimitives.Container(name='push', parent=wndForm, align=uiconst.TOTOP, height=const.defaultPadding)
     self.wndSearchBuilderToolbar = uiprimitives.Container(name='searchtoolbar', parent=wndForm, align=uiconst.TOTOP, height=18)
     optionsList = [[localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/LogicalOR'), LOGICAL_OPERATOR_OR], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/LogicalAND'), LOGICAL_OPERATOR_AND]]
     combo = uicontrols.Combo(label='', parent=self.wndSearchBuilderToolbar, options=optionsList, name='join_operator', callback=self.OnComboChange, width=50, pos=(1, 0, 0, 0), align=uiconst.TOLEFT)
     self.comboJoinOperator = combo
     self.comboJoinOperator.state = uiconst.UI_HIDDEN
     combo = uicontrols.Combo(label='', parent=self.wndSearchBuilderToolbar, options=self.propertyList, name='property', callback=self.OnComboChange, width=128, pos=(const.defaultPadding,
      0,
      0,
      0), align=uiconst.TOLEFT)
     self.comboProperty = combo
     combo = uicontrols.Combo(label='', parent=self.wndSearchBuilderToolbar, options=self.optionsByProperty[self.comboProperty.GetValue()], name='operator', callback=self.OnComboChange, width=80, pos=(const.defaultPadding,
      0,
      0,
      0), align=uiconst.TOLEFT)
     combo.OnChange = self.OnComboChange
     self.comboOperator = combo
     wndInputControlArea = uiprimitives.Container(name='inputArea', parent=self.wndSearchBuilderToolbar, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     self.wndInputFieldArea = wndInputControlArea
     self.ShowAppropriateInputField()
     wndOptionsBar = uiprimitives.Container(name='options', parent=wndForm, align=uiconst.TOTOP, height=40)
     self.addEditButton = uicontrols.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Commands/AddItem'), func=self.AddSearchTerm, btn_default=0, align=uiconst.TOPRIGHT)
     self.saveEditButton = uicontrols.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/Save'), pos=(self.addEditButton.width + 6,
      0,
      0,
      0), func=self.SaveEditedSearchTerm, btn_default=0, align=uiconst.TOPRIGHT)
     self.cancelEditButton = uicontrols.Button(parent=wndOptionsBar, label=localization.GetByLabel('UI/Commands/Cancel'), pos=(self.saveEditButton.left + self.saveEditButton.width + 6,
      0,
      0,
      0), func=self.CancelEditedSearchTerm, btn_default=0, align=uiconst.TOPRIGHT)
     self.saveEditButton.state = uiconst.UI_HIDDEN
     self.cancelEditButton.state = uiconst.UI_HIDDEN
     uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/SearchTitles'), parent=wndOptionsBar, configName='FMBQsearchTitles', retval=None, checked=settings.user.ui.Get('FMBQsearchTitles', 0), groupname=None, callback=self.CheckBoxChange, align=uiconst.TOPLEFT, pos=(0, 4, 400, 0))
     uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/IncludeImpliedRoles'), parent=wndOptionsBar, configName='FMBQincludeImplied', retval=None, checked=settings.user.ui.Get('FMBQincludeImplied', 0), groupname=None, callback=self.CheckBoxChange, align=uiconst.TOPLEFT, pos=(0, 20, 400, 0))
     wndButtonBar = uiprimitives.Container(name='execute', parent=wndForm, align=uiconst.TOTOP, height=16)
     button = uicontrols.Button(parent=wndButtonBar, label=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/ExecuteQuery'), func=self.ExecuteQuery, btn_default=0, align=uiconst.CENTER)
     wndButtonBar.height = button.height
     return wndForm
Пример #15
0
 def Startup(self, *args):
     cbox = uicontrols.Checkbox(align=uiconst.CENTERLEFT,
                                left=4,
                                callback=self.CheckBoxChange)
     cbox.data = {}
     self.children.insert(0, cbox)
     self.sr.checkbox = cbox
     self.sr.checkbox.state = uiconst.UI_DISABLED
     self.iconCont.left = 25
     self.sr.label.left = 65
Пример #16
0
 def AddCheckBox(self, config, where, align, width, height, left, group):
     cfgname, retval, desc, default = config
     cbox = uicontrols.Checkbox(text=desc, parent=where, configName=cfgname, retval=retval, checked=default, groupname=group, callback=self.CheckBoxChange, align=align, pos=(left,
      2,
      0,
      0))
     cbox.width = width
     cbox.height = max(height, cbox.sr.label.textheight + cbox.sr.label.top)
     cbox.state = uiconst.UI_NORMAL
     return cbox
Пример #17
0
 def StartupWelcomePanel(self, *args):
     welcomePanel = self.sr.welcomePanel
     cbCont = uiprimitives.Container(name='cbCont',
                                     parent=welcomePanel,
                                     align=uiconst.TOBOTTOM,
                                     pos=(0, 0, 0, 20))
     self.sr.wekcomeToAllCB = uicontrols.Checkbox(
         text=localization.GetByLabel(
             'UI/EVEMail/MailingLists/SendWelcomeMailToAllCheckbox'),
         parent=cbCont,
         configName='welcomeToAllCB',
         retval=self.mailingListID,
         checked=settings.user.ui.Get(
             'welcomeToAllCB_%s' % self.mailingListID, 0),
         align=uiconst.TOPLEFT,
         pos=(0, 0, 330, 0),
         callback=self.OnCheckboxChange)
     subjectCont = uiprimitives.Container(name='subjectCont',
                                          parent=welcomePanel,
                                          align=uiconst.TOTOP,
                                          pos=(0, 0, 0, 30),
                                          padding=(0, 0, 1, 0))
     subjectTextCont = uiprimitives.Container(name='subjectCont',
                                              parent=subjectCont,
                                              align=uiconst.TOLEFT,
                                              pos=(0, 0, 40, 0))
     subjectLabel = uicontrols.EveHeaderSmall(text=localization.GetByLabel(
         'UI/EVEMail/MailingLists/WelcomeMailSubject'),
                                              parent=subjectTextCont,
                                              align=uiconst.TOPLEFT,
                                              top=2,
                                              left=0,
                                              state=uiconst.UI_NORMAL)
     subjectTextCont.width = subjectLabel.textwidth + 5
     self.sr.subjecField = uicontrols.SinglelineEdit(
         name='subjecField',
         parent=subjectCont,
         maxLength=const.mailMaxSubjectSize,
         pos=(0, 0, 0, 0),
         label='',
         align=uiconst.TOTOP)
     self.sr.welcomeScrollCont = scrollCont = uiprimitives.Container(
         name='scrollCont', parent=welcomePanel, align=uiconst.TOALL)
     self.sr.welcomeEdit = uicls.EditPlainText(
         setvalue='',
         parent=self.sr.welcomeScrollCont,
         align=uiconst.TOALL,
         showattributepanel=1)
     uicontrols.ButtonGroup(btns=[[
         localization.GetByLabel('UI/Common/Buttons/Save'),
         self.SaveWelcomeMail, None, None
     ]],
                            parent=welcomePanel,
                            idx=0,
                            line=False)
Пример #18
0
 def ConstructRadioButtons(self):
     self.searchRadioButtonsContainer = uicls.GridContainer(parent=self.searchContainer, name='search radio buttons', align=uiconst.TOTOP, height=50, columns=2)
     radioButtonConstructor = [('Label', self.localizationHandler.GetSearchedMessagesByLabel),
      ('ID', self.localizationHandler.GetSearchedMessagesByID),
      ('Text', self.localizationHandler.GetSearchedMessagesByText),
      ('Path', self.localizationHandler.GetSearchedMessagesByPath)]
     self.radioButtons = []
     for text, searchFunc in radioButtonConstructor:
         radioButton = uicontrols.Checkbox(parent=self.searchRadioButtonsContainer, text=text, groupname='searchGroup', padding=(25, 5, 5, 5), callback=self.UpdateFromEdit)
         radioButton.searchFunc = searchFunc
         self.radioButtons.append(radioButton)
 def ConstructLayout(self):
     self.acceptRb = None
     self.withdrawRb = None
     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)
     controlCont = uiprimitives.Container(name='buttons', parent=self.sr.main, align=uiconst.TOBOTTOM, padding=(const.defaultPadding,
      0,
      const.defaultPadding,
      const.defaultPadding))
     controlContHeight = 0
     applicationCont = uiprimitives.Container(name='applicationCont', 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/CorpApplications/YourApplicationToJoin', corpName=corpName)
     corpNameLabel = uicontrols.EveLabelLarge(parent=corpTextCont, text=corpText, top=12, align=uiconst.TOPLEFT, width=270)
     if self.status == const.crpApplicationAppliedByCharacter:
         statusText = localization.GetByLabel('UI/Corporations/CorpApplications/ApplicationNotProcessed')
         statusLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=statusText, align=uiconst.TOTOP, padBottom=const.defaultPadding)
     else:
         statusText = statusLabel = ''
     editText = localization.GetByLabel('UI/Corporations/BaseCorporationUI/CorporationApplicationText')
     editLabel = uicontrols.EveLabelSmall(parent=applicationCont, text=editText, align=uiconst.TOTOP)
     if self.application.applicationText is not None:
         appText = self.application.applicationText
     else:
         appText = ''
     self.applicationText = uicls.EditPlainText(setvalue=appText, parent=applicationCont, maxLength=1000, readonly=True)
     if self.status in const.crpApplicationActiveStatuses:
         isWithdrawChecked = True
         if self.status in (const.crpApplicationAcceptedByCorporation, const.crpApplicationInvitedByCorporation):
             isWithdrawChecked = False
             self.acceptRb = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorpApplications/AcceptApplication'), parent=controlCont, configName='accept', retval=1, checked=True, groupname='stateGroup', align=uiconst.TOBOTTOM)
             controlContHeight += 40
         self.withdrawRb = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorpApplications/WithdrawApplication'), parent=controlCont, configName='accept', retval=3, checked=isWithdrawChecked, groupname='stateGroup', align=uiconst.TOBOTTOM)
         controlContHeight += 20
     controlCont.height = controlContHeight
Пример #20
0
 def ConstructTopRightCont(self):
     cont = uiprimitives.Container(parent=self.topRightCont,
                                   align=uiconst.TOTOP,
                                   height=70,
                                   padTop=12,
                                   padBottom=10)
     uicontrols.Label(parent=cont,
                      align=uiconst.TOTOP,
                      text='Slug Min Time:',
                      pos=(0, 0, 0, 0))
     uicontrols.SinglelineEdit(parent=cont,
                               name='slugMinEdit',
                               align=uiconst.TOTOP,
                               ints=(0, 1000),
                               setvalue=int(blue.os.slugTimeMinMs),
                               OnChange=self.OnSlugMinChanged,
                               pos=(0, 0, 100, 12))
     uicontrols.Label(parent=cont,
                      align=uiconst.TOTOP,
                      text='Slug Max Time:',
                      pos=(0, 0, 0, 0))
     uicontrols.SinglelineEdit(parent=cont,
                               name='slugMaxEdit',
                               align=uiconst.TOTOP,
                               ints=(0, 1000),
                               setvalue=int(blue.os.slugTimeMaxMs),
                               OnChange=self.OnSlugMaxChanged,
                               pos=(0, 0, 100, 12))
     uicontrols.Checkbox(parent=self.topRightCont,
                         text='Use Simple Loop',
                         align=uiconst.TOTOP,
                         checked=blue.os.useSimpleCatchupLoop,
                         callback=self.OnSimpleLoopChanged,
                         padBottom=10)
     uicontrols.Checkbox(parent=self.topRightCont,
                         text='Show Time Graphs',
                         align=uiconst.TOTOP,
                         checked=self.showTimeGraphs,
                         callback=self.OnTimeGraphsChanged,
                         padBottom=10)
Пример #21
0
 def Startup(self, *args):
     listentry.Item.Startup(self, args)
     cbox = uicontrols.Checkbox(text='',
                                parent=self,
                                configName='cb',
                                retval=None,
                                checked=1,
                                align=uiconst.TOPLEFT,
                                pos=(6, 4, 0, 0),
                                callback=self.CheckBoxChange)
     cbox.data = {}
     self.sr.checkbox = cbox
     self.sr.checkbox.state = uiconst.UI_NORMAL
 def AddCheckBox(self, config, where, align, width, height, left, group):
     cfgname, retval, desc, default = config
     cbox = uicontrols.Checkbox(text=desc,
                                align=align,
                                pos=(left, 0, width, height),
                                checked=default,
                                callback=self.CheckBoxChange,
                                wrapLabel=False)
     cbox.data = {'key': cfgname, 'retval': retval}
     if group is not None:
         cbox.SetGroup(group)
     cbox.width = width
     where.children.append(cbox)
     return cbox
Пример #23
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.isChangingOrder = False
     self.loadedTab = None
     self.waypointBtns = uicontrols.ButtonGroup(
         parent=self.sr.main,
         btns=[[
             localization.GetByLabel('UI/Map/MapPallet/btnOptimizeRoute'),
             sm.GetService('autoPilot').OptimizeRoute, (), 66
         ]])
     self.sr.waypointopt = uiprimitives.Container(
         name='waypointopt',
         parent=self.sr.main,
         align=uiconst.TOBOTTOM,
         clipChildren=True,
         padding=(const.defaultPadding, 0, const.defaultPadding, 0))
     self.sr.scroll2 = uicontrols.Scroll(parent=self.sr.main,
                                         padding=const.defaultPadding)
     self.sr.scroll2.sr.id = 'autopilotSettings'
     self.sr.scroll2.sr.content.OnDropData = self.MoveWaypoints
     uicontrols.EveLabelMedium(text=localization.GetByLabel(
         'UI/Map/MapPallet/lblChangeWaypointPriority'),
                               parent=self.sr.waypointopt,
                               pos=(3, 2, 0, 0))
     checkbox = uicontrols.Checkbox(
         text=localization.GetByLabel('UI/Map/MapPallet/cbExpandWaypoints'),
         parent=self.sr.waypointopt,
         configName='expandwaypoints',
         retval=None,
         checked=settings.user.ui.Get('expandwaypoints', 1),
         callback=self.OnCheckboxWaypoints,
         align=uiconst.TOPLEFT,
         pos=(1, 18, 140, 0))
     checkbox.data = {'key': 'expandwaypoints', 'retval': None}
     self.sr.waypointopt.height = checkbox.height + 22
     autopilottabs = uicontrols.TabGroup(name='tabparent',
                                         parent=self.sr.main,
                                         idx=0)
     autopilottabs.Startup(
         [[
             localization.GetByLabel('UI/Map/MapPallet/tabWaypoints'),
             self.sr.scroll2, self, 'waypointconf', self.sr.waypointopt
         ],
          [
              localization.GetByLabel('UI/Map/MapPallet/tabMapAdvoidance'),
              self.sr.scroll2, self, 'avoidconf', None
          ]],
         'autopilottabs',
         autoselecttab=1)
     self.sr.autopilottabs = autopilottabs
Пример #24
0
 def ShowSupp(self, text):
     bottom = uiprimitives.Container(name='suppressContainer',
                                     parent=self.sr.main,
                                     align=uiconst.TOBOTTOM,
                                     height=20,
                                     idx=0)
     self.sr.suppCheckbox = uicontrols.Checkbox(text=text,
                                                parent=bottom,
                                                configName='suppress',
                                                retval=0,
                                                checked=0,
                                                groupname=None,
                                                callback=self.ChangeSupp,
                                                align=uiconst.TOPLEFT,
                                                pos=(6, 0, 320, 0))
Пример #25
0
 def ConstructNotificationSection(self, column, columnWidth):
     uix.GetContainerHeader(localization.GetByLabel(
         'UI/SystemMenu/GeneralSettings/Notifications/Header'),
                            column,
                            xmargin=-5)
     uiprimitives.Container(name='toppush',
                            align=uiconst.TOTOP,
                            height=2,
                            parent=column)
     uicontrols.Checkbox(text=localization.GetByLabel(
         'UI/SystemMenu/GeneralSettings/Notifications/NotificationsEnabled'
     ),
                         parent=column,
                         checked=NotificationSettingHandler().
                         GetNotificationWidgetEnabled(),
                         callback=self.ToggleNotificationsEnabled)
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     warableEntitysOnly = attributes.warableEntitysOnly
     self.ownerID = None
     self.searchStr = ''
     self.searchAttr = attributes.Get('searchStr', '')
     self.warableEntitysOnly = warableEntitysOnly
     self.SetScope('all')
     self.Confirm = self.ValidateOK
     strTitle = localization.GetByLabel('UI/Corporations/CorporationWindow/Standings/SelectCorpOrAlliance')
     if self.warableEntitysOnly:
         strTitle = localization.GetByLabel('UI/Corporations/CorporationWindow/Standings/SelectWarableCorpOrAlliance')
     self.SetCaption(strTitle)
     self.SetMinSize([320, 300])
     if self.searchAttr:
         self.SetTopparentHeight(0)
     self.SetWndIcon(self.iconNum)
     self.sr.standardBtns = uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Generic/OK'),
       self.OnOK,
       (),
       81], [localization.GetByLabel('UI/Generic/Cancel'),
       self.OnCancel,
       (),
       81]])
     self.sr.main.children.insert(0, self.sr.standardBtns)
     self.sr.txtWarning = uicontrols.EveLabelMedium(parent=self.sr.main, align=uiconst.TOBOTTOM, top=0, color=[1,
      0,
      0,
      1], state=uiconst.UI_HIDDEN)
     self.sr.scroll = uicontrols.Scroll(parent=self.sr.main, padding=const.defaultPadding)
     self.sr.scroll.multiSelect = False
     self.sr.scroll.OnSelectionChange = self.OnScrollSelectionChange
     self.label = uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Shared/TypeSearchString'), parent=self.sr.topParent, left=70, top=5, state=uiconst.UI_NORMAL)
     inpt = self.sr.inpt = uicontrols.SinglelineEdit(name='edit', parent=self.sr.topParent, left=70, top=self.label.top + self.label.height + 2, width=86, align=uiconst.TOPLEFT, maxLength=32, setvalue=self.searchAttr)
     inpt.OnReturn = self.Search
     btn = uicontrols.Button(parent=self.sr.topParent, label=localization.GetByLabel('UI/Corporations/CorporationWindow/Standings/Search'), pos=(inpt.left + inpt.width + 2,
      inpt.top,
      0,
      0), func=self.Search, btn_default=1)
     self.sr.exactChkBox = uicontrols.Checkbox(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Standings/SearchExact'), parent=self.sr.topParent, configName='SearchExactChk', retval=1, align=uiconst.TOPLEFT, pos=(inpt.left,
      inpt.top + inpt.height,
      200,
      0))
     self.SetTopparentHeight(max(52, self.sr.exactChkBox.top + self.sr.exactChkBox.height))
     if self.searchAttr:
         self.Search()
     return self
Пример #27
0
    def ConstructLayout(self):
        cont = uiprimitives.Container(parent=self.sr.main, align=uiconst.TOTOP, padding=const.defaultPadding, height=16)
        checkBoxCont = uicontrols.ContainerAutoSize(parent=self.sr.main, name='checkBoxCont', align=uiconst.TOTOP, padding=(const.defaultPadding,
         0,
         const.defaultPadding,
         const.defaultPadding))
        selectLabel = uicontrols.EveLabelSmallBold(parent=cont, text=localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Home/SelectShortName'), height=16, align=uiconst.TOTOP)
        shortNames = sm.GetService('corp').GetSuggestedAllianceShortNames(self.allianceName)
        checked = True
        for shortNameRow in shortNames:
            shortName = shortNameRow.shortName
            if shortName is None:
                continue
            checkBox = uicontrols.Checkbox(text=shortName, parent=checkBoxCont, configName='shortNames', retval=shortName, checked=checked, groupname='state', align=uiconst.TOTOP, height=19)
            self.checkBoxes.append(checkBox)
            checked = False

        self.height = checkBoxCont.height + 70
Пример #28
0
 def setup_layout(self):
     self.SetTopparentHeight(0)
     main = self.GetMainArea()
     main.padding = 5
     main_container = uiprimitives.Container(parent=main)
     text_container = uiprimitives.Container(parent=main_container,
                                             height=120,
                                             width=250,
                                             align=uiconst.TOPRIGHT)
     uicontrols.EditPlainTextCore(
         parent=text_container,
         readonly=True,
         height=128,
         setvalue=localization.GetByLabel(
             'UI/ProjectDiscovery/IntroductionText'))
     avatar_container = uiprimitives.Container(parent=main_container,
                                               height=128,
                                               width=128,
                                               align=uiconst.TOPLEFT)
     uiprimitives.Sprite(parent=avatar_container,
                         name='SOE_Logo',
                         align=uiconst.TOTOP,
                         height=128,
                         texturePath='res:/ui/texture/corps/14_128_1.png',
                         ignoreSize=True)
     bottom_container = uiprimitives.Container(parent=main_container,
                                               height=35,
                                               align=uiconst.TOBOTTOM)
     self.close_button = uicontrols.Button(
         parent=bottom_container,
         label=localization.GetByLabel(
             'UI/ProjectDiscovery/IntroductionTextContinueButton'),
         align=uiconst.CENTER,
         padLeft=20,
         fixedwidth=100,
         fixedheight=25,
         func=lambda x: self.continue_and_check_preference())
     self.checkbox = uicontrols.Checkbox(parent=bottom_container,
                                         align=uiconst.CENTERLEFT,
                                         padLeft=10)
     self.checkbox.SetLabelText(
         localization.GetByLabel(
             'UI/ProjectDiscovery/IntroductionScreenCheckboxText'))
     self.checkbox.SetSize(140, 20)
Пример #29
0
 def LoadSettings(self):
     wnd = self.GetWnd()
     uicontrols.Label(
         text=
         '<br><b>Debug Settings</b> (changing these settings is <b>not</b> recommended):',
         parent=wnd.sr.settingsInner,
         align=uiconst.TOTOP)
     if wnd:
         for cfgname, value, label, checked, group in [
             [
                 'userotcache', None, 'Enable rot cache',
                 settings.public.generic.Get('userotcache', 1), None
             ],
             [
                 'lazyLoading', None, 'Enable Lazy model loading',
                 settings.public.generic.Get('lazyLoading', 1), None
             ],
             [
                 'preload', None, 'Enable Preloading',
                 settings.public.generic.Get('preload', 1), None
             ],
             [
                 'asyncLoad', None,
                 'Enable Asyncronous Loading (change requires reboot)',
                 settings.public.generic.Get('asyncLoad', 1), None
             ],
             [
                 'resourceUnloading', None, 'Enable Resource Unloading',
                 settings.public.generic.Get('resourceUnloading', 1), None
             ]
         ]:
             uicontrols.Checkbox(text=label,
                                 parent=wnd.sr.settingsInner,
                                 configName=cfgname,
                                 retval=value,
                                 checked=checked,
                                 groupname=group,
                                 callback=self.CheckBoxChange,
                                 prefstype=('generic', ))
Пример #30
0
 def CreateWindow(self):
     self.sr.inited = 1
     self.sr.rejectedContainer = uiprimitives.Container(name='rejectedContainer', align=uiconst.TOTOP, parent=self, pos=(0, 0, 0, 18))
     showRejectedLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Applications/ShowRejected')
     self.sr.viewRejected = uicontrols.Checkbox(text=showRejectedLabel, parent=self.sr.rejectedContainer, configName='viewRejected', retval=1, checked=0, groupname=None, callback=self.CheckBoxChecked, align=uiconst.TOPLEFT, pos=(const.defaultPadding,
      const.defaultPadding,
      150,
      0))
     self.sr.scroll = uicontrols.Scroll(name='applications', parent=self, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding))
     self.sr.tabs = uicontrols.TabGroup(name='tabparent', parent=self, idx=0)
     allianceLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Alliance')
     myApplicationsLabel = localization.GetByLabel('UI/Corporations/CorporationWindow/Alliances/Applications/MyApplications')
     self.sr.tabs.Startup([[allianceLabel,
       self,
       self,
       'alliance'], [myApplicationsLabel,
       self,
       self,
       'myApplications']], 'allianceApplications')