예제 #1
0
    def GetUnderlay(self):
        if self.underlay is None:
            for each in uicore.layer.main.children[:]:
                if each is not None and not each.destroyed and each.name == 'services':
                    uicore.registry.UnregisterWindow(each)
                    each.OnClick = None
                    each.Minimize = None
                    each.Maximize = None
                    each.Close()

            self.underlay = uicls.Sprite(name='services', parent=uicore.layer.main, align=uiconst.TOTOP, state=uiconst.UI_HIDDEN)
            self.underlay.scope = 'station'
            self.underlay.minimized = 0
            self.underlay.Minimize = self.MinimizeUnderlay
            self.underlay.Maximize = self.MaximizeUnderlay
            main = uicls.Container(name='mainparentXX', parent=self.underlay, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            main.OnClick = self.ClickParent
            main.state = uiconst.UI_NORMAL
            sub = uicls.Container(name='subparent', parent=main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            captionparent = uicls.Container(name='captionparent', parent=main, align=uiconst.TOPLEFT, left=128, top=36, idx=0)
            caption = uicls.CaptionLabel(text='', parent=captionparent)
            self.closeBtn = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Commands/CmdClose'),
              self.CloseSvc,
              None,
              81]], parent=sub)
            self.sr.underlay = uicls.WindowUnderlay(parent=main)
            self.sr.underlay.padding = (-1, -10, -1, 0)
            svcparent = uicls.Container(name='serviceparent', parent=sub, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            self.underlay.sr.main = main
            self.underlay.sr.svcparent = svcparent
            self.underlay.sr.caption = caption
            uicore.registry.RegisterWindow(self.underlay)
        return self.underlay
예제 #2
0
파일: loading.py 프로젝트: R4M80MrX/eve-1
 def Startup(self):
     self.abortbtn = None
     self.abortbtnpar = None
     self.confirmbtn = None
     self.abortconfirmbtnpar = None
     self.sr.progresstext = None
     self.sr.readprogress = util.KeyVal(text='', prev=0)
     self.scope = 'all'
     self.sr.main = uicls.Container(parent=self,
                                    pos=(0, 0, 0, 0),
                                    name='maincontainer',
                                    state=uiconst.UI_PICKCHILDREN,
                                    align=uiconst.TOALL)
     self.sr.wndUnderlay = uicls.WindowUnderlay(parent=self,
                                                transparent=False)
     par = uicls.Container(name='progressParent',
                           parent=self.sr.main,
                           align=uiconst.TOBOTTOM,
                           height=32)
     progress = uicls.Container(parent=par,
                                pos=(25, 10, self.width - 50, 10),
                                name='progressbar',
                                state=uiconst.UI_DISABLED,
                                align=uiconst.RELATIVE)
     self.sr.glowClipper = uicls.Container(parent=progress,
                                           pos=(0, 0, 0, 10),
                                           name='glowclipper',
                                           state=uiconst.UI_DISABLED,
                                           clipChildren=True,
                                           align=uiconst.RELATIVE)
     self.sr.glow = uicls.Container(parent=self.sr.glowClipper,
                                    pos=(0, 0, progress.width, 10),
                                    name='glow',
                                    state=uiconst.UI_DISABLED,
                                    align=uiconst.RELATIVE)
     glowFill = uicls.Fill(parent=self.sr.glow,
                           name='glowFill',
                           state=uiconst.UI_DISABLED,
                           color=(1.0, 1.0, 1.0, 0.5),
                           align=uiconst.TOALL)
     shade = uicls.Container(parent=progress,
                             pos=(0, 0, 0, 0),
                             name='shade',
                             state=uiconst.UI_DISABLED,
                             align=uiconst.TOALL)
     shadeFill = uicls.Fill(parent=shade,
                            name='shadeFill',
                            state=uiconst.UI_DISABLED,
                            color=(0.0, 0.0, 0.0, 0.18),
                            align=uiconst.TOALL)
     uicls.Frame(parent=progress)
     self.sr.loading_progress = progress
     self.sr.progresstext = uicls.EveLabelMedium(text='',
                                                 parent=progress,
                                                 width=270,
                                                 left=2,
                                                 top=4,
                                                 state=uiconst.UI_NORMAL)
     self.state = uiconst.UI_PICKCHILDREN
예제 #3
0
 def Prepare_OptionMenu_(self):
     uicore.layer.menu.Flush()
     menu = uicls.Container(parent=uicore.layer.menu,
                            pos=(0, 0, 200, 200),
                            align=uiconst.RELATIVE)
     scrollClipper = uicls.Container(parent=menu, clipChildren=True)
     menu.sr.scroll = uicls.Scroll(parent=scrollClipper,
                                   align=uiconst.TOPLEFT)
     menu.sr.scroll.HideBackground(alwaysHidden=True)
     menu.sr.scroll.RemoveActiveFrame()
     uicls.Fill(parent=menu, color=(1, 1, 1, 0.125))
     uicls.WindowUnderlay(parent=menu,
                          transparent=False,
                          padding=(0, 0, 0, 0))
     return (menu, menu.sr.scroll, uicls.SE_CheckboxComboCore)
예제 #4
0
    def ClickPic(self, idx):
        if not self.sr.Get('shapes', None):
            top = self.corpLogo.top + self.corpLogo.height
            self.sr.shapes = uicls.Container(name='shapes_container',
                                             parent=self.sr.main,
                                             align=uiconst.CENTERTOP,
                                             height=220,
                                             width=280,
                                             idx=0,
                                             top=top)
            self.sr.shapes.state = uiconst.UI_HIDDEN
            shapescroll = uicls.Scroll(
                parent=self.sr.shapes,
                padding=(const.defaultPadding, const.defaultPadding,
                         const.defaultPadding, const.defaultPadding))
            self.AddCloseButton(self.sr.shapes)
            self.sr.underlay = uicls.WindowUnderlay(parent=self.sr.shapes)
            x = 0
            scrolllist = []
            icons = []
            graphicIDs = const.graphicCorpLogoLibShapes.keys()
            graphicIDs.sort()
            for graphicID in graphicIDs:
                texturePath = self.GetLogoLibShape(graphicID)
                icons.append((texturePath, None, graphicID, self.PickPic))
                x += 1
                if x == 4:
                    scrolllist.append(listentry.Get('Icons', {'icons': icons}))
                    icons = []
                    x = 0

            if len(icons):
                scrolllist.append(listentry.Get('Icons', {'icons': icons}))
            self.sr.shapes.state = uiconst.UI_NORMAL
            shapescroll.Load(fixedEntryHeight=64, contentList=scrolllist)
        self.layerNumSelected = idx
        self.sr.shapes.top = self.corpLogo.top + self.corpLogo.height
        if self.sr.Get('colors', None):
            self.sr.colors.state = uiconst.UI_HIDDEN
        self.sr.shapes.state = uiconst.UI_NORMAL
        self.sr.shapes.SetOrder(0)
예제 #5
0
 def Expand(self, *args):
     self.expanding = 1
     if sm.GetService('connection').IsConnected():
         eve.Message('ComboExpand')
     log.LogInfo('ColorPreview', self.name, 'expanding')
     colorpar = uicls.Container(name='colors', align=uiconst.TOPLEFT, width=112, height=62)
     uicore.layer.menu.children.insert(0, colorpar)
     colorSwatch = xtriui.ColorSwatch(name='colorSwatch', align=uiconst.TOALL, parent=colorpar)
     colorSwatch.Startup()
     colorSwatch.sr.dad = self
     self.sr.wndUnderlay = uicls.WindowUnderlay(parent=colorpar)
     self.sr.wndUnderlay.padding = -6
     uiutil.Update(colorpar)
     l, t, w, h = self.sr.preview.GetAbsolute()
     colorpar.left = [l + w, l - colorpar.width][l + w + colorpar.width > uicore.desktop.width]
     colorpar.top = [t + h, t - colorpar.height][t + h + colorpar.height > uicore.desktop.height]
     colorpar.state = uiconst.UI_NORMAL
     self.colorpar = colorpar
     self.sr.cookie = uicore.event.RegisterForTriuiEvents(uiconst.UI_MOUSEUP, self.OnGlobalClick)
     self.expanding = 0
     self.expanded = 1
     log.LogInfo('ColorPreview', self.name, 'expanded')
예제 #6
0
    def ClickCol(self, idx, sender):
        if not self.sr.Get('colors', None):
            self.sr.colors = uicls.Container(name='colors_container',
                                             parent=self.sr.main,
                                             align=uiconst.CENTERTOP,
                                             height=128,
                                             width=150,
                                             idx=0)
            colorscroll = uicls.Scroll(
                parent=self.sr.colors,
                padding=(const.defaultPadding, const.defaultPadding,
                         const.defaultPadding, const.defaultPadding))
            self.AddCloseButton(self.sr.colors)
            self.sr.underlay = uicls.WindowUnderlay(parent=self.sr.colors)
            x = 0
            scrolllist = []
            icons = []
            graphicIDs = const.graphicCorpLogoLibColors.keys()
            graphicIDs.sort()
            for graphicID in graphicIDs:
                color, blendMode = self.GetLogoLibColor(graphicID)
                icons.append((None, color, graphicID, self.PickCol))
                x += 1
                if x == 4:
                    scrolllist.append(listentry.Get('Icons', {'icons': icons}))
                    icons = []
                    x = 0

            if len(icons):
                scrolllist.append(listentry.Get('Icons', {'icons': icons[:]}))
            self.sr.colors.state = uiconst.UI_NORMAL
            colorscroll.Load(fixedEntryHeight=32, contentList=scrolllist)
        self.layerNumSelected = idx
        self.sr.colors.top = self.corpLogo.top + self.corpLogo.height
        if self.sr.Get('shapes', None):
            self.sr.shapes.state = uiconst.UI_HIDDEN
        self.sr.colors.state = uiconst.UI_NORMAL
        uiutil.SetOrder(self.sr.colors, 0)
예제 #7
0
파일: dustPins.py 프로젝트: R4M80MrX/eve-1
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     self.pin = attributes.Get('pin', None)
     pad = self.pad = 3
     self.main = uicls.Container(parent=self,
                                 name='main',
                                 pos=(0, 0, 0, 0),
                                 padding=(pad, pad, pad, pad),
                                 state=uiconst.UI_PICKCHILDREN,
                                 align=uiconst.TOALL)
     pad = const.defaultPadding
     self.sr.footer = uicls.Container(name='footer',
                                      parent=self.main,
                                      align=uiconst.TOBOTTOM,
                                      pos=(0, 0, 0, 25),
                                      padding=(pad, pad, pad, pad))
     self.sr.underlay = uicls.WindowUnderlay(parent=self)
     self.sr.underlay.state = uiconst.UI_DISABLED
     self.header = self._DrawAlignTopCont(18, 'headerCont')
     self.closeBtn = uicls.Icon(name='close',
                                icon='ui_38_16_220',
                                parent=self.header,
                                pos=(0, 0, 16, 16),
                                align=uiconst.TOPRIGHT)
     self.closeBtn.OnClick = lambda: sm.GetService(
         'planetUI').myPinManager.PinUnselected()
     self.headerText = uicls.EveLabelMedium(parent=self.header,
                                            align=uiconst.CENTER,
                                            state=uiconst.UI_NORMAL)
     self.headerText.text = cfg.invtypes.Get(self.pin.GetTypeID()).typeName
     uicls.Line(parent=self.header, align=uiconst.TOBOTTOM)
     self.content = self._DrawAlignTopCont(180,
                                           'contentCont',
                                           padding=(4, 4, 4, 4))
     iconX = 180
     itemHeight = 2
     ownerID = self.pin.GetOwnerID()
     conflictState = eveDustCommon.planetSurface.GetConflictState(
         self.pin.pinKv.conflicts)
     conflictText = localization.GetByLabel(STATE_NAMES[conflictState])
     self.conflictStateLabel = uicls.EveLabelMedium(
         parent=self.content,
         pos=(2, itemHeight, self.default_width - 10, 16))
     self.conflictStateLabel.text = localization.GetByLabel(
         'UI/PI/Planet/Dust/ConflictState', state=conflictText)
     itemHeight += 20
     if ownerID:
         self.ownerLabel = uicls.EveLabelMedium(parent=self.content,
                                                pos=(2, itemHeight, iconX,
                                                     16))
         self.ownerLabel.text = localization.GetByLabel(
             'UI/PI/Planet/Dust/DustPinOwner', player=ownerID)
         self.ownerIcon = uicls.Container(parent=self.content,
                                          pos=(iconX, itemHeight, 64, 64),
                                          align=uiconst.RELATIVE)
         uiutil.GetLogoIcon(itemID=ownerID,
                            parent=self.ownerIcon,
                            name='ownercorplogo',
                            acceptNone=False,
                            align=uiconst.TOALL)
         itemHeight += 68
     if ownerID == session.corpid and conflictState == const.objectiveStateCeasefire:
         uicls.Button(
             parent=self.sr.footer,
             label=localization.GetByLabel('UI/PI/Planet/Dust/DestroyPin'),
             func=self.Terminate)
     elif ownerID != session.corpid and eveDustCommon.planetSurface.GetConflictState(
             self.pin.pinKv.conflicts,
             session.corpid) == const.objectiveStateCeasefire:
         uicls.Button(parent=self.sr.footer,
                      label=localization.GetByLabel(
                          'UI/PI/Planet/Dust/AttackInstallation'),
                      func=self.Attack)
     dw = uicore.desktop.width
     dh = uicore.desktop.height
     self.height = self.default_height
     self.width = self.default_width
     self.left = settings.user.ui.Get('planetContPositionX',
                                      (dw - self.width) / 2)
     self.top = settings.user.ui.Get('planetContPositionY',
                                     (dh - self.height) / 2)
     if self.left < 0:
         self.left = 0
     elif self.left > dw - self.width:
         self.left = dw - self.width
     if self.top < 0:
         self.top = 0
     elif self.top > dh - self.height:
         self.top = dh - self.heigh
     uicls.UIEffects().MorphUI(self,
                               'opacity',
                               1.0,
                               time=250.0,
                               float=1,
                               newthread=1,
                               maxSteps=100)
예제 #8
0
파일: loginII.py 프로젝트: R4M80MrX/eve-1
    def Layout(self, reloading = 0, pushBtnArgs = None, setUsername = None, setPassword = None):
        if not reloading:
            self.sceneLoadedEvent = locks.Event('loginScene')
            uthread.new(self.LoadScene)
        self.eulaInited = 0
        self.Flush()
        borderHeight = uicore.desktop.height / 6
        par = uicls.Container(name='underlayContainer', parent=self, align=uiconst.TOTOP, height=borderHeight)
        self.sr.underlay2 = uicls.WindowUnderlay(parent=par)
        self.sr.underlay2.padding = (-16, -16, -16, 0)
        bottomPar = uicls.Container(name='underlayContainer_Bottom', parent=self, align=uiconst.TOBOTTOM, height=borderHeight + 6)
        bottomUnderlay = uicls.WindowUnderlay(parent=bottomPar)
        bottomUnderlay.padding = (-16, 6, -16, -16)
        self.fadeCont = uicls.Container(name='fadeCont', parent=self, align=uiconst.TOPLEFT, state=uiconst.UI_DISABLED, width=uicore.desktop.width, height=uicore.desktop.height, idx=-1)
        if trinity.app.fullscreen:
            closex = uicls.Icon(icon='ui_73_16_49', parent=self, pos=(0, 1, 0, 0), align=uiconst.TOPRIGHT, idx=0, state=uiconst.UI_NORMAL, hint=localization.GetByLabel('UI/Login/QuitGame'))
            closex.OnClick = self.ClickExit
            closex.sr.hintAbRight = uicore.desktop.width - 16
            closex.sr.hintAbTop = 16
        self.mainBrowserParent = uicls.Container(name='mainBrowserParent', parent=self, align=uiconst.CENTER, state=uiconst.UI_HIDDEN, width=800, height=440, idx=0)
        self.mainBrowser = uicls.Edit(parent=self.mainBrowserParent, padding=(8, 18, 8, 8), readonly=1)
        mainclosex = uicls.Icon(icon='ui_38_16_220', parent=self.mainBrowserParent, pos=(2, 1, 0, 0), align=uiconst.TOPRIGHT, idx=0, state=uiconst.UI_NORMAL)
        mainclosex.OnClick = self.CloseMenu
        wndUnderlay = uicls.WindowUnderlay(parent=self.mainBrowserParent)
        self.eulaParent = uicls.Container(name='eulaParent', parent=self, align=uiconst.CENTER, state=uiconst.UI_HIDDEN, width=800, height=440, idx=0)
        eulaCont = uicls.Container(name='eulaCont', parent=self.eulaParent, align=uiconst.TOALL, padding=(0, 18, 0, 0))
        browser = uicls.Edit(parent=eulaCont, padding=(6, 6, 6, 6), readonly=1)
        browser.sr.scrollcontrols.state = uiconst.UI_NORMAL
        browser.viewing = 'eula_ccp'
        self.eulaBrowser = browser
        self.sr.eulaUnderlay = uicls.WindowUnderlay(parent=self.eulaParent)
        self.maintabs = uicls.TabGroup(name='maintabs', parent=eulaCont, idx=0, tabs=[[localization.GetByLabel('UI/Login/EULA/EveEULAHeader'),
          browser,
          self,
          'eula_ccp'], [localization.GetByLabel('UI/Login/EULA/ThirdPartyEULAHeader'),
          browser,
          self,
          'eula_others']], groupID='eula', autoselecttab=0)
        self.eulaclosex = uicls.Icon(icon='ui_38_16_220', parent=self.eulaParent, pos=(2, 1, 0, 0), align=uiconst.TOPRIGHT, idx=0, state=uiconst.UI_NORMAL)
        self.eulaclosex.OnClick = self.CloseMenu
        bottomArea = uicls.Container(name='bottomArea', parent=bottomPar, idx=0, pos=(0, 0, 0, 0))
        bottomSub = uicls.Container(name='bottomSub', parent=bottomArea, align=uiconst.CENTER, idx=0, height=bottomPar.height, width=800)
        knownUserNames = settings.public.ui.Get('usernames', [])
        editswidth = 120
        if borderHeight <= 100:
            editstop = 30
        else:
            editstop = 40
        editsleft = (bottomSub.width - editswidth) / 2
        edit = uicls.SinglelineEdit(name='username', parent=bottomSub, pos=(editsleft,
         editstop,
         editswidth,
         0), maxLength=64)
        edit.SetHistoryVisibility(0)
        t1 = uicls.EveLabelSmall(text=localization.GetByLabel('UI/Login/Username'), parent=edit, top=3, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 0.75))
        if knownUserNames:
            ops = [ (name, name) for name in knownUserNames ]
            edit.LoadCombo('usernamecombo', ops, self.OnComboChange, comboIsTabStop=0)
        edit.SetValue(setUsername or settings.public.ui.Get('username', ''))
        edit.OnReturn = self.Confirm
        self.usernameEditCtrl = edit
        edit = uicls.SinglelineEdit(name='password', parent=bottomSub, pos=(editsleft,
         edit.top + edit.height + 6,
         editswidth,
         0), maxLength=64)
        t2 = uicls.EveLabelSmall(text=localization.GetByLabel('UI/Login/Password'), parent=edit, top=3, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 0.75))
        edit.SetPasswordChar(u'\u2022')
        edit.SetValue(setPassword or '')
        edit.OnReturn = self.Confirm
        self.passwordEditCtrl = edit
        if sm.GetService('gameui').UsingSingleSignOn():
            self.usernameEditCtrl.state = self.passwordEditCtrl.state = uiconst.UI_HIDDEN
            editswidth = 0
        tw = max(t1.textwidth, t2.textwidth)
        t1.left = t2.left = -tw - 6
        connectBtn = uicls.Button(parent=bottomSub, label=localization.GetByLabel('UI/Login/Connect'), func=self.Connect, pos=(editsleft,
         edit.top + edit.height + 4,
         0,
         0), fixedwidth=120, btn_default=1)
        statusContainer = uicls.Container(parent=bottomSub, left=editsleft + editswidth + 6, top=editstop)
        self.serverNameTextControl = uicls.EveLabelSmall(text=localization.GetByLabel('UI/Login/CheckingStatus'), parent=statusContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED)
        self.serverStatusTextControl = uicls.EveLabelSmall(parent=statusContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED)
        self.serverPlayerCountTextControl = uicls.EveLabelSmall(parent=statusContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED)
        self.serverVersionTextControl = uicls.EveLabelSmall(parent=statusContainer, align=uiconst.TOTOP, state=uiconst.UI_DISABLED)
        self.motdParent = uicls.Container(name='motdParent', parent=self, align=uiconst.CENTERBOTTOM, top=borderHeight + 16, width=400, height=64, state=uiconst.UI_HIDDEN)
        motdLabel = uicls.EveLabelMedium(parent=self.motdParent, align=uiconst.CENTER, width=360, state=uiconst.UI_NORMAL)
        self.motdLabel = motdLabel
        uicls.BumpedUnderlay(parent=self.motdParent, name='background')
        versionstr = localization.GetByLabel('UI/Login/Version', versionNumber=GetVersion())
        vers = uicls.EveLabelSmall(text=versionstr, parent=self, left=6, top=6, idx=0, state=uiconst.UI_NORMAL)
        tabs = [[localization.GetByLabel('UI/Login/Settings'),
          None,
          self,
          None,
          ('settings',)], [localization.GetByLabel('UI/Login/EULA/EULAHeader'),
          self.eulaParent,
          self,
          None,
          ('eula',)]]
        self.pushButtons = uicls.PushButtonGroup(parent=bottomPar, align=uiconst.CENTERTOP, idx=0, top=-4)
        self.pushButtons.Startup(tabs)
        self.pushButtons.OnNoneSelected = self.OnPushButtonNoneSelected
        if boot.region == 'optic':
            self.eulaCRC = zlib.adler32(str(boot.version))
        else:
            self.eulaCRC = zlib.adler32(buffer(self.GetEulaCCP()))
        eulaAgreed = bool(settings.public.generic.Get('eulaCRC', None) == self.eulaCRC)
        if not eulaAgreed:
            self.GetEulaConfirmation()
        else:
            if pushBtnArgs:
                self.pushButtons.SelectPanelByArgs(pushBtnArgs)
            uthread.pool('Login::Fetching ads', self.CheckAds, bool(pushBtnArgs))
            uthread.new(self.LoadMotd, bool(pushBtnArgs))
            if trinity.app.IsActive():
                if settings.public.ui.Get('username', ''):
                    uicore.registry.SetFocus(self.passwordEditCtrl)
                else:
                    uicore.registry.SetFocus(self.usernameEditCtrl)
        if boot.region != 'optic':
            esrbNoticeHeight = 70
            esrbNoticeWidth = 200
            allowedSizes = [1.0, 0.9, 0.8]
            desktopWidth = uicore.desktop.width
            useHeight = int(esrbNoticeHeight * 0.7)
            useWidth = int(esrbNoticeWidth * 0.7)
            for multiplier in allowedSizes:
                tempWidth = esrbNoticeWidth * multiplier
                if tempWidth <= desktopWidth * 0.11:
                    useWidth = int(tempWidth)
                    useHeight = int(esrbNoticeHeight * multiplier)
                    break

            cont = uicls.Container(name='esrbParent', parent=bottomArea, align=uiconst.TOPLEFT, top=editstop, width=useWidth, height=useHeight, state=uiconst.UI_NORMAL, idx=0, left=20)
            sprite = uicls.Sprite(name='ESRB', parent=cont, align=uiconst.TOALL, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 1.0), lockAspect=1, texturePath='res:/UI/Texture/ESRBnotice.dds')
            sprite.rectWidth = esrbNoticeWidth
            sprite.rectHeight = esrbNoticeHeight
            uthread.new(uix.FadeCont, cont, 0, after=6000, fadeTime=500.0)
예제 #9
0
 def Prepare_Background_(self, *args):
     self.sr.underlay = uicls.WindowUnderlay(parent=self,
                                             transparent=False,
                                             padding=(0, 0, 0, 0))
예제 #10
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     pad = self.pad = 3
     self.main = uicls.Container(parent=self,
                                 name='main',
                                 pos=(0, 0, 0, 0),
                                 padding=(pad, pad, pad, pad),
                                 state=uiconst.UI_PICKCHILDREN,
                                 align=uiconst.TOALL)
     self.sr.underlay = uicls.WindowUnderlay(parent=self)
     self.sr.underlay.state = uiconst.UI_DISABLED
     self.planetUISvc = sm.GetService('planetUI')
     self.planetSvc = sm.GetService('planetSvc')
     self.pin = attributes.Get('pin', None)
     self.uiEffects = uicls.UIEffects()
     self.showingActionContainer = False
     self.currentRoute = None
     self.showNext = None
     self.lastCalled = None
     self.commodityToRoute = None
     self.buttonTextValue = ''
     self.header = self._DrawAlignTopCont(18, 'headerCont')
     self.closeBtn = uicls.Icon(name='close',
                                icon='ui_38_16_220',
                                parent=self.header,
                                pos=(0, 0, 16, 16),
                                align=uiconst.TOPRIGHT)
     self.closeBtn.OnClick = self.CloseByUser
     self.infoicon = uicls.InfoIcon(typeID=self.pin.typeID,
                                    size=16,
                                    parent=self.header,
                                    align=uiconst.CENTERLEFT,
                                    top=-1)
     self._DrawHorizLine()
     self.infoContRightColAt = 160
     self.infoContPad = 5
     self.infoCont = self._GetInfoCont()
     self._UpdateInfoCont()
     self._DrawHorizLine()
     self.buttonCont = self._DrawAlignTopCont(40, 'buttonCont')
     self._DrawHorizLine()
     self.buttonTextCont = self._DrawAlignTopCont(22, 'buttonTextCont')
     self.buttonText = uicls.EveLabelSmall(parent=self.buttonTextCont,
                                           align=uiconst.CENTER,
                                           color=(1.0, 1.0, 1.0, 1.0),
                                           state=uiconst.UI_NORMAL)
     self.buttonTextCont.height = max(22, self.buttonText.textheight)
     self.actionCont = self._DrawAlignTopCont(0,
                                              'actionCont',
                                              padding=(3, 0, 3, 3))
     captionTxt = self._GetPinName()
     caption = uicls.EveLabelSmall(parent=self.header,
                                   text=captionTxt,
                                   state=uiconst.UI_DISABLED)
     caption.left = 20
     caption.top = 2
     dw = uicore.desktop.width
     dh = uicore.desktop.height
     self.default_height = self.header.height + self.infoCont.height + self.infoContPad * 2 + self.buttonCont.height + self.actionCont.height + self.pad * 2 + self.buttonTextCont.height
     self.height = self.default_height
     self.width = self.default_width
     self.left = settings.user.ui.Get('planetContPositionX',
                                      (dw - self.width) / 2)
     self.top = settings.user.ui.Get('planetContPositionY',
                                     (dh - self.height) / 2)
     if self.left < 0:
         self.left = 0
     elif self.left > dw - self.width:
         self.left = dw - self.width
     if self.top < 0:
         self.top = 0
     elif self.top > dh - self.height:
         self.top = dh - self.height
     self.LoadActionButtons(self._GetActionButtons())
     self.uiEffects.MorphUI(self,
                            'opacity',
                            1.0,
                            time=250.0,
                            float=1,
                            newthread=1,
                            maxSteps=1000)
     self.updateInfoContTimer = base.AutoTimer(100, self._UpdateInfoCont)
     sm.GetService('audio').SendUIEvent(
         'wise:/msg_pi_pininteraction_open_play')
예제 #11
0
파일: eveWindow.py 프로젝트: R4M80MrX/eve-1
 def Prepare_Background_(self):
     self.sr.underlay = uicls.WindowUnderlay(parent=self)
     self.sr.underlay.SetState(uiconst.UI_DISABLED)