コード例 #1
0
 def Prepare_Appearance_(self):
     uicls.Line(parent=self.sr.buttonParent,
                align=uiconst.TOLEFT,
                color=(0.0, 0.0, 0.0, 0.1))
     uicls.Line(parent=self.sr.buttonParent,
                align=uiconst.TORIGHT,
                color=(0.0, 0.0, 0.0, 0.1))
     shape = uicls.Container(parent=self,
                             name='shape',
                             state=uiconst.UI_DISABLED,
                             align=uiconst.TOALL,
                             padding=(3, 3, 3, 3))
     uicls.Frame(parent=shape,
                 name='dot',
                 texturePath='res:/UI/Texture/Shared/windowButtonDOT.png',
                 cornerSize=2,
                 spriteEffect=trinity.TR2_SFX_DOT,
                 blendMode=trinity.TR2_SBM_ADD)
     uicls.Sprite(
         parent=shape,
         name='gradientFill',
         texturePath='res:/UI/Texture/Shared/windowButtonGradient.png',
         align=uiconst.TOALL,
         filter=False,
         color=(1, 1, 1, 0.8))
     uicls.Fill(name='solidFill', parent=shape, color=(0, 0, 0, 0.95))
     uicls.Frame(parent=shape,
                 padding=(-4, -4, -4, -4),
                 name='shadow',
                 texturePath='res:/UI/Texture/Shared/windowShadow.png',
                 cornerSize=9,
                 state=uiconst.UI_DISABLED,
                 color=(0.0, 0.0, 0.0, 0.5))
コード例 #2
0
ファイル: corp_ui_member_find.py プロジェクト: R4M80MrX/eve-1
 def Load(self, args):
     if not self.sr.Get('inited', 0):
         self.sr.inited = 1
         self.sr.wndButtonContainer = uicls.Container(name='results', parent=self, align=uiconst.TOTOP, height=16)
         showHide = uicls.Container(name='filters', parent=self.sr.wndButtonContainer, height=48, align=uiconst.TOTOP)
         uicls.Line(parent=showHide, align=uiconst.TOTOP, top=15, color=(0.0, 0.0, 0.0, 0.25))
         uicls.Line(parent=showHide, align=uiconst.TOTOP)
         self.sr.showHide = showHide
         uicls.EveHeaderSmall(text=localization.GetByLabel('UI/Corporations/BaseCorporationUI/Query'), parent=showHide, left=8, top=3, state=uiconst.UI_NORMAL)
         a = uicls.EveHeaderSmall(text='', parent=showHide, left=18, top=3, state=uiconst.UI_NORMAL, align=uiconst.TOPRIGHT)
         a.OnClick = self.ShowHideQuery
         a.GetMenu = None
         self.sr.ml = a
         expander = uicls.Sprite(parent=showHide, pos=(6, 2, 11, 11), name='expandericon', state=uiconst.UI_NORMAL, texturePath='res:/UI/Texture/Shared/expanderDown.png', align=uiconst.TOPRIGHT)
         expander.OnClick = self.ShowHideQuery
         self.sr.showHideExp = expander
         self.sr.wndButtonContainer.state = uiconst.UI_HIDDEN
         wndQueryForm = self.sr.wndQuery.Load(self, self.PopulateView)
         wndQueryForm.align = uiconst.TOTOP
         wndQueryForm.height = 180
         self.sr.wndQueryForm = wndQueryForm
         wndForm = uicls.Container(name='form', parent=self, align=uiconst.TOALL, pos=(0, 0, 0, 0))
         self.sr.wndForm = wndForm
         wndOutputTypeArea = uicls.Container(name='output_type', parent=wndForm, align=uiconst.TOTOP, height=24)
         uicls.Container(name='push', parent=wndOutputTypeArea, align=uiconst.TOTOP, height=6)
         label = uicls.Container(name='text', parent=wndOutputTypeArea, align=uiconst.TOLEFT, width=150)
         uicls.EveLabelMedium(text=localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/ShowResultsUsingLabel'), parent=label, align=uiconst.TOTOP, state=uiconst.UI_NORMAL)
         optlist = [[localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/SimpleList'), form.CorpMembersViewSimple], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/RoleManagementList'), form.CorpMembersViewRoleManagement], [localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/TaskManagementList'), form.CorpMembersViewTaskManagement]]
         countcombo = uicls.Combo(label='', parent=wndOutputTypeArea, options=optlist, name='resultViewType', callback=self.OnComboChange, width=146, align=uiconst.TOLEFT)
         self.sr.outputTypeCombo = countcombo
         self.sr.outputWindowContainer = None
         viewClass = self.sr.outputTypeCombo.GetValue()
         self.SwitchToView(viewClass)
     sm.GetService('corpui').LoadTop('07_11', localization.GetByLabel('UI/Corporations/CorporationWindow/Members/FindMemberInRole/FindMemberInRole'))
コード例 #3
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     leftCont = uicls.Container(name='leftCont', parent=self, align=uiconst.TOLEFT_PROP, width=SIDE_WIDTH)
     self.friendIcon = uicls.LogoIcon(name='friendIcon', parent=leftCont, align=uiconst.CENTER, width=32, height=32, top=-20, ignoreSize=True)
     rightCont = uicls.Container(name='leftCont', parent=self, align=uiconst.TORIGHT_PROP, width=SIDE_WIDTH)
     self.foeIcon = uicls.LogoIcon(name='foeIcon', parent=rightCont, align=uiconst.CENTER, width=32, height=32, top=20, ignoreSize=True)
     self.topCont = uicls.Container(name='topCont', parent=self, align=uiconst.TOTOP_PROP, height=0.4)
     self.bottomCont = uicls.Container(name='bottomCont', parent=self, align=uiconst.TOBOTTOM_PROP, height=0.4)
     self.centerCont = uicls.Container(name='centerCont', parent=self, bgColor=facwarCommon.COLOR_CENTER_BG, padding=2)
     w, h = self.centerCont.GetAbsoluteSize()
     spWidth = 134 / 16.0 * h
     self.friendBar = uicls.Container(parent=self.centerCont, align=uiconst.TOLEFT_PROP, state=uiconst.UI_NORMAL, bgColor=facwarCommon.COLOR_FRIEND_BAR, clipChildren=True)
     self.friendBarSprite = uicls.Sprite(parent=self.friendBar, state=uiconst.UI_HIDDEN, texturePath='res:/ui/texture/classes/InfluenceBar/influenceBarPositive.png', color=facwarCommon.COLOR_FRIEND_LIGHT, align=uiconst.TOLEFT, width=spWidth)
     self.friendPointer = uicls.Container(name='friendPointer', align=uiconst.TOPLEFT_PROP, parent=self, pos=(0.0, 0.5, 2, 0.2), idx=0)
     uicls.Line(parent=self.friendPointer, align=uiconst.TOLEFT, weight=2, padBottom=2, color=facwarCommon.COLOR_FRIEND_LIGHT)
     self.friendPointerTxt = uicls.EveHeaderLarge(name='friendPointerTxt', parent=self.friendPointer, align=uiconst.CENTERTOP, top=-28)
     uicls.Sprite(name='friendTriangle', parent=self.friendPointer, texturePath='res:/ui/texture/icons/105_32_15.png', color=facwarCommon.COLOR_FRIEND_LIGHT, align=uiconst.CENTERTOP, rotation=pi / 2, width=32, height=32, top=-19)
     self.foeBar = uicls.Container(parent=self.centerCont, align=uiconst.TORIGHT_PROP, state=uiconst.UI_NORMAL, bgColor=facwarCommon.COLOR_FOE_BAR, clipChildren=True)
     self.foeBarSprite = uicls.Sprite(parent=self.foeBar, state=uiconst.UI_HIDDEN, texturePath='res:/ui/texture/classes/InfluenceBar/influenceBarPositive.png', color=facwarCommon.COLOR_FOE_LIGHT, align=uiconst.TORIGHT, width=spWidth)
     self.foePointer = uicls.Container(name='foePointer', align=uiconst.TOPLEFT_PROP, parent=self, pos=(0.0, 0.5, 2, 0.2), idx=0)
     uicls.Line(parent=self.foePointer, align=uiconst.TORIGHT, weight=2, padTop=2, color=facwarCommon.COLOR_FOE_LIGHT)
     self.foePointerTxt = uicls.EveHeaderLarge(name='foePointerTxt', parent=self.foePointer, align=uiconst.CENTERBOTTOM, top=-28)
     uicls.Sprite(name='foeTriangle', parent=self.foePointer, texturePath='res:/ui/texture/icons/105_32_15.png', color=facwarCommon.COLOR_FOE_LIGHT, align=uiconst.CENTERBOTTOM, rotation=-pi / 2, width=32, height=32, top=-19)
     uthread.new(self.FetchValues)
     uthread.new(self.AnimateBars)
コード例 #4
0
 def AddHeader(self):
     self.new = uicls.Container(name='headerField',
                                parent=self.parent,
                                align=uiconst.TOTOP)
     header = uicls.EveLabelSmall(text=self.type.get('text', ''),
                                  parent=self.new,
                                  name='header',
                                  padding=(7, 3, 7, 3),
                                  align=uiconst.TOTOP,
                                  state=uiconst.UI_NORMAL,
                                  bold=True)
     self.new.height = max(self.type.get('height', 17),
                           header.textheight + header.padTop * 2)
     self.refresh.append((self.new, header))
     if not self.type.get('hideLine', False):
         uicls.Line(parent=self.new,
                    align=uiconst.TOTOP,
                    padLeft=-6,
                    padRight=-6,
                    idx=0)
         uicls.Line(parent=self.new,
                    align=uiconst.TOBOTTOM,
                    padLeft=-6,
                    padRight=-6,
                    idx=0)
コード例 #5
0
 def Prepare_Appearance_(self, *args):
     uicls.Line(parent=self.sr.buttonParent,
                color=FRAME_COLOR,
                align=uiconst.TOTOP)
     uicls.Line(parent=self.sr.buttonParent,
                color=FRAME_COLOR,
                align=uiconst.TOBOTTOM)
コード例 #6
0
ファイル: slider.py プロジェクト: R4M80MrX/eve-1
 def DrawIncrement(self):
     if self.increments:
         l, t, w, h = self.parent.GetAbsolute()
         maxX = w - self.width
         uicls.Line(parent=self.parent, align=uiconst.RELATIVE, height=2, width=maxX - 1, left=self.width / 2, top=self.height + 2)
         i = 0
         for each in self.increments[1]:
             height = 5
             if i in (0, len(self.increments[1]) - 1):
                 height = 10
             uicls.Line(parent=self.parent, align=uiconst.RELATIVE, height=height, width=1, left=int(each * maxX) + self.width / 2 - 1, top=self.height - 6)
             i += 1
コード例 #7
0
ファイル: rangeSelector.py プロジェクト: R4M80MrX/eve-1
    def SetIncrements(self, increments):
        self._incrementsParent.Flush()
        maxMarkerSize = 0
        labels = []
        self._increments = []
        if increments:
            last = increments.pop(-1)
            stepSize = 1.0 / len(increments)
            c = uicls.GridContainer(parent=self._incrementsParent, lines=1, columns=len(increments))
            i = 0
            for incrementData in increments:
                label = incrementData[0]
                markerSize = incrementData[1]
                inc = uicls.Container(parent=c, align=uiconst.TOALL)
                if markerSize:
                    maxMarkerSize = max(maxMarkerSize, markerSize)
                    uicls.Line(parent=inc, align=uiconst.TOPLEFT, width=1, height=markerSize)
                    self._increments.append((i * stepSize, incrementData))
                if label:
                    if label.startswith('res:'):
                        s = uicls.Sprite(parent=inc, texturePath=label, width=16, height=16, align=uiconst.CENTER, idx=0, top=-2, color=(1, 1, 1, 0.7))
                        labels.append(s)
                    else:
                        l = uicls.EveLabelSmall(parent=inc, text=label, left=-MAINSIDEMARGIN)
                        if i == 0:
                            l.left = max(-MAINSIDEMARGIN, -l.textwidth / 2)
                        else:
                            l.left = -l.textwidth / 2
                        labels.append(l)
                i += 1

            label = last[0]
            markerSize = last[1]
            inc = uicls.Container(parent=self._incrementsParent, align=uiconst.TORIGHT, width=1, idx=0)
            if markerSize:
                maxMarkerSize = max(maxMarkerSize, markerSize)
                uicls.Line(parent=inc, align=uiconst.TOPLEFT, width=1, height=markerSize)
                self._increments.append((i * stepSize, last))
            if label:
                if label.startswith('res:'):
                    s = uicls.Sprite(parent=inc, texturePath=label, width=16, height=16, align=uiconst.CENTER, idx=0, top=-2, color=(1, 1, 1, 0.7))
                    labels.append(s)
                else:
                    l = uicls.EveLabelSmall(parent=inc, text=label, align=uiconst.TOPRIGHT)
                    l.left = max(-MAINSIDEMARGIN, -l.textwidth / 2)
                    labels.append(l)
        maxHeight = 0
        for l in labels:
            l.top += maxMarkerSize
            maxHeight = max(l.top + l.height, maxHeight)

        self._incrementsParent.height = maxHeight
        self.height = sum([ each.height + each.padTop + each.padBottom for each in self.children if each.align == uiconst.TOTOP ])
コード例 #8
0
 def DrawChanges(self):
     l = uicls.Line(parent=self.sr.worldOverview,
                    align=uiconst.TOTOP,
                    color=(0.0, 0.0, 0.0, 0.25))
     l = uicls.Line(parent=self.sr.worldOverview, align=uiconst.TOTOP)
     changeContainer = uicls.Container(name='changeContainer',
                                       parent=self.sr.worldOverview,
                                       align=uiconst.TOALL,
                                       pos=(0, 0, 0, 0),
                                       padding=(const.defaultPadding, 6,
                                                const.defaultPadding, 6))
     self.sr.changesScroll = uicls.Scroll(parent=changeContainer)
コード例 #9
0
ファイル: browserutil.py プロジェクト: R4M80MrX/eve-1
 def Startup_textarea(self, wnd, attrs):
     if getattr(attrs, 'maxlength', None):
         wnd.SetMaxLength(attrs.maxlength)
     if hasattr(attrs, 'readonly'):
         wnd.ReadOnly()
     if attrs.value:
         wnd.SetValue(attrs.value)
     color = self.browser.attrStack[-1]['color']
     uicls.Line(parent=wnd, align=uiconst.TOTOP, color=color, weight=1)
     uicls.Line(parent=wnd, align=uiconst.TOBOTTOM, color=color, weight=1)
     uicls.Line(parent=wnd, align=uiconst.TOLEFT, color=color, weight=1)
     uicls.Line(parent=wnd, align=uiconst.TORIGHT, color=color, weight=1)
コード例 #10
0
 def ConstructLayout(self):
     if eve.session.corprole & const.corpRoleDirector > 0:
         self.SetHeaderIcon()
         hicon = self.sr.headerIcon
         hicon.GetMenu = self.OpenMenu
         hicon.expandOnLeft = 1
         hicon.hint = localization.GetByLabel(
             'UI/InfrastructureHub/HubSettings')
         hicon.name = 'ihHeaderIcon'
         self.sr.presetMenu = hicon
     self.sr.upgradesTab = uicls.Container(name='upgradesTab',
                                           parent=self.sr.main,
                                           align=uiconst.TOALL,
                                           pos=(0, 0, 0, 0),
                                           padding=(0, 0, 0, 0))
     self.sr.index = uicls.Container(name='hubs',
                                     parent=self.sr.upgradesTab,
                                     align=uiconst.TOLEFT,
                                     pos=(0, 0, 155, 0),
                                     padding=(0, 0, 2, 0))
     self.sr.index.state = uiconst.UI_NORMAL
     self.sr.upgrades = uicls.Container(name='upgrades',
                                        parent=self.sr.upgradesTab,
                                        align=uiconst.TOALL,
                                        pos=(0, 0, 0, 0),
                                        padding=(0, 0, 0, 0))
     self.sr.upgrades.state = uiconst.UI_NORMAL
     uicls.Line(parent=self.sr.upgrades, align=uiconst.TOLEFT)
     uicls.Line(parent=self.sr.index, align=uiconst.TORIGHT)
     self.sr.infoContainer = uicls.Container(name='infoContainer',
                                             parent=self.sr.upgrades,
                                             align=uiconst.TOBOTTOM,
                                             pos=(0, 0, 0, 90),
                                             padding=(0, 5, 0, 0))
     self.sr.upgradesContainer = uicls.Container(name='upgradesContainer',
                                                 parent=self.sr.upgrades,
                                                 align=uiconst.TOALL,
                                                 pos=(0, 0, 0, 0),
                                                 padding=(0, 0, 0, 0))
     self.sr.hubs = uicls.Container(name='hubs',
                                    parent=self.sr.index,
                                    align=uiconst.TOALL,
                                    pos=(0, 0, 0, 0),
                                    padding=(0, 0, 0, 0))
     self.DrawUpgrades()
     self.DrawIndex(localization.GetByLabel('UI/Sovereignty/Strategic'),
                    const.attributeDevIndexSovereignty)
     self.DrawIndex(localization.GetByLabel('UI/Sovereignty/Military'),
                    const.attributeDevIndexMilitary)
     self.DrawIndex(localization.GetByLabel('UI/Sovereignty/Industry'),
                    const.attributeDevIndexIndustrial)
     self.DrawInfo()
コード例 #11
0
 def ExpandMenu(self, *args):
     if self.destroyed:
         return
     if self.IsExpanded():
         self.CloseMenu()
         return
     background = self.AccessBackground()
     icon = self.AccessIcon()
     l, t, w, h = background.GetAbsolute()
     buttonCopy = uicls.Container(parent=uicore.layer.utilmenu,
                                  align=uiconst.TOPLEFT,
                                  pos=(l, t, self.GetFullWidth(), h),
                                  state=uiconst.UI_NORMAL,
                                  idx=0)
     buttonCopy.OnMouseDown = self.CloseMenu
     if self._label is not None:
         label = uicls.EveLabelMedium(parent=buttonCopy,
                                      text=self._label.text,
                                      align=self._label.align,
                                      bold=True,
                                      left=self._label.left)
     uicls.Sprite(parent=buttonCopy,
                  texturePath=self.closeTexturePath,
                  state=uiconst.UI_DISABLED,
                  align=icon.align,
                  width=icon.width,
                  height=icon.height,
                  left=icon.left)
     topOrBottomLine = uicls.Line(parent=buttonCopy,
                                  color=FRAMECOLOR,
                                  align=uiconst.TOTOP)
     if self.menuAlign in (uiconst.BOTTOMLEFT, uiconst.BOTTOMRIGHT):
         topOrBottomLine.align = uiconst.TOBOTTOM
     uicls.Line(parent=buttonCopy, color=FRAMECOLOR, align=uiconst.TOLEFT)
     uicls.Line(parent=buttonCopy, color=FRAMECOLOR, align=uiconst.TORIGHT)
     uicls.Fill(bgParent=buttonCopy, color=BGCOLOR)
     menuParent = uicls.ExpandedUtilMenu(parent=uicore.layer.utilmenu,
                                         controller=self,
                                         GetUtilMenu=self._getMenuFunction,
                                         minWidth=self.GetFullWidth() + 16,
                                         idx=1,
                                         menuAlign=self.menuAlign)
     self._menu = weakref.ref(menuParent)
     self._menuButton = weakref.ref(buttonCopy)
     uicore.animations.MorphScalar(buttonCopy,
                                   'opacity',
                                   startVal=0.5,
                                   endVal=1.0,
                                   duration=0.2)
     uthread.new(uicore.registry.SetFocus, menuParent)
コード例 #12
0
ファイル: navigation.py プロジェクト: R4M80MrX/eve-1
 def ApplyAttributes(self, attributes):
     uicls.LayerCore.ApplyAttributes(self, attributes)
     self.looking = 1
     self.locked = 0
     self.zoomlooking = 0
     self.fovready = 0
     self.resetfov = 0
     self.prefov = None
     self.align = uiconst.TOALL
     self.notdbl = 0
     self.sr.tcursor = None
     self.sr.clicktime = None
     self.hoverbracket = None
     self.blockDisable = 0
     self.movingCursor = None
     self.sr.spacemenu = None
     self.downpos = None
     self.locks = {}
     self._isPicked = False
     self.dungeonEditorSelectionEnabled = False
     sceneManager = sm.GetService('sceneManager')
     self.maxFov = sceneManager.maxFov
     self.minFov = sceneManager.minFov
     self.sr.tcursor = uicls.Container(name='targetingcursor',
                                       parent=self,
                                       align=uiconst.ABSOLUTE,
                                       width=1,
                                       height=1,
                                       state=uiconst.UI_HIDDEN)
     uicls.Line(parent=self.sr.tcursor,
                align=uiconst.RELATIVE,
                left=10,
                width=3000,
                height=1)
     uicls.Line(parent=self.sr.tcursor,
                align=uiconst.TOPRIGHT,
                left=10,
                width=3000,
                height=1)
     uicls.Line(parent=self.sr.tcursor,
                align=uiconst.RELATIVE,
                top=10,
                width=1,
                height=3000)
     uicls.Line(parent=self.sr.tcursor,
                align=uiconst.BOTTOMLEFT,
                top=10,
                width=1,
                height=3000)
コード例 #13
0
 def DrawInfrastructureHubs(self):
     self.sr.infrastructurehubs = uicls.Container(
         parent=self.sr.regionalOverview,
         align=uiconst.TOTOP,
         state=uiconst.UI_NORMAL,
         height=24)
     infrastructurehubs = self.sr.infrastructurehubs
     textContainer = uicls.Container(name='textContainer',
                                     parent=infrastructurehubs,
                                     align=uiconst.TOALL,
                                     pos=(0, 0, 0, 0),
                                     padding=(0, 0, 0, 0))
     leftContainer = uicls.Container(name='leftContainer',
                                     parent=textContainer,
                                     align=uiconst.TOALL,
                                     pos=(0, 0, 0, 0),
                                     padding=(3, 0, 0, 0))
     rightContainer = uicls.Container(name='rightContainer',
                                      parent=textContainer,
                                      align=uiconst.TORIGHT,
                                      pos=(0, 0, 15, 0),
                                      padding=(0, 0, 3, 0))
     t = uicls.EveLabelMedium(
         text=localization.GetByLabel('UI/Sovereignty/DevelopmentIndices'),
         parent=leftContainer,
         state=uiconst.UI_DISABLED,
         align=uiconst.CENTERLEFT,
         left=3,
         bold=True)
     rightContainer.width = t.width
     infrastructurehubs.height = max(20, t.textheight + 6)
     l = uicls.Line(parent=infrastructurehubs,
                    align=uiconst.TOTOP,
                    color=(0.0, 0.0, 0.0, 0.25))
     l = uicls.Line(parent=infrastructurehubs, align=uiconst.TOTOP)
     l = uicls.Line(parent=infrastructurehubs, align=uiconst.TOBOTTOM)
     l = uicls.Line(parent=infrastructurehubs,
                    align=uiconst.TOBOTTOM,
                    color=(0.0, 0.0, 0.0, 0.25))
     infrastructurehubsResults = uicls.Container(
         name='infrastructurehubsResults',
         parent=self.sr.regionalOverview,
         align=uiconst.TOALL,
         state=uiconst.UI_PICKCHILDREN,
         pos=(0, 0, 0, 0),
         padding=(const.defaultPadding, 6, const.defaultPadding, 6))
     self.sr.infrastructurehubsResults = infrastructurehubsResults
     self.sr.infrastructurehubsScroll = uicls.Scroll(
         parent=infrastructurehubsResults)
コード例 #14
0
 def DrawStationsOutposts(self):
     self.sr.stationsoutposts = uicls.Container(
         parent=self.sr.regionalOverview,
         align=uiconst.TOTOP,
         state=uiconst.UI_NORMAL,
         height=24)
     stationsoutposts = self.sr.stationsoutposts
     textContainer = uicls.Container(name='textContainer',
                                     parent=stationsoutposts,
                                     align=uiconst.TOALL,
                                     pos=(0, 0, 0, 0),
                                     padding=(0, 0, 0, 0))
     leftContainer = uicls.Container(name='leftContainer',
                                     parent=textContainer,
                                     align=uiconst.TOALL,
                                     pos=(0, 0, 0, 0),
                                     padding=(3, 0, 0, 0))
     rightContainer = uicls.Container(name='rightContainer',
                                      parent=textContainer,
                                      align=uiconst.TORIGHT,
                                      pos=(0, 0, 15, 0),
                                      padding=(0, 0, 3, 0))
     t = uicls.EveLabelMedium(
         text=localization.GetByLabel('UI/Overview/Overview'),
         parent=leftContainer,
         state=uiconst.UI_DISABLED,
         left=3,
         align=uiconst.CENTERLEFT,
         bold=True)
     rightContainer.width = t.width
     stationsoutposts.height = max(20, t.textheight + 6)
     l = uicls.Line(parent=stationsoutposts,
                    align=uiconst.TOTOP,
                    color=(0.0, 0.0, 0.0, 0.25))
     l = uicls.Line(parent=stationsoutposts, align=uiconst.TOTOP)
     l = uicls.Line(parent=stationsoutposts, align=uiconst.TOBOTTOM)
     l = uicls.Line(parent=stationsoutposts,
                    align=uiconst.TOBOTTOM,
                    color=(0.0, 0.0, 0.0, 0.25))
     stationsoutpostsResults = uicls.Container(
         name='stationsoutpostsResults',
         parent=self.sr.regionalOverview,
         align=uiconst.TOTOP,
         state=uiconst.UI_PICKCHILDREN,
         pos=(0, 0, 0, 100),
         padding=(const.defaultPadding, 6, const.defaultPadding, 6))
     self.sr.stationsoutpostsResults = stationsoutpostsResults
     self.sr.stationOutpostsScroll = uicls.Scroll(
         parent=stationsoutpostsResults)
コード例 #15
0
 def ConstructTopLeftCont(self):
     uicls.Line(parent=self.topLeftCont, align=uiconst.TORIGHT)
     uicls.Label(parent=self.topLeftCont,
                 text='Select clock:',
                 align=uiconst.TOTOP)
     uicls.Checkbox(parent=self.topLeftCont,
                    text='Actual',
                    groupname='clockGroup',
                    align=uiconst.TOTOP,
                    checked=not blue.os.useSmoothedDeltaT,
                    callback=self.OnClockRadioButtonsChanged,
                    retval=False)
     uicls.Checkbox(parent=self.topLeftCont,
                    text='Smoothed',
                    groupname='clockGroup',
                    align=uiconst.TOTOP,
                    checked=blue.os.useSmoothedDeltaT,
                    callback=self.OnClockRadioButtonsChanged,
                    retval=True)
     uicls.Label(parent=self.topLeftCont,
                 align=uiconst.TOTOP,
                 text='Time Scaler:',
                 pos=(0, 0, 0, 0))
     uicls.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))
コード例 #16
0
 def ApplyAttributes(self, attributes):
     uicls.SE_BaseClassCore.ApplyAttributes(self, attributes)
     uicls.Line(parent=self,
                align=uiconst.TOBOTTOM,
                color=(1.0, 1.0, 1.0, 0.125))
     self.container = uicls.Container(name='container', parent=self)
     self.system = uicls.Container(name='solarsystem', parent=self)
     self.upgrades = uicls.Container(name='upgrades',
                                     parent=self,
                                     align=uiconst.TORIGHT,
                                     pos=(0, 0, 280, 10),
                                     padding=(0, 3, 8, 4))
     self.sr.selection = uicls.Fill(bgParent=self,
                                    padTop=1,
                                    padBottom=1,
                                    color=(1.0, 1.0, 1.0, 0.125),
                                    state=uiconst.UI_HIDDEN)
     self.location = uicls.EveLabelMedium(text='',
                                          parent=self.system,
                                          left=6,
                                          align=uiconst.TOPLEFT,
                                          state=uiconst.UI_DISABLED,
                                          idx=0,
                                          maxLines=1)
     self.upgradeBars = []
     uicls.Frame(bgParent=self.upgrades, color=COLOR)
     barCont = uicls.Container(parent=self.upgrades, padding=1)
     for i in xrange(5):
         f = uicls.Fill(parent=barCont,
                        name='upgrades%d' % i,
                        align=uiconst.TOLEFT_PROP,
                        color=COLOR,
                        width=0.2,
                        padding=1)
         self.upgradeBars.append(f)
コード例 #17
0
    def Setup(self, menu, parent = None, minwidth = None):
        log.LogInfo('Menu.Setup', id(self))
        entries = menu.GetEntries()
        wasLine = 0
        idNo = 0
        for i, entry in enumerate(entries):
            if entry is None:
                if not len(self.sr.entries.children) or i == len(entries) - 1 or wasLine:
                    continue
                item = uicls.Line(align=uiconst.TOTOP, parent=self.sr.entries)
                wasLine = 1
            else:
                size = settings.user.ui.Get('cmenufontsize', 10)
                menuEntryViewClass = entry.menuClass or uicls.MenuEntryView
                item = menuEntryViewClass(name='entry', align=uiconst.TOTOP, state=uiconst.UI_NORMAL, parent=self.sr.entries)
                item.Setup(entry, size, menu, idNo)
                idNo += 1
                wasLine = 0

        self.height = sum([ each.height for each in self.sr.entries.children ]) + self.sr.entries.top + self.sr.entries.height
        if len(self.sr.entries.children):
            self.width = max(max([ each.width for each in self.sr.entries.children ]) + 8, minwidth or 0) + self.sr.entries.left + self.sr.entries.width
        else:
            self.width = 100
        self.menu = menu
        log.LogInfo('Menu.Setup Completed', id(self))
コード例 #18
0
    def DrawKillsByGroup(self):
        self.killGroupsTextCont.Flush()
        self.killGroupsDataCont.Flush()
        self.killGroupsLegendCont.Flush()
        top = 2
        self.groupLabels = []
        for shipGroup in self.shipGroupList:
            killsByShipGroup = self.GetKillsByGroup(shipGroup)
            labelText = self.GetShipGroupName(shipGroup)
            groupLabel = uicls.EveLabelSmall(text=localization.GetByLabel(labelText), parent=self.killGroupsTextCont, top=top, left=const.defaultPadding, state=uiconst.UI_NORMAL, align=uiconst.TOPRIGHT)
            groupLabel.OnClick = (self.GetBarAndClick, shipGroup)
            if killsByShipGroup.attackerKills == 0 and killsByShipGroup.defenderKills == 0:
                groupLabel.SetAlpha(0.5)
            top += 18
            self.groupLabels.append(groupLabel)
            self.CreateBarContainer(shipGroup, killsByShipGroup.attackerKills, killsByShipGroup.defenderKills, killsByShipGroup.attackerKillsIsk, killsByShipGroup.defenderKillsIsk)

        w, h = self.killGroupsDataCont.GetAbsoluteSize()
        l = 0.1
        max = 1.0
        legendmin = uicls.EveLabelSmall(parent=self.killGroupsLegendCont, text=localization.GetByLabel('UI/Corporations/Wars/Legend', legend=util.FmtISK(0)), align=uiconst.TOPLEFT)
        legendmax = uicls.EveLabelSmall(parent=self.killGroupsLegendCont, text=localization.GetByLabel('UI/Corporations/Wars/Legend', legend=util.FmtISK(self.maxKills)), align=uiconst.TOPRIGHT)
        while l <= max:
            lineCont = uicls.Container(parent=self.killGroupsDataCont, align=uiconst.TOPLEFT_PROP, width=l, height=h)
            uicls.Line(parent=lineCont, align=uiconst.TORIGHT, color=(1.0, 1.0, 1.0, 0.1))
            l += 0.1

        self.displayGroup = settings.user.ui.Get('killGroupDisplayed', const.GROUP_CAPSULES)
        maxWidth = self.GetGroupLabelWidth()
        self.killGroupsTextCont.width = maxWidth + 10
        self.GetBarAndClick(self.displayGroup)
        self.graphLoaded = True
コード例 #19
0
 def ApplyAttributes(self, attributes):
     uicls.SE_BaseClassCore.ApplyAttributes(self, attributes)
     uicls.Line(parent=self,
                align=uiconst.TOBOTTOM,
                color=(1.0, 1.0, 1.0, 0.125))
     self.container = uicls.Container(name='container', parent=self)
     self.upgrades = uicls.Container(name='upgrades',
                                     parent=self,
                                     align=uiconst.TORIGHT,
                                     pos=(0, 0, 280, 0),
                                     padRight=8)
     self.system = uicls.Container(name='solarsystem',
                                   parent=self,
                                   padLeft=4,
                                   padRight=4,
                                   clipChildren=True)
     self.systemHeader = uicls.EveLabelSmall(text='',
                                             parent=self.system,
                                             left=0,
                                             top=4,
                                             align=uiconst.TOPLEFT,
                                             state=uiconst.UI_DISABLED,
                                             idx=0,
                                             maxLines=1)
     self.upgradesHeader = uicls.EveLabelSmall(text='',
                                               parent=self.upgrades,
                                               left=0,
                                               top=4,
                                               align=uiconst.TOPLEFT,
                                               state=uiconst.UI_DISABLED,
                                               idx=0,
                                               maxLines=1)
コード例 #20
0
ファイル: agentDialogueWindow.py プロジェクト: R4M80MrX/eve-1
 def SetDoublePaneView(self, briefingHtml = None, objectiveHtml = None):
     if self.viewMode == 'DoublePaneView':
         if briefingHtml:
             self.LoadHTML(briefingHtml, 'briefingBrowser')
         if objectiveHtml:
             self.LoadHTML(objectiveHtml, 'objectiveBrowser')
         if self.buttonCache:
             uix.Flush(self.sr.rightPaneBottom)
             self._InsertButtons(self.buttonCache, self.sr.rightPaneBottom)
         return
     if briefingHtml:
         self.SetHTML(briefingHtml, 'briefingBrowser')
     if objectiveHtml:
         self.SetHTML(objectiveHtml, 'objectiveBrowser')
     uix.Flush(self.sr.main)
     self.sr.leftPane = uicls.Container(name='leftPane', parent=self.sr.main, align=uiconst.TOLEFT, height=self.paneHeight, width=self.paneWidth, left=0, top=0)
     uicls.Container(name='bottomBorder', parent=self.sr.leftPane, align=uiconst.TOBOTTOM, height=1)
     self.sr.rightPane = uicls.Container(name='rightPane', parent=self.sr.main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     uicls.Line(parent=self.sr.rightPane, align=uiconst.TOLEFT)
     self.sr.rightPaneBottom = uicls.Container(name='rightPaneBottom', parent=self.sr.rightPane, align=uiconst.TOBOTTOM, height=self.rightPaneBottomHeight, width=self.mainContainerWidth, left=0, top=0)
     self.sr.rightPaneTop = uicls.Container(name='rightPaneTop', parent=self.sr.rightPane, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     self.SetMinSize([self.windowWidth, self.windowHeight])
     self.LockWidth(self.windowWidth)
     self.viewMode = 'DoublePaneView'
     if self.buttonCache:
         self._InsertButtons(self.buttonCache, self.sr.rightPaneBottom)
     self.InitializeBrowsers()
     for browserName in self.htmlCache:
         self.LoadHTML(self.htmlCache[browserName], browserName)
コード例 #21
0
    def ToggleLiteWindowAppearance(self, wnd, forceLiteState = None):
        if forceLiteState is not None:
            wnd._SetPinned(forceLiteState)
        state = uiconst.UI_DISABLED
        for each in wnd.children[:]:
            if each.name.startswith('_lite'):
                each.Close()

        if wnd.IsPinned():
            for align in (uiconst.TOLEFT,
             uiconst.TOTOP,
             uiconst.TORIGHT,
             uiconst.TOBOTTOM):
                uicls.Line(parent=wnd, align=align, color=(0.0, 0.0, 0.0, 0.3), idx=0, name='_liteline')

            uicls.Frame(parent=wnd, color=(1.0, 1.0, 1.0, 0.2), name='_liteframe')
            uicls.Fill(parent=wnd, color=(0.0, 0.0, 0.0, 0.3), name='_litefill')
            state = uiconst.UI_HIDDEN
        for each in wnd.children:
            for _each in wnd.sr.underlay.background:
                if _each.name in ('base', 'color', 'shadow', 'solidBackground'):
                    _each.state = state

        m = wnd.sr.maincontainer
        if state == uiconst.UI_DISABLED:
            m.left = m.top = m.width = m.height = 1
        else:
            m.left = m.top = m.width = m.height = 0
        self.ChangeControlAppearance(wnd)
コード例 #22
0
 def _ConstructBaseLayout(self):
     self.charCont = uicls.ContainerAutoSize(parent=self.mainCont,
                                             name='charCont',
                                             align=uiconst.TOTOP)
     self.clockCont = neocom.WrapperButton(parent=self.mainCont,
                                           name='clockCont',
                                           align=uiconst.TOBOTTOM,
                                           height=20,
                                           cmdName='OpenCalendar')
     self.fixedButtonCont = uicls.ContainerAutoSize(parent=self.mainCont,
                                                    name='fixedButtonCont',
                                                    align=uiconst.TOBOTTOM)
     uicls.Fill(bgParent=self.fixedButtonCont,
                color=self.COLOR_CORNERFILL,
                blendMode=trinity.TR2_SBM_ADD)
     self.overflowBtn = neocom.OverflowButton(parent=self.mainCont,
                                              align=uiconst.TOBOTTOM,
                                              state=uiconst.UI_HIDDEN,
                                              height=20)
     self.buttonCont = uicls.Container(parent=self.mainCont,
                                       name='buttonCont',
                                       align=uiconst.TOALL)
     self.dropIndicatorLine = uicls.Line(parent=self.mainCont,
                                         name='dropIndicatorLine',
                                         align=uiconst.TOPLEFT,
                                         color=util.Color.GetGrayRGBA(
                                             0.7, 0.3),
                                         pos=(0, 0, 0, 1))
コード例 #23
0
 def ApplyAttributes(self, attributes):
     uicls.ContainerAutoSize.ApplyAttributes(self, attributes)
     self.infoPanelsByTypeID = {}
     self.infoPanelButtonsByTypeID = {}
     self.isDraggingButton = False
     self.topCont = uicls.Container(name='topCont',
                                    parent=self,
                                    align=uiconst.TOTOP,
                                    height=self.ICONSIZE,
                                    padding=(infoPanel.LEFTPAD, 0, 0, 5))
     self.dropIndicatorLine = uicls.Line(name='dropIndicatorLine',
                                         parent=self.topCont,
                                         align=uiconst.TOLEFT_NOPUSH,
                                         state=uiconst.UI_HIDDEN,
                                         color=util.Color.GetGrayRGBA(
                                             1.0, 0.6),
                                         padding=(0, 2, 0, 2))
     self.iconCont = uicls.ContainerAutoSize(name='iconCont',
                                             parent=self.topCont,
                                             state=uiconst.UI_NORMAL,
                                             align=uiconst.TOLEFT)
     self.mainCont = uicls.ContainerAutoSize(name='mainCont',
                                             parent=self,
                                             align=uiconst.TOTOP)
     self.Reconstruct()
コード例 #24
0
 def GetHistoryMenuEntry(self, displayText, text, menuSub, mp, info=None):
     ep = uicls.Container(name='entryParent',
                          parent=menuSub,
                          clipChildren=1,
                          pos=(0, 0, 0, 16),
                          align=uiconst.TOTOP,
                          state=uiconst.UI_NORMAL)
     ep.OnMouseEnter = (self.HEMouseEnter, ep)
     ep.OnMouseDown = (self.HEMouseDown, ep)
     ep.OnMouseUp = (self.HEMouseUp, ep)
     uicls.Line(parent=ep, align=uiconst.TOBOTTOM)
     t = uicls.Label(text=displayText,
                     parent=ep,
                     left=6,
                     align=uiconst.CENTERLEFT,
                     state=uiconst.UI_DISABLED)
     ep.height = t.textheight + 4
     ep.sr.hilite = uicls.Fill(parent=ep,
                               color=(1.0, 1.0, 1.0, 0.25),
                               pos=(1, 1, 1, 1),
                               state=uiconst.UI_HIDDEN)
     ep.selected = 0
     ep.sr.menu = mp
     ep.string = text
     mp.height += ep.height
     if self.dynamicHistoryWidth:
         mp.width = max(mp.width, t.width + 12)
     ep.info = info
コード例 #25
0
ファイル: bargraph.py プロジェクト: R4M80MrX/eve-1
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     self.barUpdateDelayMs = attributes.get('barUpdateDelayMs', self.default_barUpdateDelayMs)
     backgroundColor = attributes.get('backgroundColor', self.default_backgroundColor)
     timeIndicatorColor = attributes.get('timeIndicatorColor', self.default_timeIndicatorColor)
     self.barHintFunc = attributes.get('barHintFunc', None)
     self.bars = []
     self.busy = None
     self.queuedValues = None
     self.numBars = None
     self.setValuesThread = None
     self.timeIndicatorValue = 0.0
     self.maxValue = None
     self.xLabels = None
     self.timeIndicatorThread = None
     self.barWidth = None
     XAXISHEIGHT = 15
     YAXISWIDTH = 40
     self.yAxisCont = uicls.Container(parent=self, name='yAxisCont', align=uiconst.TOLEFT, width=YAXISWIDTH, padBottom=XAXISHEIGHT + 1)
     self.xAxisCont = uicls.Container(parent=self, name='xAxisCont', align=uiconst.TOBOTTOM, height=XAXISHEIGHT)
     self.graphCont = uicls.Container(parent=self, name='graphCont', align=uiconst.TOALL)
     self.timeIndicator = uicls.Line(parent=self.graphCont, name='timeIndicator', state=uiconst.UI_HIDDEN, align=uiconst.TOPLEFT, color=timeIndicatorColor, padding=(0, 1, 0, 1), width=1)
     self.backgroundCont = uicls.Container(parent=self, name='backgroundCont', align=uiconst.TOALL, padding=(1, 2, 1, 1), clipChildren=True)
     uicls.Frame(parent=self, color=COLOR_FRAME)
     uicls.Sprite(parent=self.backgroundCont, name='backgroundStripes', align=uiconst.TOTOP, height=500, texturePath='res:/UI/Texture/Bargraph/background_stripes.dds', ignoreSize=True, color=backgroundColor)
     self.barCont = uicls.Container(parent=self.graphCont, name='barCont', align=uiconst.TOALL, padding=(2, 2, 1, 1), clipChildren=True)
コード例 #26
0
ファイル: bargraph.py プロジェクト: R4M80MrX/eve-1
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     value = attributes.Get('value')
     text = attributes.Get('text', '%s' % value)
     l, t, w, h = self.parent.GetAbsolute()
     LabelText(parent=self, text=text, align=self.align, top=5)
     uicls.Line(parent=self, color=COLOR_FRAME, align=self.align, width=1, height=4)
コード例 #27
0
ファイル: edit_components.py プロジェクト: R4M80MrX/eve-1
    def Load(self):
        if not self.loaded:
            i = 0
            for each in ('tb', 'bb', 'lb', 'rb'):
                if self.data.attrs.Get(each + 'style', None) in (None, 1, 2):
                    style = self.data.attrs.Get(each + 'style', 1)
                    color = self.data.attrs.Get(each + 'color', None)
                    weight = self.data.attrs.Get(each + 'width', None)
                    align = [
                        uiconst.TOTOP, uiconst.TOBOTTOM, uiconst.TOLEFT,
                        uiconst.TORIGHT
                    ][i]
                    uicls.Line(parent=self,
                               align=align,
                               weight=weight,
                               color=color)
                i += 1

            color = self.data.attrs.Get('bgcolor', None)
            if color:
                uicls.Fill(parent=self, state=uiconst.UI_DISABLED, color=color)
            self.state = uiconst.UI_NORMAL
            self.width = (self.data.attrs.width
                          or 1) + (int(self.data.attrs.border or 0) + 0)
            self.height = (self.data.attrs.height
                           or 1) + (int(self.data.attrs.border or 0) + 0)
            self.loaded = 1
コード例 #28
0
 def Startup(self, *etc):
     uicls.Line(parent=self,
                align=uiconst.TOBOTTOM,
                color=(1.0, 1.0, 1.0, 0.125))
     self.sr.label = uicls.EveLabelMedium(text='',
                                          parent=self,
                                          left=6,
                                          align=uiconst.CENTERLEFT,
                                          state=uiconst.UI_DISABLED,
                                          idx=0,
                                          maxLines=1)
     self.icon = uicls.Container(name='icon',
                                 parent=self,
                                 align=uiconst.TOPLEFT,
                                 padding=(0, 0, 0, 0),
                                 pos=(0, 0, 14, 14),
                                 state=uiconst.UI_DISABLED)
     self.sr.selection = uicls.Fill(parent=self,
                                    padTop=1,
                                    padBottom=1,
                                    color=(1.0, 1.0, 1.0, 0.125),
                                    state=uiconst.UI_HIDDEN)
     self.sr.loss = uicls.Fill(parent=self,
                               padTop=1,
                               padBottom=1,
                               color=(1.0, 0.0, 0.0, 0.25))
コード例 #29
0
 def Prepare_Appearance_(self):
     self.subpar = uicls.Container(parent=self,
                                   name='btns',
                                   state=uiconst.UI_PICKCHILDREN,
                                   align=self.subalign)
     if self.line:
         line2 = uicls.Line(parent=self,
                            name='black',
                            state=uiconst.UI_DISABLED,
                            color=(0.0, 0.0, 0.0, 0.15),
                            align=uiconst.TOTOP,
                            padTop=-1)
         line1 = uicls.Line(parent=self,
                            name='white',
                            color=(1.0, 1.0, 1.0, 0.25),
                            align=uiconst.TOTOP)
コード例 #30
0
 def SetupService(self, wnd, servicename):
     uix.Flush(wnd.sr.svcparent)
     svc = None
     topheight = 128
     btmheight = 0
     icon = 'ui_9_64_14'
     sz = 128
     top = -16
     icon = uicls.Icon(icon=icon, parent=wnd.sr.svcparent, left=0, top=top, size=sz, idx=0)
     iconpar = uicls.Container(name='iconpar', parent=wnd.sr.svcparent, align=uiconst.TOTOP, height=96, clipChildren=1, state=uiconst.UI_PICKCHILDREN)
     bigicon = icon.CopyTo()
     bigicon.width = bigicon.height = sz * 2
     bigicon.top = -64
     bigicon.color.a = 0.1
     iconpar.children.append(bigicon)
     closeX = uicls.Icon(icon='ui_38_16_220')
     closeX.align = uiconst.TOPRIGHT
     closeX.left = closeX.top = 2
     closeX.OnClick = self.CloseSvc
     iconpar.children.append(closeX)
     line = uicls.Line(parent=iconpar, align=uiconst.TOPRIGHT, height=1, left=2, top=16, width=18)
     icon.state = uiconst.UI_DISABLED
     wnd.sr.caption.text = self.GetServiceDisplayName(servicename)
     wnd.sr.caption.state = uiconst.UI_DISABLED
     return (svc, 'service')