コード例 #1
0
    def ApplyAttributes(self, attributes):
        uicls.InfoPanelBase.ApplyAttributes(self, attributes)
        sm.RegisterNotify(self)
        self.inEditMode = False
        self.editModeContainer = uiprimitives.Container(parent=self.mainCont, name='buttonContainer', align=uiconst.TOTOP, state=uiconst.UI_HIDDEN, padding=(0, 0, 0, 5))
        self.editModeContent = uiprimitives.Container(parent=self.editModeContainer, name='editModeContent', align=uiconst.TOALL, padding=(10, 6, 10, 6))
        uiprimitives.Fill(parent=self.editModeContainer, color=util.Color.GetGrayRGBA(0.0, 0.3))
        uicontrols.Frame(parent=self.editModeContainer, color=util.Color.GetGrayRGBA(0.0, 0.2))
        self.tabPanelContainer = uicontrols.ContainerAutoSize(parent=self.mainCont, name='tabPanelContainer', align=uiconst.TOTOP)
        self.planetName = self.headerCls(parent=self.headerCont, state=uiconst.UI_NORMAL, align=uiconst.CENTERLEFT)
        self.resourceControllerTab = ResourceController(parent=self.tabPanelContainer)
        self.editModeTab = PlanetEditModeContainer(parent=self.tabPanelContainer)
        self.modeButtonGroup = uicls.ToggleButtonGroup(parent=self.mainCont, align=uiconst.TOTOP, callback=self.OnButtonSelected, padBottom=4)
        for btnID, label, panel in (('editModeTab', localization.GetByLabel('UI/Common/Build'), self.editModeTab), ('resourceControllerTab', localization.GetByLabel('UI/PI/Common/Scan'), self.resourceControllerTab)):
            self.modeButtonGroup.AddButton(btnID, label, panel)

        self.modeButtonGroup.SelectByID('editModeTab')
        BTNSIZE = 24
        exitBtn = uicontrols.Button(parent=self.headerCont, align=uiconst.CENTERRIGHT, pos=(0,
         0,
         BTNSIZE,
         BTNSIZE), icon='res:/UI/Texture/Icons/73_16_45.png', iconSize=16, func=self.ExitPlanetMode, alwaysLite=True, hint=localization.GetByLabel('UI/PI/Common/ExitPlanetMode'))
        homeBtn = uicontrols.Button(parent=self.headerCont, align=uiconst.CENTERRIGHT, pos=(exitBtn.left + exitBtn.width + 2,
         0,
         BTNSIZE,
         BTNSIZE), icon='res:/UI/Texture/Icons/73_16_46.png', iconSize=16, func=self.ViewCommandCenter, alwaysLite=True, hint=localization.GetByLabel('UI/PI/Common/ViewPlanetaryCommandCenter'))
        self.sr.homeBtn = homeBtn
        self.UpdatePlanetText()
        self.UpdateHomeButton()
        self.CreateEditModeContainer()
        planetUISvc = sm.GetService('planetUI')
        planetUISvc.SetModeController(self)
        uthread.new(self.OnEditModeChanged, planetUISvc.inEditMode)
コード例 #2
0
 def ConstructFormattingButtons(self):
     self.textFormatting = uiprimitives.Container(parent=self.messageContainerMain, name='text formatting', pos=(10, 5, 10, 15), align=uiconst.TOBOTTOM)
     self.addDateButton = uicontrols.Button(parent=self.textFormatting, label='Add Date', pos=(5, 5, 0, 0), align=uiconst.TOLEFT, func=self.AddDate)
     self.addTimeIntervalButton = uicontrols.Button(parent=self.textFormatting, label='Add TimeInterval', pos=(5, 5, 0, 0), align=uiconst.TOLEFT, func=self.AddTimeInterval)
     self.addNumericButton = uicontrols.Button(parent=self.textFormatting, label='Add Numeric', pos=(5, 5, 0, 0), align=uiconst.TOLEFT, func=self.AddNumeric)
     self.addLocationButton = uicontrols.Button(parent=self.textFormatting, label='Add Location', pos=(5, 5, 0, 0), align=uiconst.TOLEFT, func=self.AddLocation)
     self.addItemButton = uicontrols.Button(parent=self.textFormatting, label='Add Item', pos=(5, 5, 0, 0), align=uiconst.TOLEFT, func=self.AddItem)
コード例 #3
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetWndIcon(None)
     self.SetCaption('Ballpark exporter')
     self.SetTopparentHeight(10)
     self.SetMinSize([360, 150])
     self.MakeUnResizeable()
     self.mainCont = uiprimitives.Container(parent=self.sr.main,
                                            align=uiconst.TOTOP,
                                            pos=(0, 0, 0, 110),
                                            padding=(5, 5, 5, 5))
     self.exportUrlEdit = uicontrols.SinglelineEdit(
         parent=self.mainCont,
         align=uiconst.TOTOP,
         top=15,
         label='Export URL:',
         setvalue=settings.user.ui.Get('ballparkExporterUrl'),
         readonly=True)
     buttonCont = uiprimitives.Container(parent=self.mainCont,
                                         align=uiconst.TOTOP,
                                         pos=(0, 10, 0, 30),
                                         name='buttonCont')
     uicontrols.Button(parent=buttonCont,
                       align=uiconst.TOLEFT,
                       label='Start',
                       func=self.StartExport)
     uicontrols.Button(parent=buttonCont,
                       align=uiconst.TOLEFT,
                       label='Stop',
                       func=self.StopExport)
     self.statusLabel = uicontrols.Label(parent=self.mainCont,
                                         align=uiconst.TOTOP,
                                         top=10,
                                         text='',
                                         state=uiconst.UI_NORMAL)
コード例 #4
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetTopparentHeight(0)
     self.topPanel = Container(parent=self.sr.main,
                               align=uiconst.TOTOP,
                               height=30)
     uicontrols.Button(parent=self.topPanel,
                       align=uiconst.TOLEFT,
                       label='Pause',
                       width=120,
                       height=30,
                       func=self.Pause)
     uicontrols.Button(parent=self.topPanel,
                       align=uiconst.TOLEFT,
                       label='Resume',
                       width=120,
                       height=30,
                       func=self.Resume)
     self.mainQueue = uicontrols.Scroll(parent=self.sr.main,
                                        id='mainQueueScroll',
                                        align=uiconst.TOLEFT,
                                        width=300)
     self.subQueue = uicontrols.Scroll(parent=self.sr.main,
                                       id='subQueueScroll',
                                       align=uiconst.TOALL)
     self.queue = []
     uthread.new(self.PopulateMainQueueScrollTasklet)
コード例 #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 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)
コード例 #7
0
ファイル: uiScaling.py プロジェクト: connoryang/1v1dec
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetWndIcon(None)
     self.SetCaption('UI Scaling')
     self.SetTopparentHeight(0)
     self.SetMinSize([150, 100])
     mainCont = uiprimitives.Container(name='params', parent=self.sr.main, align=uiconst.TOALL, padding=const.defaultPadding)
     floats = (0.5, 2.0, 2)
     uicontrols.Label(text='use values from 0.5 to 2.0', parent=mainCont, align=uiconst.TOPLEFT)
     self.scaleEdit = uicontrols.SinglelineEdit(parent=mainCont, name='scaleEdit', align=uiconst.TOPLEFT, floats=floats, setvalue=uicore.desktop.dpiScaling, width=50, top=18)
     applyBtn = uicontrols.Button(parent=mainCont, name='apply', align=uiconst.TOPLEFT, label='Apply', left=54, top=18, func=self.ScaleUI)
     resetBtn = uicontrols.Button(parent=mainCont, name='reset', align=uiconst.TOPLEFT, label='Reset', left=0, top=40, func=self.ResetUI)
コード例 #8
0
 def ApplyAttributes(self, attributes):
     super(DebugSelectionWindow, self).ApplyAttributes(attributes)
     self.SetMinSize([40, self.default_height])
     self.SetCaption('Debug Selection')
     self.sr.content.padding = 5
     self.debugSelectionClient = sm.GetService('debugSelectionClient')
     self.debugSelectionClient._SetUpdateFunc(self._UpdateSelectionEntity)
     self.displayName = uicontrols.Label(parent=self.sr.content,
                                         align=uiconst.TOTOP,
                                         text=' ',
                                         padding=(0, 5, 0, 5))
     topContainer = uiprimitives.Container(parent=self.sr.content,
                                           align=uiconst.CENTER,
                                           height=25)
     bottomContainer = uiprimitives.Container(parent=self.sr.content,
                                              align=uiconst.CENTERBOTTOM,
                                              height=25)
     width = 0
     width += uicontrols.Button(parent=topContainer,
                                align=uiconst.TOLEFT,
                                label='Select Player',
                                padding=(2, 0, 2, 0),
                                func=self._SelectPlayer).width + 4
     width += uicontrols.Button(parent=topContainer,
                                align=uiconst.TOLEFT,
                                label='Select Target',
                                padding=(2, 0, 2, 0),
                                func=self._SelectSelected).width
     width += uicontrols.Button(parent=topContainer,
                                align=uiconst.TOLEFT,
                                label='Clear Selection',
                                padding=(2, 0, 2, 0),
                                func=self._ClearSelection).width + 4
     topContainer.width = width
     width = 0
     width += uicontrols.Button(parent=bottomContainer,
                                align=uiconst.TOLEFT,
                                label='Select Previous',
                                padding=(2, 0, 2, 0),
                                func=self._SelectPrevious).width + 4
     width += uicontrols.Button(parent=bottomContainer,
                                align=uiconst.TOLEFT,
                                label='Select Next',
                                padding=(2, 0, 2, 0),
                                func=self._SelectNext).width + 4
     bottomContainer.width = width
     self.SetMinSize([
         max(bottomContainer.width, topContainer.width) + 10,
         self.default_height
     ])
     self._UpdateSelectionEntity(self.debugSelectionClient.GetSelectedID(),
                                 ' ')
コード例 #9
0
 def Startup(self, args):
     self.sr.button1 = uicontrols.Button(parent=self,
                                         label='',
                                         align=uiconst.CENTERRIGHT,
                                         left=2)
     self.sr.button2 = uicontrols.Button(parent=self,
                                         label='',
                                         align=uiconst.CENTERRIGHT)
     self.sr.label = uicontrols.EveLabelMedium(name='label',
                                               text='',
                                               parent=self,
                                               align=uiconst.CENTERLEFT,
                                               left=8,
                                               state=uiconst.UI_DISABLED)
コード例 #10
0
 def Startup(self, args):
     jumpText = localization.GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/JumpCloneScroll/Jump')
     self.sr.JumpBtn = uicontrols.Button(parent=self,
                                         label=jumpText,
                                         align=uiconst.CENTER,
                                         func=self.OnClickJump)
     destroyLabel = localization.GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/JumpCloneScroll/Destroy')
     self.sr.DecomissionBtn = uicontrols.Button(
         parent=self,
         label=destroyLabel,
         align=uiconst.CENTER,
         func=self.OnClickDecomission)
     LineThemeColored(parent=self, align=uiconst.TOBOTTOM, opacity=0.4)
コード例 #11
0
 def Layout(self):
     """
     Setup UI controls for this window.
     """
     self.HideHeader()
     self.MakeUnResizeable()
     self.container = uicontrols.ContainerAutoSize(parent=self.GetMainArea(), align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, padding=(15, 15, 15, 0), callback=self.OnContainerResized, opacity=0.0)
     uicontrols.EveLabelLargeBold(parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ActivatePlex/ActivateHeading'))
     uicontrols.EveLabelMedium(parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ActivatePlex/ActivateDescription'), color=self.GRAY_COLOR, padding=(0, 5, 0, 10))
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     slot1 = uicontrols.ContainerAutoSize(parent=self.container, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0, 0, 0, 0.3))
     self.slot1Background = uiprimitives.Fill(parent=slot1, color=self.BLUE_COLOR, opacity=0.0)
     self.slot1Title = uicontrols.EveLabelMediumBold(parent=slot1, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ActivatePlex/GameTime'), padding=(60, 12, 140, 0), color=self.BLUE_COLOR)
     self.slot1Expiry = uicontrols.EveLabelMediumBold(parent=slot1, align=uiconst.TOTOP, text='', padding=(60, 0, 140, 10), color=self.GRAY_COLOR)
     self.slot1Button = uicontrols.Button(parent=slot1, label='', align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=120, fixedheight=30, pos=(10, 0, 0, 0))
     self.slot1Icon = Sprite(parent=slot1, texturePath='res:/UI/Texture/classes/CharacterSelection/plex_timer.png', align=uiconst.CENTERLEFT, pos=(15, 0, 32, 32))
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     slot2 = uicontrols.ContainerAutoSize(parent=self.container, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0, 0, 0, 0.3))
     self.slot2Background = uiprimitives.Fill(parent=slot2, color=self.BLUE_COLOR, opacity=0.0)
     self.slot2Title = uicontrols.EveLabelMediumBold(parent=slot2, align=uiconst.TOTOP, text='', padding=(60, 12, 140, 0), color=self.WHITE_COLOR)
     self.slot2Expiry = uicontrols.EveLabelMediumBold(parent=slot2, align=uiconst.TOTOP, text='', padding=(60, 0, 140, 10), color=self.GRAY_COLOR)
     self.slot2Button = uicontrols.Button(parent=slot2, label='', align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=120, fixedheight=30, pos=(10, 0, 0, 0))
     self.slot2Icon = Sprite(parent=slot2, texturePath='res:/UI/Texture/Icons/add_training_queue.png', align=uiconst.CENTERLEFT, pos=(15, 0, 32, 32))
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     slot3 = uicontrols.ContainerAutoSize(parent=self.container, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0, 0, 0, 0.3))
     self.slot3Background = uiprimitives.Fill(parent=slot3, color=self.BLUE_COLOR, opacity=0.0)
     self.slot3Title = uicontrols.EveLabelMediumBold(parent=slot3, align=uiconst.TOTOP, text='', padding=(60, 12, 140, 0), color=self.WHITE_COLOR)
     self.slot3Expiry = uicontrols.EveLabelMediumBold(parent=slot3, align=uiconst.TOTOP, text='', padding=(60, 0, 140, 10), color=self.GRAY_COLOR)
     self.slot3Button = uicontrols.Button(parent=slot3, label='', align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=120, fixedheight=30, pos=(10, 0, 0, 0))
     self.slot3Icon = Sprite(parent=slot3, texturePath='res:/UI/Texture/Icons/add_training_queue.png', align=uiconst.CENTERLEFT, pos=(15, 0, 32, 32))
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     slot4 = Container(parent=self.container, align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, bgColor=(0, 0, 0, 0.3), height=70)
     self.slot4Background = uiprimitives.Fill(parent=slot4, color=self.BLUE_COLOR, opacity=0.0)
     self.slot4Title = uicontrols.EveLabelMediumBold(parent=slot4, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ActivatePlex/Donate'), padding=(60, 12, 140, 0), color=self.BLUE_COLOR)
     self.slot4Edit = SearchInput(parent=slot4, align=uiconst.TOTOP, padding=(60, 0, 140, 10), height=18, color=self.GRAY_COLOR, GetSearchEntries=self.Search, OnSearchEntrySelected=self.OnSearchEntrySelected, hinttext=localization.GetByLabel('UI/ActivatePlex/SearchHint'))
     self.slot4Edit.SetHistoryVisibility(False)
     self.entryContainer = Container(parent=slot4, align=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, padding=(60, 0, 140, 10), height=32, bgColor=(0, 0, 0, 0.3))
     self.entryContainer.display = False
     self.slot4Button = uicontrols.Button(parent=slot4, label='', align=uiconst.CENTERRIGHT, fontsize=13, fixedwidth=120, fixedheight=30, pos=(10, 0, 0, 0))
     self.slot4Button.Disable()
     self.slot4Icon = Sprite(parent=slot4, texturePath='res:/UI/Texture/classes/CharacterSelection/plex_timer.png', align=uiconst.CENTERLEFT, pos=(15, 0, 32, 32))
     self.entryContainerIcon = Sprite(parent=self.entryContainer, texturePath='', align=uiconst.CENTERLEFT, pos=(0, 0, 32, 32))
     clipContainer = Container(parent=self.entryContainer, clipChildren=True, padding=(40, 0, 36, 0))
     self.entryContainerTitle = uicontrols.EveLabelMediumBold(parent=clipContainer, align=uiconst.CENTERLEFT, text='', width=150)
     self.entryContainerButton = uicontrols.ButtonIcon(parent=self.entryContainer, texturePath='res:/UI/Texture/Icons/73_16_210.png', align=uiconst.TOPRIGHT, func=self.ResetSearch, width=16, height=16, iconSize=16)
     uiprimitives.Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     self.closeButton = uicontrols.Button(parent=self.container, label='', func=self.Close, align=uiconst.TOTOP, fontsize=13, padding=(120, 10, 120, 30))
     uicore.animations.FadeTo(self.container, startVal=0.0, endVal=1.0, duration=0.5)
コード例 #12
0
    def CreateWindow(self):
        toppar = uiprimitives.Container(name='options', parent=self, align=uiconst.TOTOP, height=54)
        sidepar = uiprimitives.Container(name='sidepar', parent=toppar, align=uiconst.TORIGHT, width=54)
        icon = uicontrols.Button(parent=toppar, icon='res:/UI/Texture/Icons/77_32_41.png', iconSize=20, align=uiconst.BOTTOMRIGHT, left=4, func=self.Navigate, args=1)
        icon.hint = localization.GetByLabel('UI/Common/Next')
        self.sr.fwdBtn = icon
        icon = uicontrols.Button(parent=toppar, icon='res:/UI/Texture/Icons/77_32_42.png', iconSize=20, align=uiconst.BOTTOMRIGHT, left=30, func=self.Navigate, args=-1)
        icon.hint = localization.GetByLabel('UI/Common/Previous')
        self.sr.backBtn = icon
        uiprimitives.Container(name='push', parent=toppar, align=uiconst.TOTOP, height=6)
        optlist = [[localization.formatters.FormatNumeric(10), 10],
         [localization.formatters.FormatNumeric(25), 25],
         [localization.formatters.FormatNumeric(50), 50],
         [localization.formatters.FormatNumeric(100), 100],
         [localization.formatters.FormatNumeric(500), 500]]
        countcombo = uicontrols.Combo(label=localization.GetByLabel('UI/Common/PerPage'), parent=toppar, options=optlist, name='membersperpage', callback=self.OnComboChange, width=92, pos=(2, 36, 0, 0))
        self.sr.MembersPerPage = countcombo
        viewOptionsList1 = [[localization.GetByLabel('UI/Corporations/Common/Roles'), VIEW_ROLES], [localization.GetByLabel('UI/Corporations/Common/GrantableRoles'), VIEW_GRANTABLE_ROLES], [localization.GetByLabel('UI/Corporations/Common/Titles'), VIEW_TITLES]]
        viewOptionsList2 = []
        for roleGrouping in self.sr.roleGroupings.itervalues():
            viewOptionsList2.append([localization.GetByMessageID(roleGrouping.roleGroupNameID), roleGrouping.roleGroupID])

        i = 0
        for optlist, label, config, defval in [(viewOptionsList1,
          localization.GetByLabel('UI/Common/ViewMode'),
          'viewtype',
          1000), (viewOptionsList2,
          localization.GetByLabel('UI/Common/Type'),
          'rolegroup',
          None)]:
            combo = uicontrols.Combo(label=label, parent=toppar, options=optlist, name=config, callback=self.OnComboChange, width=146, pos=(countcombo.left + countcombo.width + 6 + i * 152,
             countcombo.top,
             0,
             0))
            setattr(self.sr, config + 'Combo', combo)
            i += 1

        self.sr.scroll = uicontrols.Scroll(name='journal', parent=self, padding=(const.defaultPadding,
         const.defaultPadding,
         const.defaultPadding,
         const.defaultPadding))
        self.sr.scroll.OnColumnChanged = self.OnColumnChanged
        buttons = [[localization.GetByLabel('UI/Common/Buttons/SaveChanges'),
          self.SaveChanges,
          (),
          81]]
        btns = uicontrols.ButtonGroup(btns=buttons)
        self.children.insert(0, btns)
コード例 #13
0
 def OnLinkTypeChange(self, chkbox, *args):
     if chkbox.GetValue():
         self.itemID = self.typeID = 0
         self.key = chkbox.data['key']
         text = uiutil.GetChild(chkbox, 'text')
         wnd = chkbox.FindParentByName(
             localization.GetByLabel('UI/Common/GenerateLink'))
         if not wnd:
             return
         editParent = uiutil.FindChild(wnd, 'editField')
         if editParent is not None:
             label = uiutil.FindChild(editParent, 'label')
             label.text = text.text
             edit = uiutil.FindChild(editParent, 'edit_txt')
             edit.SetValue('')
             self.sr.searchbutt = uiutil.FindChild(editParent, 'button')
             if self.key in ('char', 'corp', 'type', 'solarsystem',
                             'station'):
                 if self.sr.searchbutt == None:
                     self.sr.searchbutt = uicontrols.Button(
                         parent=editParent,
                         label=localization.GetByLabel('UI/Common/Search'),
                         func=self.OnSearch,
                         btn_default=0,
                         align=uiconst.TOPRIGHT)
                 else:
                     self.sr.searchbutt.state = uiconst.UI_NORMAL
             elif self.sr.searchbutt != None:
                 self.sr.searchbutt.state = uiconst.UI_HIDDEN
コード例 #14
0
ファイル: safeLogoffTimer.py プロジェクト: connoryang/1v1dec
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.SetHint(
         localization.GetByLabel('UI/Inflight/SafeLogoffTimerHint'))
     uicontrols.Frame(parent=self)
     self.logoffTime = attributes.logoffTime
     topCont = uiprimitives.Container(parent=self,
                                      align=uiconst.TOTOP,
                                      height=30)
     timerCont = uiprimitives.Container(parent=self,
                                        align=uiconst.TOTOP,
                                        height=70)
     bottomCont = uiprimitives.Container(parent=self, align=uiconst.TOALL)
     self.caption = uicontrols.Label(
         parent=topCont,
         fontsize=24,
         bold=True,
         align=uiconst.CENTERTOP,
         text=localization.GetByLabel('UI/Inflight/SafeLogoffTimerCaption'),
         top=4)
     self.timer = uicontrols.Label(parent=timerCont,
                                   align=uiconst.CENTER,
                                   fontsize=60,
                                   color=util.Color.YELLOW,
                                   bold=True)
     self.button = uicontrols.Button(
         parent=bottomCont,
         label=localization.GetByLabel(
             'UI/Inflight/SafeLogoffAbortLogoffLabel'),
         align=uiconst.CENTER,
         func=self.AbortSafeLogoff)
     self.UpdateLogoffTime()
     uthread.new(self.UpdateLogoffTime_Thread)
コード例 #15
0
ファイル: ManagerWnd.py プロジェクト: EVEModX/EVEModX
 def ApplyAttributes(self, attributes):
     uicontrols.ContainerAutoSize.ApplyAttributes(self, attributes)
     data = attributes.data
     text = r'<fontsize=18><b>%s</b></fontsize> %s %s, by %s<br><br>%s' % (
         data.display_name, data.name, data.version, data.author,
         data.description)
     uicontrols.EveLabelMedium(text=text,
                               parent=self,
                               align=uiconst.TOTOP,
                               padding=const.defaultPadding)
     self.buttonCont = Container(name='buttonCont',
                                 parent=self,
                                 align=uiconst.TOTOP,
                                 height=18,
                                 padTop=4)
     for button in getattr(data.module, 'BUTTONS', ()):
         try:
             uicontrols.Button(parent=self.buttonCont,
                               align=uiconst.TORIGHT,
                               label=button[0],
                               func=button[1],
                               args=button[2],
                               padRight=4,
                               hint=button[3])
         except:
             pass
     LineThemeColored(parent=self, align=uiconst.TOTOP, padTop=4)
コード例 #16
0
ファイル: attributes.py プロジェクト: connoryang/1v1dec
 def Startup(self, *args):
     self.OnSelectCallback = None
     self.sr.label = uicontrols.EveLabelSmall(
         text=localization.GetByLabel('UI/Neocom/NextDNAModification'),
         parent=self,
         left=8,
         top=4,
         maxLines=1)
     self.sr.respecTime = uicontrols.EveLabelMedium(text='',
                                                    parent=self,
                                                    left=8,
                                                    top=18,
                                                    maxLines=1)
     self.sr.numberOfRemaps = uicontrols.EveLabelMedium(
         text='',
         parent=self,
         left=8,
         top=38,
         maxLines=1,
         state=uiconst.UI_HIDDEN)
     self.sr.respecButton = uicontrols.Button(
         parent=self,
         label=localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/Attributes/RemapStatsNow'
         ),
         align=uiconst.TOPRIGHT,
         pos=(2, 16, 0, 0),
         func=self.OpenRespecWindow,
         args=(False, ))
     self.hint = localization.GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/Attributes/CharacterSheetHint'
     )
コード例 #17
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.searchStr = ''
     self.scope = 'all'
     self.SetMinSize([320, 300])
     self.SetWndIcon(self.iconNum)
     self.scroll = uicontrols.Scroll(parent=self.sr.main, padding=(const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding,
      const.defaultPadding))
     self.scroll.Startup()
     self.scroll.multiSelect = 0
     self.standardBtns = uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Ship/ShipConfig/Invite'),
       self.InviteToCorp,
       (),
       81], [localization.GetByLabel('UI/Common/Buttons/Cancel'),
       self.OnCancel,
       (),
       81]])
     self.inviteButton = self.standardBtns.GetBtnByIdx(0)
     self.inviteButton.Disable()
     self.sr.main.children.insert(0, self.standardBtns)
     self.SetCaption(localization.GetByLabel('UI/Messages/SelectCharacterTitle'))
     self.label = uicontrols.EveLabelSmall(text=localization.GetByLabel('UI/Shared/TypeSearchString'), parent=self.sr.topParent, left=70, top=16, state=uiconst.UI_NORMAL)
     self.nameInput = uicontrols.SinglelineEdit(name='edit', parent=self.sr.topParent, pos=(70,
      self.label.top + self.label.height + 2,
      86,
      0), align=uiconst.TOPLEFT, maxLength=32)
     self.nameInput.OnReturn = self.Search
     btn = uicontrols.Button(parent=self.sr.topParent, label=localization.GetByLabel('UI/Wallet/WalletWindow/WalletSearch'), pos=(self.nameInput.left + self.nameInput.width + 2,
      self.nameInput.top,
      0,
      0), func=self.Search, btn_default=1)
     self.SetHint(localization.GetByLabel('UI/Common/TypeInSearch'))
コード例 #18
0
ファイル: svc_poser.py プロジェクト: connoryang/1v1dec
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetCaption('Fuel Starbase')
     self.SetMinSize([256, 256], 1)
     self.SetWndIcon(None)
     self.SetTopparentHeight(0)
     self.MakeUnResizeable()
     y = const.defaultPadding + 10
     self.cycles_online = uicontrols.SinglelineEdit(name='cycles_online', parent=self.sr.main, setvalue=0, ints=(0, 99999), left=90, width=100, top=y)
     self.cycles_cpupow = uicontrols.SinglelineEdit(name='cycles_cpupow', parent=self.sr.main, setvalue=0, ints=(0, 99999), left=90, width=100, top=y + 20)
     self.cycles_reinf = uicontrols.SinglelineEdit(name='cycles_reinf', parent=self.sr.main, setvalue=0, ints=(0, 99999), left=90, width=100, top=y + 40)
     uicontrols.Label(text='Add number of cycles fuel for...', parent=self.sr.main, width=400, left=const.defaultPadding, top=y - 12, fontsize=9, letterspace=2, uppercase=1, state=uiconst.UI_NORMAL)
     y += 4
     uicontrols.Label(text='Online:', parent=self.sr.main, width=100, left=2 * const.defaultPadding, top=y, fontsize=9, letterspace=2, uppercase=1, state=uiconst.UI_NORMAL)
     uicontrols.Label(text='CPU/Power:', parent=self.sr.main, width=100, left=2 * const.defaultPadding, top=y + 20, fontsize=9, letterspace=2, uppercase=1, state=uiconst.UI_NORMAL)
     uicontrols.Label(text='Reinforced:', parent=self.sr.main, width=100, left=2 * const.defaultPadding, top=y + 40, fontsize=9, letterspace=2, uppercase=1, state=uiconst.UI_NORMAL)
     uicontrols.Button(parent=self.sr.main, label='Auto', pos=(204,
      y + 5,
      0,
      0), func=self.Auto)
     y += 4
     uiprimitives.Line(parent=self.sr.main, align=uiconst.RELATIVE, color=(1.0, 1.0, 1.0, 0.5), left=194, top=y, width=4, height=1)
     uiprimitives.Line(parent=self.sr.main, align=uiconst.RELATIVE, color=(1.0, 1.0, 1.0, 0.5), left=194, top=y + 20, width=4, height=1)
     uiprimitives.Line(parent=self.sr.main, align=uiconst.RELATIVE, color=(1.0, 1.0, 1.0, 0.5), left=198, top=y, width=1, height=21)
     uiprimitives.Line(parent=self.sr.main, align=uiconst.RELATIVE, color=(1.0, 1.0, 1.0, 0.5), left=199, top=y + 10, width=4, height=1)
     buttons = [['Fuel',
       self.Fuel,
       None,
       81], ['Cancel',
       self.Cancel,
       None,
       81]]
     self.sr.main.children.insert(0, uicontrols.ButtonGroup(btns=buttons))
コード例 #19
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.filePath = blue.paths.ResolvePathForWriting(u'settings:/windowmonitor.txt')
     self.SetCaption('Window Monitor')
     self.SetTopparentHeight(0)
     topCont = uiprimitives.Container(parent=self.sr.main, align=uiconst.TOALL, height=95)
     margin = 10
     self.openedScroll = uicontrols.Scroll(parent=topCont, padding=(margin,
      margin,
      margin,
      0), align=uiconst.TOLEFT, width=150)
     self.allWindowsScroll = uicontrols.Scroll(parent=topCont, padding=(0,
      margin,
      margin,
      0), align=uiconst.TOALL)
     self.messageScroll = uicontrols.Scroll(parent=self.sr.main, padding=(margin,
      0,
      margin,
      margin), align=uiconst.TOBOTTOM, height=50)
     self.messageScroll.Load(contentList=[], headers=[], scrollTo=0)
     midCont = uiprimitives.Container(parent=self.sr.main, align=uiconst.TOBOTTOM, padding=(0, 5, 0, 5), height=25)
     self.infoLabel = uicontrols.Label(text='', parent=midCont, align=uiconst.CENTERLEFT, left=margin, state=uiconst.UI_NORMAL)
     self.infoLabel.OnClick = self.OpenPrefs
     self.infoLabel.hint = 'Click to open windowmonitor save file location.'
     uicontrols.Button(parent=midCont, label='Clear', align=uiconst.TORIGHT, left=margin, func=self.Clear)
     self.DoSetup()
コード例 #20
0
 def ConstructLayout(self):
     uicontrols.EveLabelLargeBold(
         name='caption',
         parent=self.sr.topParent,
         text=localization.GetByLabel('UI/SecurityOffice/HeaderCaption'),
         top=20,
         left=98)
     uicontrols.EveLabelSmall(
         name='subcaption',
         parent=self.sr.topParent,
         text=localization.GetByLabel(
             'UI/SecurityOffice/WindowSubheaderDescription'),
         top=40,
         left=98)
     self.securityTagBar = uicls.SecurityTagBar(parent=self.sr.main)
     bottomContainer = uiprimitives.Container(name='bottomContainer',
                                              parent=self.sr.main,
                                              align=uiconst.TOBOTTOM,
                                              height=40)
     self.iskCostText = uicontrols.EveLabelMediumBold(
         parent=bottomContainer, align=uiconst.CENTERLEFT, left=8)
     self.submitButton = uicontrols.Button(
         parent=bottomContainer,
         align=uiconst.CENTERRIGHT,
         left=8,
         label=localization.GetByLabel('UI/SecurityOffice/ExchangeTags'),
         func=self.Submit)
     self.CreateTextFeedback()
     uicontrols.GradientSprite(parent=bottomContainer,
                               align=uiconst.TOALL,
                               rotation=-math.pi / 2,
                               rgbData=[(0, (0.3, 0.3, 0.3))],
                               alphaData=[(0, 0.5), (0.9, 0.15)],
                               state=uiconst.UI_DISABLED)
コード例 #21
0
 def DrawLeftSide(self):
     self.sr.leftside = uiprimitives.Container(name='leftside', parent=self.sr.main, align=uiconst.TOLEFT, width=256)
     uiprimitives.Container(name='push', parent=self.sr.leftside, align=uiconst.TOTOP, height=6)
     self.sr.leftMainPanel = uiprimitives.Container(name='leftMainPanel', parent=self.sr.leftside, align=uiconst.TOALL, pos=(const.defaultPadding,
      0,
      const.defaultPadding,
      0))
     dummyParent = uiprimitives.Container(name='dummy', parent=self.sr.leftMainPanel, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     ownerParent = uiprimitives.Container(name='ownerParent', parent=dummyParent, align=uiconst.TOTOP, height=20)
     uiprimitives.Container(name='push', parent=ownerParent, align=uiconst.TORIGHT, width=1)
     options = [(localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/PersonalFittings'), session.charid), (localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/CorporationFittings'), session.corpid)]
     selected = settings.user.ui.Get('savedFittingsCombo', None)
     if selected != session.charid and selected != session.corpid:
         selected = session.charid
     self.ownerID = selected
     self.sr.ownerCombo = uicontrols.Combo(label=None, parent=ownerParent, options=options, name='savedFittingsCombo', select=selected, callback=self.ChangeOwnerFilter, pos=(1, 1, 0, 0), align=uiconst.TOALL)
     searchContainer = uiprimitives.Container(name='searchContainer', parent=dummyParent, align=uiconst.TOTOP, top=const.defaultPadding, height=20)
     self.sr.searchTextField = uicontrols.SinglelineEdit(name='searchTextField', parent=searchContainer, align=uiconst.TOLEFT, width=160, maxLength=40, left=1)
     self.sr.searchTextField.OnReturn = self.Search
     self.sr.searchButton = uicontrols.Button(parent=searchContainer, label=localization.GetByLabel('UI/Common/Buttons/Search'), align=uiconst.CENTERRIGHT, func=self.Search)
     self.sr.scroll = uicontrols.Scroll(parent=dummyParent, align=uiconst.TOALL, padding=(0,
      const.defaultPadding,
      0,
      const.defaultPadding))
     self.sr.scroll.multiSelect = 0
     fitButtons = FlowContainer(name='buttonParent', parent=self.sr.leftside, align=uiconst.TOBOTTOM, padding=6, autoHeight=True, centerContent=True, contentSpacing=uiconst.BUTTONGROUPMARGIN, idx=0)
     self.exportButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Commands/Export'), func=self.ExportFittings, align=uiconst.NOALIGN)
     self.importButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Commands/Import'), func=self.ImportFittings, align=uiconst.NOALIGN)
     if boot.region != 'optic':
         self.importFromClipboardButton = Button(parent=fitButtons, label=localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/ImportFromClipboard'), func=sm.GetService('fittingSvc').ImportFittingFromClipboard, align=uiconst.NOALIGN)
         self.importFromClipboardButton.hint = localization.GetByLabel('UI/Fitting/FittingWindow/FittingManagement/ImportFromClipboardHint')
     self.DrawFittings()
コード例 #22
0
ファイル: subcellularatlas.py プロジェクト: connoryang/1v1dec
 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'))
コード例 #23
0
ファイル: tutorialtooltips.py プロジェクト: connoryang/1v1dec
 def LoadTooltip(self, header, description, on_continue, on_quit):
     self.AddCell(EveLabelLarge(text=header,
                                state=uiconst.UI_DISABLED,
                                width=250),
                  width=250)
     self.AddCell(uicontrols.ButtonIcon(
         texturePath='res:/UI/Texture/icons/38_16_220.png',
         iconSize=16,
         width=16,
         height=16,
         func=on_quit),
                  margin=(0, 0, 0, 0))
     self.AddCell(Fill(align=uiconst.TOTOP,
                       state=uiconst.UI_DISABLED,
                       color=(1, 1, 1, 0.3),
                       height=1,
                       padding=(0, 3, 0, 3)),
                  colSpan=self.columns)
     self.AddCell(EveLabelMedium(text=description,
                                 state=uiconst.UI_DISABLED,
                                 width=250),
                  width=250,
                  colSpan=self.columns)
     self.AddCell(uicontrols.Button(label=localization.GetByLabel(
         'UI/ProjectDiscovery/TutorialContinueButtonLabel'),
                                    align=uiconst.CENTER,
                                    func=lambda _: on_continue()),
                  colSpan=self.columns)
コード例 #24
0
 def _LoadSupportBugReport(self, parent):
     bugreportpar = uiprimitives.Container(name='bugreportpar',
                                           parent=parent,
                                           align=uiconst.TOTOP)
     bugreportpar.padTop = 4
     bugreporttext = uicontrols.EveLabelMedium(
         name='label',
         text=localization.GetByLabel('UI/Help/ReportBugFull'),
         parent=bugreportpar,
         align=uiconst.TOPLEFT,
         pos=(8, 0, 280, 0),
         state=uiconst.UI_NORMAL)
     bugreportpar.height = bugreporttext.textheight + 4
     bugreportbtnparent = uiprimitives.Container(name='bugreportbtnparent',
                                                 parent=parent,
                                                 align=uiconst.TOTOP,
                                                 width=96)
     bugreportbtnparent.padTop = 4
     bugreportbtn = uicontrols.Button(
         parent=bugreportbtnparent,
         label=localization.GetByLabel('UI/Help/ReportBug'),
         func=self.CreateBugReport,
         pos=(6, 0, 0, 0),
         align=uiconst.TOPRIGHT)
     bugreportbtnparent.height = bugreportbtn.height + 4
     return bugreportpar.height + bugreportbtnparent.height + 8
コード例 #25
0
ファイル: mainScreen.py プロジェクト: connoryang/1v1dec
 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
コード例 #26
0
 def _LoadSupportCareer(self, parent):
     funnelpar = uiprimitives.Container(name='funnelpar',
                                        parent=parent,
                                        align=uiconst.TOTOP)
     funnelpar.padTop = 4
     funneltext = uicontrols.EveLabelMedium(
         name='label',
         text=localization.GetByLabel('UI/Help/CareerAdvancementFull'),
         parent=funnelpar,
         align=uiconst.TOPLEFT,
         pos=(8, 0, 280, 0),
         state=uiconst.UI_NORMAL)
     funnelpar.height = funneltext.textheight + 4
     funnelbtnparent = uiprimitives.Container(name='funnelbtnparent',
                                              parent=parent,
                                              align=uiconst.TOTOP,
                                              width=96)
     funnelbtnparent.padTop = 4
     funnelbtn = uicontrols.Button(
         parent=funnelbtnparent,
         label=localization.GetByLabel('UI/Help/ShowCareerAgents'),
         func=self.ShowTutorialAgents,
         args=('support', ),
         pos=(6, 0, 0, 0),
         align=uiconst.TOPRIGHT)
     funnelbtnparent.height = funnelbtn.height + 4
     return funnelpar.height + funnelbtnparent.height + 8
コード例 #27
0
 def _LoadSupportHelpChannel(self, parent):
     helpchannelpar = uiprimitives.Container(name='helpchannelpar',
                                             parent=parent,
                                             align=uiconst.TOTOP)
     helpchannelpar.padTop = 4
     helptext = uicontrols.EveLabelMedium(
         name='label',
         text=localization.GetByLabel('UI/Help/JoinChannelHint'),
         parent=helpchannelpar,
         align=uiconst.TOPLEFT,
         pos=(8, 0, 280, 0),
         state=uiconst.UI_NORMAL)
     helpchannelpar.height = helptext.textheight + 4
     helpbtnparent = uiprimitives.Container(name='helpbtnparent',
                                            parent=parent,
                                            align=uiconst.TOTOP)
     helpbtnparent.padTop = 4
     helpchannelbtn = uicontrols.Button(
         parent=helpbtnparent,
         label=localization.GetByLabel('UI/Help/JoinChannel'),
         func=self.JoinHelpChannel,
         btn_default=0,
         align=uiconst.TOPRIGHT)
     helpchannelbtn.left = 6
     helpbtnparent.height = helpchannelbtn.height + 4
     return helpchannelpar.height + helpbtnparent.height + 8
コード例 #28
0
 def ActivateKillRightMenu(self, menuParent):
     cont = menuParent.AddContainer(align=uiconst.TOTOP,
                                    padding=const.defaultPadding)
     cont.GetEntryWidth = lambda mc=cont: 230
     charName = cfg.eveowners.Get(self.charID).name
     charNamelabel = localization.GetByLabel(
         'UI/Contracts/ContractsWindow/ShowInfoLink',
         showInfoName=charName,
         info=('showinfo', const.typeCharacterAmarr, self.charID))
     if self.price is not None:
         headerText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/BuyKillRight')
         explainText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/PurchaseLabel',
             charName=charNamelabel)
         priceText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/AcativationCost',
             costAmount=util.FmtISK(self.price, 0))
     else:
         headerText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/ActivateKillRight')
         explainText = localization.GetByLabel(
             'UI/CharacterSheet/CharacterSheetWindow/ActivateLabel',
             charName=charNamelabel)
         priceText = ''
     headerLabel = uicontrols.EveLabelLarge(text=headerText,
                                            parent=cont,
                                            align=uiconst.TOTOP,
                                            state=uiconst.UI_NORMAL,
                                            bold=True)
     helpTextCont = uiprimitives.Container(name='helpTextCont',
                                           parent=cont,
                                           align=uiconst.TOTOP,
                                           height=40,
                                           padTop=const.defaultPadding)
     helpText = uicontrols.EveLabelMedium(text=explainText,
                                          parent=helpTextCont,
                                          state=uiconst.UI_NORMAL,
                                          align=uiconst.TOTOP,
                                          color=(1.0, 0.0, 0.0, 0.8))
     buttonCont = uiprimitives.Container(name='buttonCont',
                                         parent=cont,
                                         align=uiconst.TOTOP,
                                         height=20)
     priceLabel = uicontrols.EveLabelMedium(text=priceText,
                                            parent=buttonCont)
     buttonLabel = localization.GetByLabel(
         'UI/CharacterSheet/CharacterSheetWindow/Activate')
     if self.price is None:
         self.func = 'ActivateKillRight'
         self.params = (self.killRightID, self.charID, self.shipID)
     else:
         self.func = 'BuyKillRight'
         self.params = (self.killRightID, self.charID, self.shipID,
                        self.price)
     self.activateBtn = uicontrols.Button(parent=buttonCont,
                                          label=buttonLabel,
                                          align=uiconst.TORIGHT,
                                          func=self.ActivateKillRight)
コード例 #29
0
ファイル: cloneStation.py プロジェクト: connoryang/1v1dec
 def AddCloneLocation(self, stationID, stationName, stationTypeID, isRemote,
                      func):
     if isRemote:
         if stationID == session.hqID:
             title = localization.GetByLabel(
                 'UI/Medical/Clone/CorporationHeadquarters')
         else:
             title = localization.GetByLabel(
                 'UI/Medical/Clone/CorporationOffice')
         parent = self.remote
         color = self.BLUE_COLOR
     else:
         if stationID in (session.stationid2, session.structureid):
             title = localization.GetByLabel('UI/Medical/Clone/ThisStation')
         else:
             title = localization.GetByLabel(
                 'UI/Medical/Clone/SchoolHeadquarters')
         parent = self.local
         color = self.GREEN_COLOR
     container = uicontrols.ContainerAutoSize(parent=parent,
                                              align=uiconst.TOTOP,
                                              alignMode=uiconst.TOTOP,
                                              state=uiconst.UI_PICKCHILDREN,
                                              bgColor=(0.2, 0.2, 0.2, 0.3))
     container.DisableAutoSize()
     label = "<url=showinfo:%d//%d alt='%s'>%s</url>" % (
         stationTypeID, stationID, title, stationName)
     uicontrols.EveLabelMediumBold(parent=container,
                                   align=uiconst.TOTOP,
                                   text=title,
                                   padding=(7, 5, 0, 0),
                                   color=color)
     uicontrols.EveLabelMediumBold(parent=container,
                                   align=uiconst.TOTOP,
                                   state=uiconst.UI_NORMAL,
                                   text=label,
                                   padding=(7, 0, 140, 5))
     if stationID != self.homeStationID:
         uicontrols.Button(parent=container,
                           label=localization.GetByLabel(
                               'UI/Medical/Clone/SetHomeStationButton'),
                           align=uiconst.CENTERRIGHT,
                           fontsize=13,
                           fixedwidth=140,
                           fixedheight=30,
                           pos=(5, 0, 0, 0),
                           func=func)
     else:
         uicontrols.EveLabelMediumBold(
             parent=container,
             align=uiconst.CENTERRIGHT,
             text=localization.GetByLabel(
                 'UI/Medical/Clone/CurrentHomeStation'),
             padding=(-15, 0, 0, 0))
     uiprimitives.Line(parent=parent,
                       align=uiconst.TOTOP,
                       color=self.LINE_COLOR)
     container.EnableAutoSize()
コード例 #30
0
ファイル: uiSpriteTest.py プロジェクト: connoryang/1v1dec
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetCaption('UI Sprite Test')
     if hasattr(self, 'SetTopparentHeight'):
         self.SetTopparentHeight(0)
     self.textureSetFunc = None
     self.bottomCont = uiprimitives.Container(name='bottomCont', parent=self.sr.main, align=uiconst.TOBOTTOM_PROP, padding=(5, 0, 5, 0), height=0.6)
     self.topCont = uiprimitives.Container(name='topCont', parent=self.sr.main, align=uiconst.TOALL, padding=(3, 3, 3, 3))
     self.topLeftCont = uiprimitives.Container(name='topLeftCont', parent=self.topCont, align=uiconst.TOLEFT, width=90)
     self.topRightCont = uiprimitives.Container(name='topRightCont', parent=self.topCont, align=uiconst.TOALL)
     primaryCont = uiprimitives.Container(parent=self.topLeftCont, align=uiconst.TOTOP, height=self.topLeftCont.width)
     uicontrols.Button(name='closePrimaryBtn', parent=primaryCont, label='<color=red>X', align=uiconst.TOPRIGHT, func=self.OnClosePrimaryBtnClick, fixedwidth=20, alwaysLite=True, top=-3, left=-3)
     self.primaryTextureSprite = uiprimitives.Sprite(name='primaryTextureSprite', parent=primaryCont, align=uiconst.TOALL)
     uicontrols.Button(name='loadPrimaryTextureBtn', parent=self.topLeftCont, label='Load primary', align=uiconst.TOTOP, func=self.OnLoadPrimaryTextureBtnClicked)
     uicontrols.Button(name='switchBtn', parent=self.topLeftCont, label='Switch', align=uiconst.TOTOP, func=self.OnSwitchBtnClick, padding=(0, 8, 0, 5), alwaysLite=True)
     secondaryCont = uiprimitives.Container(parent=self.topLeftCont, align=uiconst.TOTOP, height=self.topLeftCont.width, padTop=10)
     uicontrols.Button(name='closeSecondaryBtn', parent=secondaryCont, label='<color=red>X', align=uiconst.TOPRIGHT, func=self.OnCloseSecondaryBtnClick, fixedwidth=20, alwaysLite=True, top=-3, left=-3)
     self.secondaryTextureSprite = uiprimitives.Sprite(name='secondaryTextureSprite', parent=secondaryCont, align=uiconst.TOALL)
     uicontrols.Button(name='loadSecondaryTextureBtn', parent=self.topLeftCont, label='Load secondary', align=uiconst.TOTOP, func=self.OnLoadSecondaryTextureBtnClicked)
     self.mainSprite = uiprimitives.Sprite(name='mainSprite', parent=self.topRightCont, align=uiconst.CENTER, width=128, height=128)
     sizeCont = uiprimitives.Container(parent=self.topRightCont, align=uiconst.TOPRIGHT, pos=(5, 5, 60, 50))
     self.mainSpriteWidthEdit = uicontrols.SinglelineEdit(parent=sizeCont, name='mainSpriteWidthEdit', align=uiconst.TOTOP, label='width', ints=(1, 1024), setvalue=self.mainSprite.width, padTop=10, OnChange=self.OnMainSpriteWidthHeightChange)
     self.mainSpriteHeightEdit = uicontrols.SinglelineEdit(parent=sizeCont, name='mainSpriteHeightEdit', align=uiconst.TOTOP, label='height', ints=(1, 1024), setvalue=self.mainSprite.height, padTop=15, OnChange=self.OnMainSpriteWidthHeightChange)
     uicontrols.Button(parent=self.topRightCont, align=uiconst.BOTTOMRIGHT, label='Animate', func=self.OpenAnimationWindow, top=20)
     uicontrols.Button(parent=self.topRightCont, align=uiconst.BOTTOMRIGHT, label='Copy to clipboard', func=self.CopyCodeToClipboard, top=0)
     uiprimitives.Line(parent=self.bottomCont, align=uiconst.TOTOP)
     self.ConstructColorColumn()
     self.ConstructBlendModeColumn()
     self.ConstructSpriteEffectColumn()
     self.ConstructGlowColumn()
     self.ConstructShadowColumn()
     self.SetPrimaryPath(settings.user.ui.Get('UISpriteTestPrimaryTexturePath', None))
     self.SetSecondaryPath(settings.user.ui.Get('UISpriteTestSecondaryTexturePath', None))