Ejemplo n.º 1
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     w, h = (450, 230)
     self.HideMainIcon()
     self.SetTopparentHeight(0)
     self.SetMinSize([w, h])
     self.SetHeight(h)
     self.SetCaption('Video Player')
     margin = const.defaultPadding
     self.sr.innermain = uiprimitives.Container(name='inner', left=margin, top=margin, parent=self.sr.main)
     self.sr.bottomframe = uiprimitives.Container(name='bottom', align=uiconst.TOBOTTOM, parent=self.sr.innermain, height=BTNSIZE, left=margin, top=margin, clipChildren=1)
     self.sr.rightframe = uiprimitives.Container(name='right', align=uiconst.TORIGHT, parent=self.sr.innermain, width=150, left=margin, top=margin, clipChildren=1)
     self.sr.movieCont = uiprimitives.Container(name='movieCont', align=uiconst.TOALL, parent=self.sr.innermain, pos=(margin,
      margin,
      margin,
      margin))
     uicontrols.Frame(parent=self.sr.innermain, color=(1.0, 1.0, 1.0, 0.2), idx=0)
     uicontrols.Frame(parent=self.sr.movieCont, color=(1.0, 1.0, 1.0, 0.2), idx=0)
     self.videoDir = blue.paths.ResolvePath(u'res:/') + 'video'
     self.node = None
     self.playing = False
     self.movieWidth = ASPECT_X
     self.movieHeight = ASPECT_Y
     self.InitButtons()
     self.InitScroll()
Ejemplo n.º 2
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     w, h = (200, 300)
     self.HideMainIcon()
     self.SetTopparentHeight(0)
     self.SetMinSize([w, h])
     self.SetHeight(h)
     self.SetCaption('Sound Player')
     margin = const.defaultPadding
     self.sr.innermain = uiprimitives.Container(name='inner',
                                                left=margin,
                                                top=margin,
                                                parent=self.sr.main,
                                                pos=(0, 0, 0, 0))
     self.sr.bottomframe = uiprimitives.Container(name='bottom',
                                                  align=uiconst.TOBOTTOM,
                                                  parent=self.sr.innermain,
                                                  height=BTNSIZE,
                                                  left=margin,
                                                  top=margin,
                                                  clipChildren=1)
     self.sr.main = uiprimitives.Container(name='main',
                                           align=uiconst.TOALL,
                                           parent=self.sr.innermain,
                                           pos=(margin, margin, margin,
                                                margin))
     uicontrols.Frame(parent=self.sr.innermain,
                      color=(1.0, 1.0, 1.0, 0.2),
                      idx=0)
     uicontrols.Frame(parent=self.sr.main,
                      color=(1.0, 1.0, 1.0, 0.2),
                      idx=0)
     self.node = None
     self.InitButtons()
     self.InitScroll()
Ejemplo n.º 3
0
 def Prepare_(self, text='', contactLevel=None, *args):
     self.isTabStop = 1
     self.state = uiconst.UI_NORMAL
     flag = None
     if contactLevel == const.contactHighStanding:
         flag = state.flagStandingHigh
     elif contactLevel == const.contactGoodStanding:
         flag = state.flagStandingGood
     elif contactLevel == const.contactNeutralStanding:
         flag = state.flagStandingNeutral
     elif contactLevel == const.contactBadStanding:
         flag = state.flagStandingBad
     elif contactLevel == const.contactHorribleStanding:
         flag = state.flagStandingHorrible
     if flag:
         flagContainer = AddAndSetFlagIcon(self,
                                           flag=flag,
                                           state=uiconst.UI_DISABLED,
                                           showHint=False)
         flagContainer.ChangeFlagPos(0, 0, 20, 20)
         flagContainer.ChangeIconPos(0, 0, 15, 15)
         uicontrols.Frame(parent=flagContainer, color=(1.0, 1.0, 1.0, 0.2))
         self.sr.selected = uicontrols.Frame(parent=flagContainer,
                                             color=(1.0, 1.0, 1.0, 0.75),
                                             state=uiconst.UI_DISABLED,
                                             idx=0)
         self.sr.selected.display = False
         self.sr.hilite = uicontrols.Frame(parent=flagContainer,
                                           color=(1.0, 1.0, 1.0, 0.75),
                                           state=uiconst.UI_DISABLED,
                                           idx=0)
         self.sr.hilite.display = False
         self.hint = text
Ejemplo n.º 4
0
def AddHint(hint, where):
    hintobj = uiprimitives.Container(parent=where,
                                     name='hint',
                                     align=uiconst.TOPLEFT,
                                     width=200,
                                     height=16,
                                     idx=0,
                                     state=uiconst.UI_DISABLED)
    hintobj.hinttext = uicontrols.EveHeaderSmall(text=hint,
                                                 parent=hintobj,
                                                 top=4,
                                                 state=uiconst.UI_DISABLED)
    border = uicontrols.Frame(parent=hintobj,
                              frameConst=uiconst.FRAME_BORDER1_CORNER5,
                              state=uiconst.UI_DISABLED,
                              color=(1.0, 1.0, 1.0, 0.25))
    frame = uicontrols.Frame(parent=hintobj,
                             color=(0.0, 0.0, 0.0, 0.75),
                             frameConst=uiconst.FRAME_FILLED_CORNER4,
                             state=uiconst.UI_DISABLED)
    if hintobj.hinttext.textwidth > 200:
        hintobj.hinttext.width = 200
        hintobj.hinttext.text = '<center>' + hint + '</center>'
    hintobj.width = max(56, hintobj.hinttext.textwidth + 16)
    hintobj.height = max(
        16, hintobj.hinttext.textheight + hintobj.hinttext.top * 2)
    hintobj.left = (where.width - hintobj.width) / 2
    hintobj.top = -hintobj.height - 4
    hintobj.hinttext.left = (hintobj.width - hintobj.hinttext.textwidth) / 2
Ejemplo n.º 5
0
 def Prepare_(self):
     self.sr.label = uicontrols.Label(parent=self, state=uiconst.UI_DISABLED, align=uiconst.CENTER, bold=1, uppercase=0, idx=0, fontsize=self.default_fontsize, color=ccConst.COLOR + (TEXT_NORMAL,), letterspace=1)
     self.sr.hilite = uicontrols.Frame(parent=self, name='hilite', state=uiconst.UI_HIDDEN, color=ccConst.COLOR + (0.2,), frameConst=ccConst.FILL_BEVEL)
     self.sr.hilite.padLeft = self.sr.hilite.padTop = self.sr.hilite.padRight = self.sr.hilite.padBottom = 3
     fill = uiprimitives.Fill(parent=self, name='fill', state=uiconst.UI_DISABLED, color=(0.35, 0.35, 0.35, 0.3), padding=(2, 2, 2, 2))
     self.sr.activeframe = uiprimitives.Fill(parent=self, name='activeframe', state=uiconst.UI_HIDDEN, color=ccConst.COLOR + (FILL_SELECTION,), padding=(2, 2, 2, 2))
     hiliteFrame = uicontrols.Frame(name='hiliteFrame', parent=self, frameConst=('ui_105_32_10', 8, -2), color=(1.0, 1.0, 1.0, 0.4))
     shadow = uicontrols.Frame(name='shadow', parent=self, frameConst=ccConst.FRAME_SOFTSHADE)
     shadow.padding = (-9, -6, -9, -11)
Ejemplo n.º 6
0
    def Startup(self, *etc):
        uiprimitives.Line(parent=self,
                          align=uiconst.TOBOTTOM,
                          color=uiconst.ENTRY_LINE_COLOR)
        self.container = uiprimitives.Container(name='container', parent=self)
        self.system = uiprimitives.Container(name='solarsystem', parent=self)
        self.industry = uiprimitives.Container(name='industry',
                                               parent=self,
                                               align=uiconst.TORIGHT,
                                               pos=(0, 0, 88, 10),
                                               padding=(0, 3, 8, 4))
        self.military = uiprimitives.Container(name='military',
                                               parent=self,
                                               align=uiconst.TORIGHT,
                                               pos=(0, 0, 88, 10),
                                               padding=(0, 3, 8, 4))
        self.claimTime = uiprimitives.Container(name='claimTime',
                                                parent=self,
                                                align=uiconst.TORIGHT,
                                                pos=(0, 0, 88, 10),
                                                padding=(0, 3, 8, 4))
        self.location = uicontrols.EveLabelMedium(text='',
                                                  parent=self.system,
                                                  left=6,
                                                  align=uiconst.TOPLEFT,
                                                  state=uiconst.UI_DISABLED,
                                                  idx=0,
                                                  maxLines=1)
        uicontrols.Frame(parent=self.claimTime, color=COLOR)
        self.claimTimeBars = []
        for i in xrange(5):
            f = uiprimitives.Fill(parent=self.claimTime,
                                  name='claimTime%d' % i,
                                  align=uiconst.TOPLEFT,
                                  color=COLOR,
                                  pos=(2 + i * 17, 2, 16, 6))
            self.claimTimeBars.append(f)

        uicontrols.Frame(parent=self.military, color=COLOR)
        self.militaryBars = []
        for i in xrange(5):
            f = uiprimitives.Fill(parent=self.military,
                                  name='military%d' % i,
                                  align=uiconst.TOPLEFT,
                                  color=COLOR,
                                  pos=(2 + i * 17, 2, 16, 6))
            self.militaryBars.append(f)

        uicontrols.Frame(parent=self.industry, color=COLOR)
        self.industryBars = []
        for i in xrange(5):
            f = uiprimitives.Fill(parent=self.industry,
                                  name='industry%d' % i,
                                  align=uiconst.TOPLEFT,
                                  color=COLOR,
                                  pos=(2 + i * 17, 2, 16, 6))
            self.industryBars.append(f)
Ejemplo n.º 7
0
 def Startup(self, hsv=None, *args):
     leftPush = 0
     self.SetHSV(hsv)
     hsv = self.orgcolor.GetHSV()
     colorPanel = ColorPanel(name='ColorPanel',
                             align=uiconst.TOPLEFT,
                             width=255,
                             height=255,
                             parent=self,
                             state=uiconst.UI_NORMAL,
                             clipChildren=1)
     uicontrols.Frame(parent=colorPanel)
     colorPanel.Startup()
     colorPanel.OnChange = self.ColorPanelChange
     colorPanel.SetHSV(hsv)
     self.sr.colorPanel = colorPanel
     leftPush = colorPanel.left + colorPanel.width + const.defaultPadding
     colorSlider = ColorSlider(name='ColorSlider',
                               align=uiconst.TOPLEFT,
                               left=leftPush,
                               height=255,
                               width=36,
                               parent=self,
                               state=uiconst.UI_NORMAL)
     colorSlider.Startup()
     colorSlider.OnSliderChange = self.ColorSliderChange
     colorSlider.SetHSV(hsv)
     self.sr.colorSlider = colorSlider
     leftPush = colorSlider.left + colorSlider.width + const.defaultPadding
     self.sr.colorInfo = uiprimitives.Container(name='colorInfo',
                                                align=uiconst.TOPLEFT,
                                                left=leftPush,
                                                width=56,
                                                height=255,
                                                parent=self)
     colorPreview = ColorPreview(name='colorPreview',
                                 align=uiconst.TOPLEFT,
                                 height=32,
                                 width=self.sr.colorInfo.width,
                                 parent=self.sr.colorInfo)
     uicontrols.Frame(parent=colorPreview)
     colorPreview.Startup()
     colorPreview.SetHSV(hsv)
     self.sr.colorPreview = colorPreview
     import xtriui
     colorControl = xtriui.ColorControl(name='colorControl',
                                        align=uiconst.TOPLEFT,
                                        width=self.sr.colorInfo.width,
                                        top=36,
                                        height=219,
                                        parent=self.sr.colorInfo)
     colorControl.Startup()
     colorControl.OnColorControlChange = self.ColorControlChange
     colorControl.SetHSV(hsv)
     self.sr.colorControl = colorControl
def AddFrameWithFillAndGlow(parent, showFill = True, fillColor = csColors.OTHER_FILL, frameColor = csColors.OTHER_FRAME, glowColor = csColors.FRAME_GLOW_ACTIVE):
    if showFill:
        fill = uiprimitives.Fill(bgParent=parent, color=fillColor)
    else:
        fill = None
    normalFrame = uicontrols.Frame(parent=parent, color=frameColor)
    glowFrameTexturePath = 'res:/UI/Texture/classes/CharacterSelection/glowDotFrame.png'
    glowFrame = uicontrols.Frame(parent=parent, name='glowFrame', color=glowColor, frameConst=(glowFrameTexturePath,
     5,
     -2,
     0), padding=0)
    return (glowFrame, normalFrame, fill)
Ejemplo n.º 9
0
 def ApplyAttributes(self, attributes):
     global TIME_BASE
     uiprimitives.Transform.ApplyAttributes(self, attributes)
     TIME_BASE = 0.3
     self.hasCorners = attributes.get('hasCorners', self.default_hasCorners)
     wedgeWidth = attributes.get('wedgeWidth', self.default_wedgeWidth)
     wedgeTopStart = attributes.get('wedgeTopStart',
                                    self.default_wedgeTopStart)
     self.wedgePosRatio = attributes.get('wedgePosRatio',
                                         self.default_wedgePosRatio)
     self.borderLeft = uicontrols.Frame(
         parent=self,
         name='borderLeft',
         texturePath='res:/UI/Texture/classes/CQMainScreen/borderLeft.png',
         cornerSize=16,
         align=uiconst.TOPLEFT,
         pos=(0, 1, 200, 48),
         padLeft=2,
         color=util.Color.WHITE)
     self.wedge = uicontrols.Frame(
         parent=self,
         name='wedge',
         texturePath='res:/UI/Texture/classes/CQMainScreen/wedge.png',
         cornerSize=13,
         align=uiconst.TOPLEFT,
         pos=(300, wedgeTopStart, wedgeWidth, 27),
         padding=(-5, 0, -5, 0),
         color=util.Color.WHITE)
     self.borderRight = uicontrols.Frame(
         parent=self,
         name='borderLeft',
         texturePath='res:/UI/Texture/classes/CQMainScreen/borderRight.png',
         cornerSize=16,
         align=uiconst.TOPRIGHT,
         pos=(0, 1, 200, 48),
         padRight=2,
         color=util.Color.WHITE)
     if self.hasCorners:
         self.cornerLeft = uiprimitives.Sprite(
             parent=self,
             name='cornerLeft',
             texturePath=
             'res:/UI/Texture/classes/CQMainScreen/cornerLeft.png',
             pos=(0, 0, 22, 22))
         self.cornerRight = uiprimitives.Sprite(
             parent=self,
             name='cornerRight',
             texturePath=
             'res:/UI/Texture/classes/CQMainScreen/cornerRight.png',
             pos=(0, 0, 22, 22),
             align=uiconst.TOPRIGHT)
Ejemplo n.º 10
0
    def InitGauges(self):
        if self.gaugesInited:
            self.sr.gaugeParent.state = uiconst.UI_NORMAL
            return
        par = uiprimitives.Container(name='gauges',
                                     parent=self,
                                     align=uiconst.TOPLEFT,
                                     width=66,
                                     height=32,
                                     top=66,
                                     left=0,
                                     state=uiconst.UI_NORMAL)
        gauges = ['shield', 'armor', 'structure']
        for gaugeName in gauges:
            g = uiprimitives.Container(name='gauge_%s' % gaugeName,
                                       parent=par,
                                       align=uiconst.TOTOP,
                                       height=7,
                                       padTop=5,
                                       padBottom=1)
            g.damageBar = uiprimitives.Fill(parent=g,
                                            align=uiconst.NOALIGN,
                                            color=(158 / 256.0, 11 / 256.0,
                                                   14 / 256.0, 1.0))
            uicontrols.Frame(parent=g, color=(1.0, 1.0, 1.0, 0.5), padding=-1)
            uiprimitives.Fill(parent=g, padding=-1)
            setattr(self.sr, 'gauge_%s' % gaugeName, g)

        self.sr.gaugeParent = par
        self.gaugesInited = 1
        self.ArrangeGauges()
Ejemplo n.º 11
0
 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)
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.parentTimer = attributes.get('parentTimer')
     self.timerData = attributes.get('timerData')
     self.GetTime = self.timerData.timerFunc
     uicontrols.Frame(pgParent=self,
                      state=uiconst.UI_DISABLED,
                      color=HINT_FRAME_COLOR)
     leftCont = uiprimitives.Container(parent=self,
                                       align=uiconst.TOLEFT,
                                       width=self.TIME_WIDTH)
     rightCont = uiprimitives.Container(parent=self, align=uiconst.TOALL)
     self.time = uicontrols.Label(
         parent=leftCont,
         name='counter',
         text=str(int(self.timerData.maxTimeout / const.SEC)),
         fontsize=self.GetTimerFontSize(),
         bold=False,
         align=uiconst.CENTERLEFT,
         color=self.timerData.color,
         left=2 * const.defaultPadding)
     self.text = uicontrols.EveLabelSmall(
         left=const.defaultPadding,
         parent=rightCont,
         name='timer description',
         text=localization.GetByLabel(self.timerData.tooltip),
         align=uiconst.CENTERLEFT,
         width=self.TEXT_WIDTH - 2 * const.defaultPadding)
     self.height = self.text.actualTextHeight + 2 * const.defaultPadding
     self.activeBlink = None
     self.doUpdates = True
     uthread.new(self.UpdateTimer)
     self.opacity = 0.0
     uicore.animations.FadeIn(self, duration=0.5)
Ejemplo n.º 13
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     self.btnData = attributes.btnData
     self.btnNum = attributes.btnNum
     self.width = attributes.width
     self._isDraggable = attributes.get('isDraggable', self.default_isDraggable)
     self._openNeocomPanel = None
     self.height = self.width
     self.top = self.height * self.btnNum
     self.panel = None
     self.blinkThread = None
     self.realTop = self.top
     self.dragEventCookie = None
     self.disableClick = False
     self.iconSize = self.height - 2 * self.PADVERTICAL
     self.iconTransform = uiprimitives.Transform(name='iconTransform', parent=self, align=uiconst.TOALL, scalingCenter=(0.5, 0.5))
     self.iconLabelCont = None
     if self.btnData.id == 'map_beta':
         Sprite(parent=self.iconTransform, align=uiconst.TOPLEFT, pos=(0, 0, 11, 29), texturePath='res:/UI/Texture/Shared/betaTag.png', state=uiconst.UI_DISABLED)
     self.icon = GlowSprite(parent=self.iconTransform, name='icon', state=uiconst.UI_DISABLED, align=uiconst.CENTER, width=self.iconSize, height=self.iconSize, iconOpacity=1.0)
     self.UpdateIcon()
     PAD = 1
     self.blinkSprite = SpriteUnderlay(bgParent=self, name='blinkSprite', texturePath='res:/UI/Texture/classes/Neocom/buttonBlink.png', state=uiconst.UI_HIDDEN, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW)
     self.activeFrame = FrameUnderlay(bgParent=self, name='hoverFill', texturePath='res:/UI/Texture/classes/Neocom/buttonActive.png', cornerSize=5, state=uiconst.UI_HIDDEN, colorType=uiconst.COLORTYPE_UIHILIGHTGLOW)
     self.CheckIfActive()
     self.dropFrame = uicontrols.Frame(parent=self, name='hoverFrame', color=util.Color.GetGrayRGBA(1.0, 0.5), state=uiconst.UI_HIDDEN)
     sm.RegisterNotify(self)
Ejemplo n.º 14
0
    def InitGauges(self):
        if getattr(self, 'gaugesInited', False):
            self.sr.gaugeParent.state = uiconst.UI_DISABLED
            return
        parent = self.sr.gaugesContainer
        uiprimitives.Line(parent=parent, align=uiconst.TOLEFT)
        barw, barh = (24, 6)
        borderw = 2
        barsw = (barw + borderw) * 3 + borderw
        par = uiprimitives.Container(name='gauges', parent=parent, align=uiconst.TORIGHT, width=barsw + 2, height=0, left=0, top=0, idx=10)
        self.sr.gauges = []
        l = 2
        for each in ('SHIELD', 'ARMOR', 'STRUCT'):
            g = uiprimitives.Container(parent=par, name='gauge_%s' % each.lower(), align=uiconst.CENTERLEFT, width=barw, height=barh, left=l)
            uicontrols.Frame(parent=g)
            g.sr.bar = uiprimitives.Fill(parent=g, name='droneGaugeBar', align=uiconst.TOLEFT)
            uiprimitives.Fill(parent=g, name='droneGaugeBarDmg', color=(158 / 256.0,
             11 / 256.0,
             14 / 256.0,
             1.0))
            self.sr.gauges.append(g)
            setattr(self.sr, 'gauge_%s' % each.lower(), g)
            l += barw + borderw

        self.sr.gaugeParent = par
        self.gaugesInited = True
Ejemplo n.º 15
0
 def ApplyAttributes(self, attributes):
     uicontrols.SE_BaseClassCore.ApplyAttributes(self, attributes)
     uiprimitives.Line(parent=self,
                       align=uiconst.TOBOTTOM,
                       color=uiconst.ENTRY_LINE_COLOR)
     self.container = uiprimitives.Container(name='container', parent=self)
     self.system = uiprimitives.Container(name='solarsystem', parent=self)
     self.upgrades = uiprimitives.Container(name='upgrades',
                                            parent=self,
                                            align=uiconst.TORIGHT,
                                            pos=(0, 0, 280, 10),
                                            padding=(0, 3, 8, 4))
     self.location = uicontrols.EveLabelMedium(text='',
                                               parent=self.system,
                                               left=6,
                                               align=uiconst.TOPLEFT,
                                               state=uiconst.UI_DISABLED,
                                               idx=0,
                                               maxLines=1)
     self.upgradeBars = []
     uicontrols.Frame(bgParent=self.upgrades, color=COLOR)
     barCont = uiprimitives.Container(parent=self.upgrades, padding=1)
     for i in xrange(5):
         f = uiprimitives.Fill(parent=barCont,
                               name='upgrades%d' % i,
                               align=uiconst.TOLEFT_PROP,
                               color=COLOR,
                               width=0.2,
                               padding=1)
         self.upgradeBars.append(f)
 def PanelShowSchematics(self):
     self.schematicsCont = cont = uiprimitives.Container(
         parent=self.actionCont,
         name='schematicsCont',
         pos=(0, 0, 0, 155),
         align=uiconst.TOTOP,
         state=uiconst.UI_HIDDEN)
     self.schematicsScroll = uicontrols.Scroll(parent=cont,
                                               name='schematicsScroll',
                                               align=uiconst.TOTOP,
                                               height=148)
     self.schematicsScroll.Startup()
     self.schematicsScroll.sr.id = 'planetProcessorSchematicsScroll'
     self.schematicsScroll.multiSelect = False
     self.schematicsScroll.HideUnderLay()
     self.schematicsScroll.OnSelectionChange = self.OnSchematicScrollSelectionChange
     uicontrols.Frame(parent=self.schematicsScroll,
                      color=(1.0, 1.0, 1.0, 0.2))
     self.LoadSchematicsScroll()
     self.selectedSchematicCont = uiprimitives.Container(
         parent=cont,
         name='selectedSchematicCont',
         pos=(0, 0, 0, 0),
         padding=(0, 7, 0, 0),
         align=uiconst.TOALL,
         state=uiconst.UI_PICKCHILDREN)
     return cont
    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)
Ejemplo n.º 18
0
 def MovieStop(self, btn = None, *args):
     if getattr(self, 'movie', None) is not None:
         self.movie.Pause()
         self.sr.movieCont.Flush()
         uicontrols.Frame(parent=self.sr.movieCont, color=(1.0, 1.0, 1.0, 0.2), idx=0)
         self.movie = None
         self.playing = False
Ejemplo n.º 19
0
 def Setup(self, template = None, readonly = False):
     self.typeID = None
     self.readonly = readonly
     self.boven = uiprimitives.Container(name='ccip_top', parent=self, height=ICONSIZE, align=uiconst.TOTOP)
     self.toolbar = uiprimitives.Container(name='ccip_bar', parent=self.boven, left=ICONSIZE + 2, top=ICONSIZE - TOOLSIZE, height=TOOLSIZE, align=uiconst.TOPLEFT, width=240)
     uiprimitives.Container(name='ccip_push', parent=self, height=3, align=uiconst.TOTOP)
     cont = uiprimitives.Container(name='mainicon', parent=self.boven, width=ICONSIZE, align=uiconst.TOLEFT)
     self.infoframe = uicontrols.Frame(parent=cont)
     self.infoicon = infoicon = InfoIcon(left=1, top=1, parent=cont, idx=0, align=uiconst.TOPRIGHT, state=uiconst.UI_DISABLED)
     infoicon.OnClick = lambda *x: self.ShowInfo()
     self.icon = uicontrols.Icon(parent=cont)
     self.icon.OnClick = self.ShowInfo
     self.icon.LoadTexture('res:/UI/Texture/notavailable.dds')
     self.icon.width = self.icon.height = ICONSIZE
     uiprimitives.Container(name='ccip_push', parent=self.boven, width=6, align=uiconst.TOLEFT)
     cont = uiprimitives.Container(name='ccip_icon', parent=self.boven, align=uiconst.TOTOP, height=24)
     self.capt = uicontrols.CaptionLabel(text='', parent=cont)
     cont = uiprimitives.Container(name='ccip_textcont', parent=self.boven, align=uiconst.TOALL, pos=(0, 0, 0, 0))
     self.text = uicontrols.Label(text='', parent=cont, align=uiconst.TOTOP, height=self.boven.height, state=uiconst.UI_NORMAL)
     self.scroll = uicontrols.Scroll(name='ccip_top', parent=self)
     if template:
         self.Load(template)
     else:
         self.typeID = None
         self.capt.text = 'Copycat'
         self.text.text = 'Select a ship setup from the list to display details in this panel'
         self.scroll.Load(contentList=[], headers=['qty', 'name'])
Ejemplo n.º 20
0
 def MapScaler(self, where):
     parent = uiprimitives.Container(parent=where,
                                     align=uiconst.TOBOTTOM,
                                     height=14)
     uicontrols.EveLabelSmall(
         text=localization.GetByLabel('UI/Map/MapBrowser/ZoomLevel'),
         parent=parent,
         left=0,
         top=-12,
         width=100,
         color=(1.0, 1.0, 1.0, 0.5),
         state=uiconst.UI_NORMAL)
     for level in (1, 2, 4):
         sub = uiprimitives.Container(parent=parent,
                                      align=uiconst.TOLEFT,
                                      width=24,
                                      state=uiconst.UI_NORMAL)
         sub.OnClick = (self.ChangeZoomLevel, sub, level)
         parent.width += sub.width
         uicontrols.Frame(parent=sub)
         txt = uicontrols.EveLabelSmall(text='%sx' % level,
                                        parent=sub,
                                        align=uiconst.TOALL,
                                        left=6,
                                        top=2,
                                        state=uiconst.UI_DISABLED)
         if settings.user.ui.Get('mapbrowserzoomlevel', 1) == level:
             uiprimitives.Fill(parent=sub, padding=(1, 1, 1, 1))
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     self.SetWndIcon(self.iconNum, mainTop=-10)
     self.SetCaption(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/Header'))
     self.SetMinSize([360, 240])
     self.MakeUnResizeable()
     self.sr.windowCaption = uicontrols.CaptionLabel(text=localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/Header'), parent=self.sr.topParent, align=uiconst.RELATIVE, left=70, top=15, state=uiconst.UI_DISABLED, fontsize=18)
     self.SetScope('all')
     main = self.sr.main
     optimizeSettingsOptions = [(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelect'), None),
      (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsMemory'), 1),
      (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsPerformance'), 2),
      (localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsQuality'), 3)]
     combo = self.combo = uicontrols.Combo(label='', parent=main, options=optimizeSettingsOptions, name='', select=None, callback=self.OnComboChange, labelleft=0, align=uiconst.TOTOP)
     combo.SetHint(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelect'))
     combo.padding = (6, 0, 6, 0)
     self.messageArea = uicls.EditPlainText(parent=main, readonly=1, hideBackground=1, padding=6)
     self.messageArea.HideBackground()
     self.messageArea.RemoveActiveFrame()
     uicontrols.Frame(parent=self.messageArea, color=(0.4, 0.4, 0.4, 0.5))
     self.messageArea.SetValue(localization.GetByLabel('UI/SystemMenu/DisplayAndGraphics/OptimizeSettings/OptimizeSettingsSelectInfo'))
     btns = uicontrols.ButtonGroup(btns=[[localization.GetByLabel('UI/Common/Buttons/Apply'),
       self.Apply,
       (),
       66], [localization.GetByLabel('UI/Common/Buttons/Cancel'),
       self.CloseByUser,
       (),
       66]], parent=main, idx=0)
     return self
Ejemplo n.º 22
0
 def ApplyAttributes(self, attributes):
     BaseCharacterCreationStep.ApplyAttributes(self, attributes)
     self.isSerenity = boot.region == 'optic'
     self.namesChecked = {}
     self.schoolInfo = {}
     self.ancestryInfo = {}
     self.ancestryConts = {}
     self.schoolConts = {}
     self.checkingName = 0
     self.startAncestryHeight = 180
     self.startEducationHeight = 180
     self.padValue = 16
     self.SetupAncestrySection()
     self.SetupEducationSection()
     self.SetupNameSection()
     self.sr.portraitCont = uiprimitives.Container(name='portraitCont',
                                                   parent=self.sr.leftSide,
                                                   align=uiconst.CENTERTOP,
                                                   pos=(0, 128, 128, 128))
     uicontrols.Frame(parent=self.sr.portraitCont,
                      color=ccConst.COLOR + (0.3, ))
     self.sr.facePortrait = uicontrols.Icon(parent=self.sr.portraitCont,
                                            idx=1,
                                            align=uiconst.TOALL)
     photo = uicore.layer.charactercreation.GetActivePortrait()
     if photo is not None:
         self.sr.facePortrait.texture.atlasTexture = photo
         self.sr.facePortrait.texture.atlasTexture.Reload()
     self.UpdateLayout()
Ejemplo n.º 23
0
 def PanelShowStats(self, *args):
     """
     Show stats of current pin, kinda like showinfo
     """
     cont = uiprimitives.Container(parent=self.actionCont,
                                   pos=(0, 0, 0, 175),
                                   align=uiconst.TOTOP,
                                   state=uiconst.UI_HIDDEN)
     self.statsScroll = scroll = uicontrols.Scroll(parent=cont,
                                                   name='StatsScroll',
                                                   align=uiconst.TOTOP,
                                                   height=170)
     scroll.HideUnderLay()
     uicontrols.Frame(parent=scroll, color=(1.0, 1.0, 1.0, 0.2))
     scrolllist = []
     link = self.pin.link
     strCpuUsage = localization.GetByLabel('UI/PI/Common/TeraFlopsAmount',
                                           amount=int(link.GetCpuUsage()))
     data = util.KeyVal(
         label='%s<t>%s' %
         (localization.GetByLabel('UI/PI/Common/CpuUsage'), strCpuUsage))
     scrolllist.append(listentry.Get('Generic', data=data))
     strPowerUsage = localization.GetByLabel('UI/PI/Common/MegaWattsAmount',
                                             amount=int(
                                                 link.GetPowerUsage()))
     data = util.KeyVal(label='%s<t>%s' %
                        (localization.GetByLabel('UI/PI/Common/PowerUsage'),
                         strPowerUsage))
     scrolllist.append(listentry.Get('Generic', data=data))
     scroll.Load(contentList=scrolllist,
                 headers=[
                     localization.GetByLabel('UI/PI/Common/Attribute'),
                     localization.GetByLabel('UI/Common/Value')
                 ])
     return cont
Ejemplo n.º 24
0
 def AddLayout(self):
     self.sr.main = uiprimitives.Container(name='main',
                                           parent=self,
                                           align=uiconst.TOPLEFT,
                                           height=ICONHEIGHT,
                                           width=ICONWIDTH)
     self.sr.background = uiprimitives.Container(name='background',
                                                 parent=self.sr.main,
                                                 align=uiconst.TOTOP,
                                                 height=88)
     self.sr.backgroundFrame = uicontrols.BumpedUnderlay(
         name='backgroundUnderlay', parent=self.sr.background)
     self.sr.iconContainer = uiprimitives.Container(name='iconContainer',
                                                    parent=self.sr.main,
                                                    align=uiconst.CENTERTOP,
                                                    pos=(0, 10, 54, 54),
                                                    idx=0)
     invTypeIcon = cfg.invtypes.Get(self.typeID).Icon()
     self.sr.icon = icon = uicontrols.Icon(parent=self.sr.iconContainer,
                                           align=uiconst.TOALL,
                                           state=uiconst.UI_DISABLED)
     if invTypeIcon is None:
         icon.ChangeIcon(typeID=self.typeID)
     else:
         icon.LoadIcon(invTypeIcon.iconFile)
     self.sr.quantityContainer = uiprimitives.Container(
         name='quantityContainer',
         parent=self.sr.background,
         align=uiconst.CENTERBOTTOM,
         height=20,
         width=ICONWIDTH - 1,
         idx=0,
         bgColor=(0, 0, 0, 0.5))
     self.sr.quantityLabel = uicontrols.EveLabelMedium(
         text='',
         parent=self.sr.quantityContainer,
         align=uiconst.CENTERBOTTOM,
         left=3,
         bold=True)
     self.barContainer = uiprimitives.Fill(name='barContainer',
                                           parent=self.sr.quantityContainer,
                                           align=uiconst.TOPLEFT,
                                           color=(1, 1, 1, 0.25),
                                           height=20,
                                           width=0)
     self.sr.typeNameContainer = uiprimitives.Container(
         name='typeNameContainer', parent=self.sr.main, align=uiconst.TOALL)
     self.sr.typeName = uicls.LabelLink(
         text=localization.GetByLabel('UI/UpgradeWindow/CenteredTypeText',
                                      type=self.typeID),
         parent=self.sr.typeNameContainer,
         align=uiconst.CENTERTOP,
         maxLines=3,
         width=ICONWIDTH,
         func=(sm.GetService('info').ShowInfo, self.typeID),
         hint=localization.GetByLabel('UI/Commands/ShowInfo'),
         top=3)
     self.sr.typeName.maxLines = None
     self.sr.frame = uicontrols.Frame(parent=self, state=uiconst.UI_HIDDEN)
Ejemplo n.º 25
0
 def ApplyAttributes(self, attributes):
     uiprimitives.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 = uiprimitives.Container(parent=self,
                                             name='yAxisCont',
                                             align=uiconst.TOLEFT,
                                             width=YAXISWIDTH,
                                             padBottom=XAXISHEIGHT + 1)
     self.xAxisCont = uiprimitives.Container(parent=self,
                                             name='xAxisCont',
                                             align=uiconst.TOBOTTOM,
                                             height=XAXISHEIGHT)
     self.graphCont = uiprimitives.Container(parent=self,
                                             name='graphCont',
                                             align=uiconst.TOALL)
     self.timeIndicator = uiprimitives.Line(parent=self.graphCont,
                                            name='timeIndicator',
                                            state=uiconst.UI_HIDDEN,
                                            align=uiconst.TOPLEFT,
                                            color=timeIndicatorColor,
                                            padding=(0, 1, 0, 1),
                                            width=1)
     self.backgroundCont = uiprimitives.Container(parent=self,
                                                  name='backgroundCont',
                                                  align=uiconst.TOALL,
                                                  padding=(1, 2, 1, 1),
                                                  clipChildren=True)
     uicontrols.Frame(parent=self, color=COLOR_FRAME)
     uiprimitives.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 = uiprimitives.Container(parent=self.graphCont,
                                           name='barCont',
                                           align=uiconst.TOALL,
                                           padding=(2, 2, 1, 1),
                                           clipChildren=True)
Ejemplo n.º 26
0
 def setup_rewards_screen(self):
     self.parent_container = uiprimitives.Container(name='parentContainer', parent=self, align=uiconst.CENTER, height=400, width=450, top=-10)
     self.background_container = uiprimitives.Container(name='background', parent=self.parent_container, width=450, height=285, align=uiconst.CENTERTOP, bgColor=(0.037, 0.037, 0.037, 1))
     uicontrols.Frame(parent=self.background_container, color=(0.36, 0.36, 0.36, 0.36))
     self.main_container = uiprimitives.Container(name='mainContainer', parent=self.background_container, width=440, height=275, align=uiconst.CENTER)
     self.rank_container = uiprimitives.Container(name='rankContainer', parent=self.parent_container, width=450, height=100, align=uiconst.CENTERBOTTOM, bgColor=(0.037, 0.037, 0.037, 1))
     uicontrols.Frame(parent=self.rank_container, color=(0.36, 0.36, 0.36, 0.36))
     self.agent_container = uiprimitives.Container(name='agentContainer', parent=self.main_container, align=uiconst.TOPLEFT, height=180, width=150, left=5, top=5)
     self.agent_image = uiprimitives.Sprite(name='agentImage', parent=self.agent_container, align=uiconst.TOPLEFT, height=150, width=150, texturePath='res:/UI/Texture/classes/ProjectDiscovery/lundberg.jpg')
     self.agent_label = uicontrols.Label(name='agentName', parent=self.agent_container, align=uiconst.BOTTOMLEFT, text=localization.GetByLabel('UI/ProjectDiscovery/AgentName'), top=5, height=18, fontsize=14)
     self.SOE_image = uiprimitives.Sprite(name='SOE_logo', parent=self.main_container, align=uiconst.BOTTOMLEFT, height=75, width=75, texturePath='res:/UI/Texture/Corps/14_128_1.png')
     self.text_container = uiprimitives.Container(name='textContainer', parent=self.main_container, align=uiconst.TOPRIGHT, width=270, height=80, top=20)
     self.text_header_container = uiprimitives.Container(name='textHeaderContainer', parent=self.text_container, align=uiconst.TOTOP, height=20)
     self.header_message = EveLabelLargeBold(parent=self.text_header_container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ProjectDiscovery/Subcellular/RewardsScreen/Header'))
     self.main_message = uicontrols.Label(parent=self.text_container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/ProjectDiscovery/Subcellular/RewardsScreen/ThanksMessage'))
     self.setup_reward_container()
     self.setup_reward_footer()
     self.setup_continue_button()
Ejemplo n.º 27
0
    def ApplyAttributes(self, attributes):
        uiprimitives.Container.ApplyAttributes(self, attributes)
        self.cycling = False
        self.cyclingThread = None
        self.numCellRows = attributes.get('numCellRows', 5)
        maxCellsPerRow = attributes.get('maxCellsPerRow', 5)
        cellForegroundColor = attributes.get('cellForegroundColor', None)
        cellBackgroundColor = attributes.get('cellBackgroundColor', None)
        self.cellHeight = attributes.get('cellHeight', 20)
        self.cellWidth = attributes.get('cellWidth', 20)
        self.cellTextSize = attributes.get('cellTextSize', 16)
        self.cellsPerRow = attributes.get('cellsPerRow', 5)
        self.deadCells = []
        self.liveCells = []
        self.doneCells = []
        self.cellGlyphs = ['0',
         '1',
         '2',
         '3',
         '4',
         '5',
         '6',
         '7',
         '8',
         '9',
         'A',
         'B',
         'C',
         'D',
         'E',
         'F']
        self.cellRows = []
        self.cellRowContainers = []
        self.cellPaddingVertical = 0
        self.cellPaddingHorizontal = 0
        if cellForegroundColor is None:
            cellForegroundColor = (0.75, 0.0, 0.0, 0.75)
        if cellBackgroundColor is None:
            cellBackgroundColor = (0.5, 0.5, 0.5, 0.25)
        self.cellBackgroundColor = cellBackgroundColor
        self.progressColor = cellForegroundColor
        self.doneColor = (0.0, 0.5, 0.0, 0.5)
        self.flashColor = (0.75, 0.75, 0.75, 0.75)
        uicontrols.Frame(parent=self, color=(0.7, 0.7, 0.7, 0.5), idx=0)
        for x in xrange(0, self.numCellRows):
            newRow = []
            newRowContainer = uiprimitives.Container(parent=self, name='hackingCellRow', align=uiconst.TOTOP, state=uiconst.UI_DISABLED, pos=(0,
             0,
             self.width,
             self.cellHeight))
            for y in xrange(0, self.cellsPerRow):
                newRow.append(self.CreateCell(newRowContainer, self.cellHeight, self.cellWidth, cellBackgroundColor, cellForegroundColor))

            self.cellRows.append(newRow)
            self.cellRowContainers.append(newRowContainer)

        self.cellRowSemaphore = uthread.Semaphore()
 def Startup(self):
     self.state = uiconst.UI_NORMAL
     self.shouldKill = False
     sub = uiprimitives.Container(name='sub',
                                  parent=self,
                                  align=uiconst.TOALL,
                                  pos=(0, 0, 0, 0),
                                  state=uiconst.UI_DISABLED)
     uicontrols.Frame(parent=self)
     uiprimitives.Fill(parent=self,
                       color=(0, 0, 0, 1),
                       idx=-1,
                       state=uiconst.UI_DISABLED)
     closex = uicontrols.Icon(icon='ui_38_16_220',
                              parent=self,
                              idx=0,
                              state=uiconst.UI_NORMAL,
                              align=uiconst.TOPRIGHT)
     closex.OnClick = self.CloseNotification
     closex.sr.hint = localization.GetByLabel('UI/Common/CloseNotification')
     iconCont = uiprimitives.Container(name='iconCont',
                                       parent=sub,
                                       align=uiconst.TOLEFT,
                                       pos=(0, 0, 60, 0))
     textCont = uiprimitives.Container(name='textCont',
                                       parent=sub,
                                       align=uiconst.TOALL,
                                       pos=(0, 0, 0, 0),
                                       state=uiconst.UI_NORMAL)
     self.sr.icon = uicontrols.Icon(parent=iconCont,
                                    icon='50_11',
                                    pos=(-2, 2, 64, 64),
                                    align=uiconst.CENTERLEFT,
                                    state=uiconst.UI_DISABLED)
     self.sr.headerText = uicontrols.EveLabelSmall(
         text='',
         parent=textCont,
         padTop=12,
         align=uiconst.TOTOP,
         state=uiconst.UI_DISABLED,
         bold=True)
     self.sr.text1 = uicontrols.EveLabelMedium(text='',
                                               parent=textCont,
                                               state=uiconst.UI_DISABLED,
                                               align=uiconst.TOTOP,
                                               padding=(0, -2, 4, 0))
     self.sr.text2 = uicontrols.EveLabelMedium(text='',
                                               parent=textCont,
                                               state=uiconst.UI_HIDDEN,
                                               align=uiconst.TOTOP,
                                               padding=(0, -2, 4, 0))
     self.sr.text3 = uicontrols.EveLabelMedium(text='',
                                               parent=textCont,
                                               state=uiconst.UI_HIDDEN,
                                               align=uiconst.TOTOP,
                                               padding=(0, -2, 4, 0))
Ejemplo n.º 29
0
 def Populate(self, path = None):
     self.sr.movieCont.Flush()
     uicontrols.Frame(parent=self.sr.movieCont, color=(1.0, 1.0, 1.0, 0.2), idx=0)
     dimWidth, dimHeight = self.GetSize(self.movieWidth, self.movieHeight)
     if path is not None:
         moviePath = path
     else:
         moviePath = str(self.node.resPath)
     self.path = moviePath
     self.movie = StreamingVideoSprite(parent=self.sr.movieCont, width=dimWidth, height=dimHeight, align=uiconst.CENTER, state=uiconst.UI_DISABLED, videoPath=moviePath)
Ejemplo n.º 30
0
 def Startup(self, name, itemID, typeID, tracker, cloud, mylocation=None):
     self.trackTransform = tracker
     self.sr.cloud = cloud
     self.sr.id = itemID
     self.sr.typeID = typeID
     self.name = name
     if name in ('', 'myDest', 'myloc'):
         uicore.animations.FadeTo(self,
                                  startVal=0.0,
                                  endVal=1.0,
                                  duration=0.1)
         return
     frame = None
     if itemID > 0:
         if typeID == const.typeConstellation:
             label = xtriui.ParentLabel(text='<b>' + name + '</b>',
                                        parent=self,
                                        left=154,
                                        top=4,
                                        fontsize=12,
                                        uppercase=1,
                                        state=uiconst.UI_NORMAL)
             frame = uicontrols.Frame(parent=self, align=uiconst.RELATIVE)
         else:
             label = xtriui.ParentLabel(text=name,
                                        parent=self,
                                        left=154,
                                        letterspace=1,
                                        fontsize=9,
                                        uppercase=1,
                                        align=uiconst.CENTERLEFT,
                                        state=uiconst.UI_NORMAL)
             label.top = -label.textheight / 2
     else:
         label = xtriui.ParentLabel(text=name,
                                    parent=self,
                                    left=154,
                                    top=7,
                                    letterspace=1,
                                    fontsize=9,
                                    uppercase=1,
                                    state=uiconst.UI_NORMAL)
     if not mylocation:
         if self.sr.id < 0:
             label.color.SetRGB(1.0, 0.96, 0.78, 1.0)
     if typeID != const.typeSolarSystem:
         label.left = (self.width - label.width) / 2
     if frame:
         frame.left = label.left - 5
         frame.width = label.width + 10
         frame.top = label.top - 3
         frame.height = label.height + 6
     label.state = uiconst.UI_NORMAL
     uicore.animations.FadeTo(self, startVal=0.0, endVal=1.0, duration=0.1)
     return self