def LoadMarkerTooltipPanel(self, tooltipPanel, *args, **kwds):
        tooltipPanel.state = uiconst.UI_NORMAL
        tooltipPanel.columns = 1
        tooltipPanel.margin = 2
        scrollContainer = ScrollContainer(parent=tooltipPanel,
                                          pos=(0, 0, 200, 200),
                                          align=uiconst.TOPLEFT)
        self.tooltipScrollContainer = weakref.ref(scrollContainer)
        grid = LayoutGrid(parent=scrollContainer)
        grid.OnGridSizeChanged = self.OnGridSizeChanged
        grid.cellPadding = 4
        grid.state = uiconst.UI_NORMAL
        grid.columns = 3
        if self.overlapMarkers:
            sortList = []
            for markerObject in self.overlapMarkers:
                if getattr(markerObject, 'celestialData', None):
                    label = cfg.evelocations.Get(
                        markerObject.celestialData.itemID).name
                    sortList.append(((markerObject.celestialData.groupID,
                                      label.lower()), markerObject))
                else:
                    sortList.append(((0, 0), markerObject))

            for _label, markerObject in sorted(sortList):
                grid.AddRow(rowClass=CelestialTooltipRow,
                            markerObject=markerObject)

        grid.AddRow(rowClass=CelestialTooltipRow, markerObject=self)
        scrollContainer.ScrollToVertical(1.0)
        uthread.new(self.UpdateTooltipPosition, tooltipPanel)
 def LoadTooltip(self, bracket, overlaps, boundingBox, overlapSites, *args, **kwds):
     self.overlaps = overlaps
     self.overlapSites = overlapSites
     self.scrollEnabled = False if self.GetNumberOfBrackets() <= 15 else True
     bracket.SetOrder(0)
     self.SetBackgroundAlpha(TOOLTIP_OPACITY)
     isFloating = bracket.IsFloating()
     if isFloating:
         self.isCompact = settings.user.ui.Get('bracketmenu_floating', True)
     else:
         self.isCompact = settings.user.ui.Get('bracketmenu_docked', False)
     self.LoadGeneric1ColumnTemplate()
     scroll = ScrollContainer(align=uiconst.TOPLEFT, parent=self)
     scroll.isTabStop = False
     scroll.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
     scroll.verticalScrollBar.width = 3
     self.scroll = scroll
     subGrid = LayoutGrid(parent=scroll, align=uiconst.TOPLEFT, columns=1 if self.isCompact else 3, name='bracketTooltipSubGrid')
     self.subGrid = subGrid
     if self.isCompact:
         self.sideContainer = BracketTooltipSidePanel(align=uiconst.TOPLEFT, parent=self.parent, idx=self.parent.children.index(self))
         self.sideContainer.display = False
         uthread.new(self.UpdateSideContainer)
     self.LoadEntries()
     self.state = uiconst.UI_NORMAL
Example #3
0
    def LoadTooltip(self, *args, **kwds):
        if self.owner.markerObject.markerHandler.IsMarkerPickOverridden():
            return
        sortList = []
        overlapMarkers = self.owner.markerObject.markerHandler.GetIntersectingMarkersForMarker(
            self.owner.markerObject)
        if overlapMarkers:
            for markerObject in overlapMarkers:
                if not markerObject.tooltipRowClass:
                    continue
                sortList.append(
                    (markerObject.GetOverlapSortValue(), markerObject))

        if len(sortList) == 1:
            return
        self.overlappingMarkers = sortList
        self.SetBackgroundAlpha(TOOLTIP_OPACITY)
        self.margin = 3
        scroll = ScrollContainer(align=uiconst.TOPLEFT, parent=self)
        scroll.isTabStop = False
        scroll.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
        scroll.verticalScrollBar.width = 3
        self.scroll = scroll
        subGrid = LayoutGrid(parent=scroll,
                             align=uiconst.TOPLEFT,
                             columns=1,
                             name='markersTooltipSubGrid')
        self.subGrid = subGrid
        self.sideContainer = BracketTooltipSidePanel(
            align=uiconst.TOPLEFT,
            parent=self.parent,
            idx=self.parent.children.index(self))
        self.sideContainer.display = False
        uthread.new(self.UpdateSideContainer)
        self.LoadEntries()
    def LoadTooltip(self, *args, **kwds):
        if self.owner.markerObject.markerHandler.IsMarkerPickOverridden():
            return
        sortList = []
        overlapMarkers = self.owner.markerObject.markerHandler.GetIntersectingMarkersForMarker(self.owner.markerObject)
        if overlapMarkers:
            for markerObject in overlapMarkers:
                if not markerObject.tooltipRowClass:
                    continue
                sortList.append((markerObject.GetOverlapSortValue(), markerObject))

        if len(sortList) == 1:
            return
        self.overlappingMarkers = sortList
        self.SetBackgroundAlpha(TOOLTIP_OPACITY)
        self.margin = 3
        scroll = ScrollContainer(align=uiconst.TOPLEFT, parent=self)
        scroll.isTabStop = False
        scroll.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
        scroll.verticalScrollBar.width = 3
        self.scroll = scroll
        subGrid = LayoutGrid(parent=scroll, align=uiconst.TOPLEFT, columns=1, name='markersTooltipSubGrid')
        self.subGrid = subGrid
        self.sideContainer = BracketTooltipSidePanel(align=uiconst.TOPLEFT, parent=self.parent, idx=self.parent.children.index(self))
        self.sideContainer.display = False
        uthread.new(self.UpdateSideContainer)
        self.LoadEntries()
 def LoadTooltip(self, bracket, overlaps, boundingBox, overlapSites, *args,
                 **kwds):
     self.overlaps = overlaps
     self.overlapSites = overlapSites
     self.scrollEnabled = False if self.GetNumberOfBrackets(
     ) <= 15 else True
     bracket.SetOrder(0)
     self.SetBackgroundAlpha(TOOLTIP_OPACITY)
     isFloating = bracket.IsFloating()
     if isFloating:
         self.isCompact = settings.user.ui.Get('bracketmenu_floating', True)
     else:
         self.isCompact = settings.user.ui.Get('bracketmenu_docked', False)
     self.LoadGeneric1ColumnTemplate()
     scroll = ScrollContainer(align=uiconst.TOPLEFT, parent=self)
     scroll.isTabStop = False
     scroll.verticalScrollBar.align = uiconst.TORIGHT_NOPUSH
     scroll.verticalScrollBar.width = 3
     self.scroll = scroll
     subGrid = LayoutGrid(parent=scroll,
                          align=uiconst.TOPLEFT,
                          columns=1 if self.isCompact else 3,
                          name='bracketTooltipSubGrid')
     self.subGrid = subGrid
     if self.isCompact:
         self.sideContainer = BracketTooltipSidePanel(
             align=uiconst.TOPLEFT,
             parent=self.parent,
             idx=self.parent.children.index(self))
         self.sideContainer.display = False
         uthread.new(self.UpdateSideContainer)
     self.LoadEntries()
     self.state = uiconst.UI_NORMAL
Example #6
0
 def MakeColumn3(self, columnWidth):
     if session.charid:
         column = self.AddColumn(columnWidth, name='col3')
         uix.GetContainerHeader(localization.GetByLabel(
             'UI/SystemMenu/GeneralSettings/ColorTheme'),
                                column,
                                xmargin=1)
         self.AppendToColumn(
             [('slider', ('windowTransparency', ('user', 'ui'),
                          1.0), 'UI/SystemMenu/GeneralSettings/Transparent',
               (0.0, 1.0), 120), ('toppush', 6),
              ('checkbox', ('enableWindowBlur', ('char', 'windows'), 1),
               localization.GetByLabel(
                   'UI/SystemMenu/GeneralSettings/General/EnableWindowBlur')
               ),
              ('checkbox', ('shiptheme', ('char', 'windows'), 0),
               localization.GetByLabel(
                   'UI/SystemMenu/GeneralSettings/General/ShipTheme')),
              ('toppush', 8)], column)
         myScrollCont = ScrollContainer(name='myScrollCont',
                                        parent=column,
                                        align=uiconst.TOALL)
         if settings.char.windows.Get('shiptheme', False):
             myScrollCont.state = uiconst.UI_DISABLED
             myScrollCont.opacity = 0.3
         for themeID, _, _ in THEMES:
             ColorSettingEntry(parent=myScrollCont, themeID=themeID)
 def _ConstructLayout(self):
     button = Button(parent=self,
                     label='Refresh Conditions',
                     func=self.FetchData,
                     align=uiconst.TOTOP,
                     padBottom=4)
     self.scrollContainer = ScrollContainer(
         name='achievementScrollContainer',
         align=uiconst.TOALL,
         parent=self)
Example #8
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.marketQuoteSvc = sm.GetService('marketQuote')
     self.InitializeVariables(attributes)
     self.SetCaption(GetByLabel(self.captionTextPath))
     self.scope = 'station_inflight'
     self.SetTopparentHeight(0)
     self.mainCont = mainCont = Container(parent=self.sr.main,
                                          name='mainCont',
                                          padding=4)
     self.infoCont = Container(parent=mainCont,
                               name='bottomCont',
                               align=uiconst.TOBOTTOM,
                               height=88,
                               padTop=4)
     Line(parent=self.infoCont, align=uiconst.TOTOP)
     self.bottomLeft = Container(parent=self.infoCont,
                                 name='bottomLeft',
                                 padLeft=6,
                                 padTop=6)
     self.bottomRight = Container(parent=self.infoCont,
                                  name='bottomRight',
                                  align=uiconst.TORIGHT,
                                  width=250,
                                  padRight=6,
                                  padTop=6)
     self.dropCont = Container(parent=mainCont,
                               name='dropCont',
                               align=uiconst.TOTOP,
                               height=28,
                               state=uiconst.UI_NORMAL,
                               padBottom=4)
     self.dropLabel = EveCaptionSmall(text=GetByLabel(self.dropLabelPath),
                                      parent=self.dropCont,
                                      align=uiconst.CENTER)
     self.dropLabel.opacity = 0.6
     self.fakeItemsCont = Container(parent=self.dropCont,
                                    align=uiconst.TOALL,
                                    clipChildren=True)
     self.locationCont = Container(parent=mainCont,
                                   name='locationCont',
                                   align=uiconst.TOTOP)
     scrollCont = Container(parent=mainCont, name='scrollCont')
     self.itemsScroll = ScrollContainer(parent=scrollCont, id=self.scrollId)
     btnGroup = ButtonGroup(parent=self.sr.main, idx=0, line=False)
     btnGroup.AddButton(GetByLabel(self.tradeTextPath),
                        self.PerformTrade,
                        isDefault=self.tradeOnConfirm)
     btnGroup.AddButton(GetByLabel('UI/Generic/Cancel'), self.Cancel)
     self.DrawNumbers()
     corpAcctName = self._CanTradeForCorp()
     if corpAcctName is not None:
         self.DrawCheckBox(corpAcctName)
     self.globalDragHover = uicore.event.RegisterForTriuiEvents(
         uiconst.UI_MOUSEHOVER, self.OnGlobalMouseHover)
Example #9
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.taskMap = {}
     self.controller = None
     self.buttonCont = Container(parent=self.sr.main,
                                 name='buttonbar',
                                 align=uiconst.TOTOP,
                                 height=24,
                                 clipChildren=True)
     GradientSprite(bgParent=self.buttonCont,
                    rotation=-math.pi / 2,
                    rgbData=[(0, (1.0, 1.0, 1.3))],
                    alphaData=[(0.6, 0.0), (1.0, 0.05)])
     self.clockCont = Container(parent=self.sr.main,
                                name='clockbar',
                                align=uiconst.TOTOP,
                                height=24,
                                clipChildren=True)
     GradientSprite(bgParent=self.buttonCont,
                    rotation=-math.pi / 2,
                    rgbData=[(0, (1.0, 1.0, 1.3))],
                    alphaData=[(0.6, 0.0), (1.0, 0.05)])
     self.lastUpdateTime = gametime.GetWallclockTime()
     self.lastResetTime = gametime.GetWallclockTime()
     self.currentTimeLabel = eveLabel.EveLabelMedium(parent=self.clockCont,
                                                     text='',
                                                     left=8)
     self.lastUpdateTimeLabel = eveLabel.EveLabelMedium(
         parent=self.clockCont, text='', left=158)
     self.lastResetTimeLabel = eveLabel.EveLabelMedium(
         parent=self.clockCont, text='', left=258)
     self.leftCont = DragResizeCont(
         name='leftCont',
         parent=self.sr.main,
         align=uiconst.TOLEFT_PROP,
         settingsID='BehaviorDebugWindowLeftContent',
         minSize=0.2,
         maxSize=0.8,
         defaultSize=0.5)
     GradientSprite(bgParent=self.leftCont,
                    rotation=0,
                    rgbData=[(0, (1.0, 1.0, 1.3))],
                    alphaData=[(0.8, 0.0), (1.0, 0.05)])
     self.mainScroll = ScrollContainer(name='behaviortree',
                                       parent=self.leftCont.mainCont,
                                       align=uiconst.TOALL,
                                       padding=(4, 4, 4, 4))
     self.blackboardScroll = ScrollContainer(name='blackboards',
                                             parent=self.sr.main,
                                             padding=(4, 4, 4, 4))
     GradientSprite(bgParent=self.blackboardScroll,
                    rotation=0,
                    rgbData=[(0, (1.0, 1.0, 1.3))],
                    alphaData=[(0.8, 0.0), (1.0, 0.05)])
     self.timeUpdateTimer = AutoTimer(1000, self._TimeUpdater)
Example #10
0
 def ApplyAttributes(self, attributes):
     Container.ApplyAttributes(self, attributes)
     self.structureProfileController = attributes.structureProfileController
     self.structureBrowserController = attributes.structureBrowserController
     self.ChangeSignalConnection(connect=True)
     self.categoryID = self.structureBrowserController.GetSelectedCategory()
     self.categoryTypeCont = CategoryTypeCont(parent=self)
     self.settingsParent = ScrollContainer(parent=self, name='profileParent', align=uiconst.TOALL)
     self.fillUnderlay = FillThemeColored(bgParent=self.settingsParent, colorType=uiconst.COLORTYPE_UIBASECONTRAST)
     self.settingSections = []
     self.LoadCurrentCategory()
     self.draggingNodes = False
     sm.RegisterNotify(self)
Example #11
0
 def Layout(self):
     self.HideHeader()
     self.contentCont = Container(parent=self.GetMainArea(),
                                  align=uiconst.TOALL)
     topCont = Container(parent=self.contentCont,
                         align=uiconst.TOTOP,
                         height=90,
                         top=10)
     SkillExtractorBar(parent=topCont,
                       align=uiconst.CENTER,
                       state=uiconst.UI_NORMAL,
                       width=250,
                       controller=self.controller)
     middleCont = Container(parent=self.contentCont,
                            align=uiconst.TOALL,
                            padding=(8, 0, 8, 8))
     self.filterCont = Container(parent=middleCont,
                                 align=uiconst.TOTOP,
                                 height=26,
                                 opacity=0.0)
     SkillFilterMenu(
         parent=self.filterCont,
         align=uiconst.CENTERRIGHT,
         settings=self.filterSettings,
         hint=localization.GetByLabel('UI/SkillTrading/FilterSettings'))
     SkillFilterEdit(parent=self.filterCont,
                     align=uiconst.CENTERRIGHT,
                     left=20,
                     filterSettings=self.filterSettings)
     self.skillScroll = ScrollContainer(parent=middleCont,
                                        align=uiconst.TOALL,
                                        showUnderlay=True,
                                        opacity=0.0)
     self.loadingPanel = Container(parent=middleCont,
                                   align=uiconst.CENTER,
                                   state=uiconst.UI_DISABLED,
                                   width=250,
                                   height=150)
     LoadingWheel(parent=self.loadingPanel, align=uiconst.CENTERTOP)
     text = localization.GetByLabel('UI/SkillTrading/LoadingSkills')
     EveHeaderMedium(parent=self.loadingPanel,
                     align=uiconst.TOTOP,
                     top=50,
                     text='<center>%s</center>' % text)
     self.messagePanel = ContainerAutoSize(parent=self.GetMainArea(),
                                           align=uiconst.CENTER,
                                           alignMode=uiconst.TOTOP,
                                           width=300,
                                           opacity=0.0,
                                           idx=0)
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.marketQuoteSvc = sm.GetService('marketQuote')
     self.InitializeVariables(attributes)
     self.SetCaption(GetByLabel(self.captionTextPath))
     self.scope = 'station_inflight'
     self.SetTopparentHeight(0)
     mainCont = Container(parent=self.sr.main, name='mainCont', padding=4)
     self.infoCont = Container(parent=mainCont, name='bottomCont', align=uiconst.TOBOTTOM, height=88, padTop=4)
     Line(parent=self.infoCont, align=uiconst.TOTOP)
     self.bottomLeft = Container(parent=self.infoCont, name='bottomLeft', padLeft=6, padTop=6)
     self.bottomRight = Container(parent=self.infoCont, name='bottomRight', align=uiconst.TORIGHT, width=250, padRight=6, padTop=6)
     self.dropCont = Container(parent=mainCont, name='dropCont', align=uiconst.TOTOP, height=28, state=uiconst.UI_NORMAL, padBottom=4)
     self.dropLabel = EveCaptionSmall(text=GetByLabel(self.dropLabelPath), parent=self.dropCont, align=uiconst.CENTER)
     self.dropLabel.opacity = 0.6
     self.fakeItemsCont = Container(parent=self.dropCont, align=uiconst.TOALL, clipChildren=True)
     self.locationCont = Container(parent=mainCont, name='locationCont', align=uiconst.TOTOP)
     scrollCont = Container(parent=mainCont, name='scrollCont')
     self.itemsScroll = ScrollContainer(parent=scrollCont, id=self.scrollId)
     btnGroup = ButtonGroup(parent=self.sr.main, idx=0, line=False)
     btnGroup.AddButton(GetByLabel(self.tradeTextPath), self.PerformTrade, isDefault=self.tradeOnConfirm)
     btnGroup.AddButton(GetByLabel('UI/Generic/Cancel'), self.Cancel)
     self.DrawNumbers()
     corpAcctName = self._CanTradeForCorp()
     if corpAcctName is not None:
         self.DrawCheckBox(corpAcctName)
     self.globalDragHover = uicore.event.RegisterForTriuiEvents(uiconst.UI_MOUSEHOVER, self.OnGlobalMouseHover)
Example #13
0
 def _construct_season(self):
     if self.season_container and not self.season_container.destroyed:
         return
     self.season_container = Container(
         name='season_container',
         parent=self,
         align=uiconst.TOTOP,
         height=uicore.desktop.height - SEASON_TITLE_HEIGHT -
         FLOATING_NEWS_HEIGHT - SEASON_EXPANDER_HEIGHT -
         CHALLENGE_ADDITIONAL_PADDING,
         bgColor=util.Color.BLACK if self.hide_season else None,
         opacity=0 if self.hide_season else 1)
     self.season_container.display = not self.hide_season
     self.expander_bottom_line.display = self.hide_season
     add_base_border_line_to_container(self.season_container,
                                       uiconst.TOLEFT)
     add_base_border_line_to_container(self.season_container,
                                       uiconst.TOBOTTOM)
     self.season_container_scroll = ScrollContainer(
         name='season_container_scroll',
         parent=self.season_container,
         align=uiconst.TOTOP,
         height=self.season_container.height)
     self._construct_season_details(
         parent_container=self.season_container_scroll)
     self._construct_challenges(
         parent_container=self.season_container_scroll)
Example #14
0
 def ConstructOutputSection(self):
     self.CloseOutputSection()
     blue.pyos.synchro.Sleep(1000)
     self.CloseOutputSection()
     self.outputSection = Container(name='outputSection',
                                    parent=self.mainContainer,
                                    align=uiconst.TOTOP_PROP,
                                    height=0.5,
                                    padding=(5, 0, 5, 0))
     self.outputHeader = Container(name='outputHeader',
                                   parent=self.outputSection,
                                   align=uiconst.TOTOP,
                                   height=50)
     Label(parent=self.outputHeader,
           text=GetByLabel(
               'UI/Inflight/SpaceComponents/ItemTrader/DeliveredItems',
               itemCount=2),
           fontsize=25,
           align=uiconst.CENTER)
     Line(parent=self.outputHeader, align=uiconst.TOBOTTOM)
     self.outputListSection = ScrollContainer(name='outputListSection',
                                              parent=self.outputSection,
                                              align=uiconst.TOTOP,
                                              height=128)
     self.PopulateItemsToScroll(self.outputListSection,
                                self.itemTrader.GetOutputItems())
Example #15
0
    def ApplyAttributes(self, attributes):
        uicontrols.Window.ApplyAttributes(self, attributes)
        self.SetTopparentHeight(64)
        self.SetWndIcon(self.default_iconNum)
        uicontrols.WndCaptionLabel(text='EVEModX Manager',
                                   parent=self.sr.topParent,
                                   align=uiconst.RELATIVE,
                                   subcaption='Version: ' + settings.VERSION)
        self.installedMods = Container(name='installedMods',
                                       parent=self.sr.main)
        self.modRepo = Container(name='modRepo', parent=self.sr.main)
        self.modScroll = ScrollContainer(name='modScroll',
                                         parent=self.installedMods,
                                         align=uiconst.TOALL,
                                         padding=const.defaultPadding,
                                         showUnderlay=True)
        self.tabs = uicontrols.TabGroup(name='tabs',
                                        parent=self.sr.main,
                                        tabs=[('Installed Mods',
                                               self.installedMods, self,
                                               'installedMods'),
                                              ('Mod Repository', self.modRepo,
                                               self, 'modRepo')],
                                        idx=0)

        for mod_name, mod_obj in sorted(
                sm.GetService('EVEModXSvc').mods.iteritems()):
            ModEntry(parent=self.modScroll, data=mod_obj)
 def ApplyAttributes(self, attributes):
     BaseAdvancedTimerHint.ApplyAttributes(self, attributes)
     self.mainText.text = localization.GetByLabel(
         'UI/Crimewatch/Timers/ActiveBoosters')
     self.entryContainer = ScrollContainer(parent=self, align=uiconst.TOTOP)
     self.LoadData()
     uthread.new(self.UpdateTimer)
Example #17
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.SetWndIcon(fullPath='res:/UI/Texture/icons/38_16_224.png',
                     mainTop=-8)
     self.sr.clippedIcon = Sprite(
         parent=self.sr.iconClipper,
         name='windowIcon',
         pos=(-22, -36, 150, 150),
         texturePath='res:/ui/Texture/WindowIcons/help.png',
         opacity=0.1)
     self.SetTopparentHeight(0)
     termID = attributes.termID
     self.history = HistoryBuffer()
     self.headerCont = Container(name='headerCont',
                                 parent=self.sr.main,
                                 align=uiconst.TOTOP,
                                 height=70)
     categories = GetCategories()
     self.podGuideNavigation = PodGuideNavigation(
         name='podGuideNavigation',
         parent=self.headerCont,
         align=uiconst.TOALL,
         categories=categories,
         callback=self.LoadPanelByID)
     self.CustomizeHeader()
     self.contentCont = ScrollContainer(name='contentCont',
                                        parent=self.sr.main,
                                        align=uiconst.TOALL,
                                        padding=4)
     self.SetupContentPanel()
     self.InitializeData()
     if termID:
         self.LoadPanelByID(termID)
Example #18
0
class SettingsCategoryCont(Container):
    __notifyevents__ = ['OnExternalDragInitiated', 'OnExternalDragEnded']

    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        self.structureProfileController = attributes.structureProfileController
        self.structureBrowserController = attributes.structureBrowserController
        self.ChangeSignalConnection(connect=True)
        self.categoryID = self.structureBrowserController.GetSelectedCategory()
        self.categoryTypeCont = CategoryTypeCont(parent=self)
        self.settingsParent = ScrollContainer(parent=self, name='profileParent', align=uiconst.TOALL)
        self.fillUnderlay = FillThemeColored(bgParent=self.settingsParent, colorType=uiconst.COLORTYPE_UIBASECONTRAST)
        self.settingSections = []
        self.LoadCurrentCategory()
        self.draggingNodes = False
        sm.RegisterNotify(self)

    def ChangeSignalConnection(self, connect = True):
        signalAndCallback = [(self.structureBrowserController.on_category_selected, self.LoadCategorySettings)]
        ChangeSignalConnect(signalAndCallback, connect)

    def SetCurrentCategoryID(self, categoryID):
        self.categoryID = categoryID

    def LoadCategorySettings(self, categoryID):
        self.SetCurrentCategoryID(categoryID)
        self.LoadCurrentCategory()

    def LoadCurrentCategory(self):
        self.categoryTypeCont.SetCategoryName(self.categoryID)
        settingsForCategory = structures.SETTINGS_BY_CATEGORY[self.categoryID]
        self.settingsParent.Flush()
        self.settingSections = []
        settingsCont = ContainerAutoSize(parent=self.settingsParent, name='settingsCont', align=uiconst.TOTOP)
        for settingID in settingsForCategory:
            s = SettingSection(parent=settingsCont, align=uiconst.TOTOP, structureProfileController=self.structureProfileController, settingID=settingID)
            self.settingSections.append(s)

    def OnExternalDragInitiated(self, dragSource, dragData):
        if AreGroupNodes(dragData):
            self.draggingNodes = True
            self._DragChanged(initiated=True)

    def OnExternalDragEnded(self):
        if self.draggingNodes:
            self._DragChanged(initiated=False)
        self.draggingNodes = False

    def _DragChanged(self, initiated):
        for s in self.settingSections:
            s.DragChanged(initiated)

    def Close(self):
        self.settingSections = []
        self.ChangeSignalConnection(connect=False)
        self.structureProfileController = None
        self.structureBrowserController = None
        Container.Close(self)
Example #19
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.taskMap = {}
     self.nodeCount = 0
     self.controller = None
     self.mainScroll = ScrollContainer(name='myScrollCont',
                                       parent=self.sr.main,
                                       align=uiconst.TOALL,
                                       padding=(4, 4, 4, 4))
Example #20
0
 def ApplyAttributes(self, attributes):
     ScrollContainer.ApplyAttributes(self, attributes)
     self.mainCont.Close()
     self.mainCont = Container(name='mainCont',
                               parent=self.clipCont,
                               state=uiconst.UI_NORMAL,
                               align=uiconst.TOPLEFT)
     self.mainContTopHeight = (0, 0)
     self.mainCont._OnResize = self._OnMainContResize
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.SetCaption(GetByLabel('UI/Inventory/ItemActions/MultiSell'))
     self.scope = 'station_inflight'
     self.SetTopparentHeight(0)
     mainCont = Container(parent=self.sr.main, name='mainCont', padding=4)
     infoCont = Container(parent=mainCont, name='bottomCont', align=uiconst.TOBOTTOM, height=88, padTop=4)
     Line(parent=infoCont, align=uiconst.TOTOP)
     self.bottomLeft = Container(parent=infoCont, name='bottomLeft', padLeft=6, padTop=6)
     self.bottomRight = Container(parent=infoCont, name='bottomRight', align=uiconst.TORIGHT, width=250, padRight=6, padTop=6)
     dropCont = Container(parent=mainCont, name='dropCont', align=uiconst.TOTOP, height=28, state=uiconst.UI_NORMAL, padBottom=4)
     dropCont.OnDropData = self.DropItems
     self.dropLabel = EveCaptionSmall(text=GetByLabel('UI/Market/Marketbase/DropItemsToAdd'), parent=dropCont, align=uiconst.CENTER)
     self.dropLabel.opacity = 0.6
     self.fakeItemsCont = Container(parent=dropCont, align=uiconst.TOALL, clipChildren=True)
     self.itemList = []
     self.preItems = attributes.preItems
     self.itemDict = {}
     self.sellItemList = []
     self.cannotSellItemList = []
     self.itemsNeedRepackaging = []
     self.itemAlreadyInList = []
     self.hasDrawn = False
     self.baseStationID = None
     self.useCorp = None
     self.addItemsThread = None
     scrollCont = Container(parent=mainCont, name='scrollCont')
     self.itemsScroll = ScrollContainer(parent=scrollCont, id='MultiSellScroll')
     self.DefineButtons(uiconst.OKCANCEL, okLabel=GetByLabel('UI/Market/MarketQuote/CommandSell'), okFunc=self.SellItems, cancelFunc=self.Cancel)
     self.DrawNumbers()
     self.DrawCombos()
     durationValue = settings.user.ui.Get('multiSellDuration', 0)
     self.durationCombo.SetValue(durationValue)
     top = 30
     corpAcctName = self._CanSellForCorp()
     if corpAcctName is not None:
         self.DrawCheckBox(corpAcctName)
         top += 18
     self.orderCountLabel = EveLabelSmall(parent=self.bottomLeft, top=top, left=2)
     self.maxCount, self.myOrderCount = self.GetOrderCount()
     if len(self.preItems):
         self.addItemsThread = uthread.new(self.AddPreItems, self.preItems)
     self.UpdateOrderCount()
     self.globalDragHover = uicore.event.RegisterForTriuiEvents(uiconst.UI_MOUSEHOVER, self.OnGlobalMouseHover)
 def _ConstructLayout(self):
     Button(parent=self,
            align=uiconst.TOTOP,
            func=self.ResetAll,
            label='Reset Achievement state',
            padBottom=4)
     self.scrollContainer = ScrollContainer(
         name='achievementScrollContainer',
         align=uiconst.TOALL,
         parent=self)
 def MakeColumn3(self, columnWidth):
     if session.charid:
         column = self.AddColumn(columnWidth, name='col3')
         uix.GetContainerHeader(localization.GetByLabel('UI/SystemMenu/GeneralSettings/ColorTheme'), column, xmargin=1)
         self.AppendToColumn([('slider',
           ('windowTransparency', ('user', 'ui'), 1.0),
           'UI/SystemMenu/GeneralSettings/Transparent',
           (0.0, 1.0),
           120),
          ('toppush', 6),
          ('checkbox', ('enableWindowBlur', ('char', 'windows'), 1), localization.GetByLabel('UI/SystemMenu/GeneralSettings/General/EnableWindowBlur')),
          ('checkbox', ('shiptheme', ('char', 'windows'), 0), localization.GetByLabel('UI/SystemMenu/GeneralSettings/General/ShipTheme')),
          ('toppush', 8)], column)
         myScrollCont = ScrollContainer(name='myScrollCont', parent=column, align=uiconst.TOALL)
         if settings.char.windows.Get('shiptheme', False):
             myScrollCont.state = uiconst.UI_DISABLED
             myScrollCont.opacity = 0.3
         for themeID, _, _ in THEMES:
             ColorSettingEntry(parent=myScrollCont, themeID=themeID)
Example #24
0
class ConditionsContainer(Container):
    default_state = uiconst.UI_PICKCHILDREN
    __notifyevents__ = ['OnAchievementsReset']

    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        self.uiEntries = {}
        self._ConstructLayout()
        sm.RegisterNotify(self)

    def _ConstructLayout(self):
        buttonCont = Container(parent=self, align=uiconst.TOTOP, height=30)
        Button(parent=buttonCont, label='Fetch', func=self.FecthData)
        self.scrollContainer = ScrollContainer(name='achievementScrollContainer', align=uiconst.TOALL, parent=self)

    def AddElement(self, conditionText, conditionCount):
        self.uiEntries[conditionText] = ConditionsEntry(align=uiconst.TOTOP, parent=self.scrollContainer, conditionText=conditionText, conditionCount=conditionCount)

    def UpdateStats(self, characterStats):
        for uiEntry in self.uiEntries.itervalues():
            uiEntry.SetConditionText(uiEntry.conditionText, '-')

        for condText, condCount in characterStats.iteritems():
            uiEntry = self.uiEntries.get(condText, None)
            if not uiEntry:
                continue
            uiEntry.SetConditionText(condText, condCount)

    def RemoveElement(self, conditionText):
        uiEntry = self.uiEntries[conditionText]
        self.scrollContainer._RemoveChild(uiEntry)

    def _PopulateList(self, entries):
        for achievement in entries:
            self.AddElement(achievement)

    def FecthData(self, btn):
        userStats = sm.GetService('achievementSvc').GetDebugStatsFromCharacter(force=True)
        self.UpdateStats(userStats)

    def OnAchievementsReset(self):
        self.FecthData()
Example #25
0
 def Layout(self):
     offer = self.controller.offer
     bottomCont = Container(parent=self, align=uiconst.TOBOTTOM, height=50)
     AurPriceTagLarge(parent=bottomCont, align=uiconst.CENTERLEFT, left=10, amount=offer.price, baseAmount=offer.basePrice)
     if self.controller.balance < self.controller.totalPrice:
         text = localization.GetByLabel('UI/VirtualGoodsStore/BuyAurOnline')
     else:
         text = localization.GetByLabel('UI/VirtualGoodsStore/OfferDetailBuyNowButton')
     self.buyButton = VgsBuyButton(parent=bottomCont, align=uiconst.CENTERRIGHT, left=10, text=text, onClick=self.onBuy)
     scroll = ScrollContainer(parent=self, align=uiconst.TOALL, top=10)
     products = offer.productQuantities.values()
     OfferProductList(parent=scroll, align=uiconst.TOTOP, margin=(10, 0), products=products)
 def _SetupUI(self):
     self.settingsDescriptionRowContainer = Container(name='Settings',
                                                      height=16,
                                                      align=uiconst.TOTOP,
                                                      parent=self,
                                                      padding=(5, 5, 10, 0))
     EveLabelMediumBold(
         name='Settings',
         align=uiconst.TOLEFT,
         parent=self.settingsDescriptionRowContainer,
         text=localization.GetByLabel(
             'Notifications/NotificationSettings/CategorySubscriptions'),
         bold=True)
     Sprite(
         name='popupIcon',
         parent=self.settingsDescriptionRowContainer,
         align=uiconst.TORIGHT,
         texturePath=
         'res:/UI/Texture/classes/Notifications/settingsPopupIcon.png',
         width=16,
         heigh=16,
         hint=localization.GetByLabel(
             'Notifications/NotificationSettings/PopupVisibilityTooltip'))
     Sprite(
         name='visibilityIcon',
         parent=self.settingsDescriptionRowContainer,
         align=uiconst.TORIGHT,
         texturePath=
         'res:/UI/Texture/classes/Notifications/settingsVisibleIcon.png',
         width=16,
         heigh=16,
         hint=localization.GetByLabel(
             'Notifications/NotificationSettings/HistoryVisibilityTooltip'),
         padding=(0, 0, 6, 0))
     self._MakeSeperationLine(self)
     self.scrollList = ScrollContainer(name='scrollContainer',
                                       parent=self,
                                       align=uiconst.TOALL,
                                       padding=(5, 5, 5, 5))
     self.scrollList.OnScrolledVertical = self.VerticalScrollInject
Example #27
0
 def CreateProductLayout(self, offer):
     productContainer = Container(name='productContainer',
                                  parent=self,
                                  align=uiconst.TOTOP,
                                  height=PRODUCTSCROLL_PANEL_HEIGHT)
     productScroll = ScrollContainer(parent=productContainer,
                                     align=uiconst.TOALL,
                                     padTop=16)
     productQuantities = GetSortedTokens(offer.productQuantities)
     for typeID, quantity in productQuantities:
         VgsDetailProduct(parent=productScroll,
                          typeID=typeID,
                          quantity=quantity,
                          onClick=self.previewCallback)
Example #28
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.taskMap = {}
     self.controller = None
     self.buttonCont = Container(parent=self.sr.main,
                                 name='buttonbar',
                                 align=uiconst.TOTOP,
                                 height=24,
                                 clipChildren=True)
     GradientSprite(bgParent=self.buttonCont,
                    rotation=-math.pi / 2,
                    rgbData=[(0, (1.0, 1.0, 1.3))],
                    alphaData=[(0.6, 0.0), (1.0, 0.05)])
     self.CreateToolbar()
     self.leftCont = DragResizeCont(
         name='leftCont',
         parent=self.sr.main,
         align=uiconst.TOLEFT_PROP,
         settingsID='BehaviorDebugWindowLeftContent',
         minSize=0.2,
         maxSize=0.8,
         defaultSize=0.5)
     GradientSprite(bgParent=self.leftCont,
                    rotation=0,
                    rgbData=[(0, (1.0, 1.0, 1.3))],
                    alphaData=[(0.8, 0.0), (1.0, 0.05)])
     self.mainScroll = ScrollContainer(name='behaviortree',
                                       parent=self.leftCont.mainCont,
                                       align=uiconst.TOALL,
                                       padding=(4, 4, 4, 4))
     self.blackboardScroll = ScrollContainer(name='blackboards',
                                             parent=self.sr.main,
                                             padding=(4, 4, 4, 4))
     GradientSprite(bgParent=self.blackboardScroll,
                    rotation=0,
                    rgbData=[(0, (1.0, 1.0, 1.3))],
                    alphaData=[(0.8, 0.0), (1.0, 0.05)])
 def ApplyAttributes(self, attributes):
     uicontrols.ContainerAutoSize.ApplyAttributes(self, attributes)
     self.parentTimer = attributes.get('parentTimer')
     self.timerData = attributes.get('timerData')
     self.GetTime = self.timerData.timerFunc
     self.doUpdates = True
     uicontrols.Frame(bgParent=self,
                      state=uiconst.UI_DISABLED,
                      color=(1.0, 1.0, 1.0, 0.25))
     self.mainText = uicontrols.EveLabelMedium(parent=self,
                                               align=uiconst.TOTOP,
                                               text='',
                                               padding=(8, 8, 8, 8),
                                               state=uiconst.UI_DISABLED)
     self.entryContainer = ScrollContainer(parent=self, align=uiconst.TOTOP)
Example #30
0
 def ConstuctLayout(self):
     self.leftCont = DragResizeCont(name='leftCont', parent=self.sr.main, align=uiconst.TOLEFT_PROP, settingsID='ControlCatalogWindowLeftCont')
     self.infoCont = ContainerAutoSize(name='infoCont', parent=self.sr.main, align=uiconst.TOTOP, padding=6)
     self.topCont = DragResizeCont(name='topCont', parent=self.sr.main, align=uiconst.TOTOP_PROP, settingsID='ControlCatalogWindowSampleCont', minSize=0.3, maxSize=0.9, defaultSize=0.5, clipChildren=True)
     tabCont = ContainerAutoSize(name='tabCont', parent=self.topCont.mainCont, align=uiconst.TOBOTTOM)
     self.mainButtonGroup = ButtonGroup(name='mainButtonGroup', parent=self.sr.main)
     self.editCont = Container(name='editCont', parent=self.sr.main)
     GradientSprite(bgParent=self.leftCont, rotation=0, rgbData=[(0, (1.0, 1.0, 1.3))], alphaData=[(0.8, 0.0), (1.0, 0.05)])
     self.controlScroll = ScrollContainer(parent=self.leftCont)
     self.PopulateScroll()
     self.leftButtonGroup = ButtonGroup(name='leftButtonGroup', parent=self.leftCont, idx=0)
     self.ConstructLeftButtonGroup()
     self.classNameLabel = Label(parent=self.infoCont, align=uiconst.TOTOP, fontsize=15, bold=True)
     self.classDocLabel = EveLabelSmall(parent=self.infoCont, align=uiconst.TOTOP)
     GradientSprite(align=uiconst.TOTOP, parent=self.infoCont, rotation=-math.pi / 2, height=16, padding=(-4, -10, -4, 0), rgbData=[(0, (1.0, 1.0, 1.3))], alphaData=[(0.0, 0.0), (1.0, 0.03)])
     GradientSprite(align=uiconst.TOTOP, parent=tabCont, state=uiconst.UI_DISABLED, rotation=math.pi / 2, height=16, padding=(-4, 0, -4, -10), rgbData=[(0, (1.0, 1.0, 1.3))], alphaData=[(0.0, 0.0), (1.0, 0.03)])
     self.sampleNameLabel = EveLabelSmall(parent=tabCont, align=uiconst.TOTOP, padBottom=5)
     self.tabs = ToggleButtonGroup(parent=Container(parent=tabCont, align=uiconst.TOTOP, height=16), align=uiconst.CENTER, height=16, callback=self.OnTabSelected)
     sampleParent = Container(name='sampleParent', parent=self.topCont.mainCont, clipChildren=True)
     self.sampleCont = ContainerAutoSize(name='sampleCont', parent=sampleParent, align=uiconst.CENTER)
     self.codeEdit = EditPlainText(parent=self.editCont, align=uiconst.TOALL, fontcolor=(1, 1, 1, 1), ignoreTags=True)
     self.codeEdit.OnKeyDown = self.OnCodeEditKeyDown
     self.ConstructMainButtonGroup()
     uthread.new(self._SpyOnSampleCodeReloadThread)
Example #31
0
 def Layout(self):
     self.MakeUnMinimizable()
     self.HideHeader()
     self.MakeUnResizeable()
     self.container = ContainerAutoSize(parent=self.GetMainArea(), align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, padding=(self.PADDING,
      self.PADDING,
      self.PADDING,
      self.PADDING), callback=self.OnContainerResized)
     text = GetByLabel('UI/Inventory/AssetSafety/DeliverToStation')
     header = EveLabelLargeBold(parent=self.container, align=uiconst.TOTOP, text=text)
     self.explanationLabel = EveLabelMedium(parent=self.container, align=uiconst.TOTOP, text='', color=self.GRAY_COLOR, padding=(0, 0, 0, 15), state=uiconst.UI_NORMAL)
     Line(parent=self.container, align=uiconst.TOTOP, color=self.LINE_COLOR)
     self.sameSolarSystemParent = ScrollContainer(parent=self.container, align=uiconst.TOTOP)
     self.sameSolarSystem = ContainerAutoSize(parent=self.sameSolarSystemParent, align=uiconst.TOTOP, alignMode=uiconst.TOTOP)
     self.nearestStationLabel = EveLabelMedium(parent=self.container, align=uiconst.TOTOP, text='', color=self.GRAY_COLOR, padding=(0, 0, 0, 0))
     self.closeButton = Button(parent=self.container, label=GetByLabel('UI/Generic/Cancel'), func=self.Close, align=uiconst.TOTOP, fontsize=13, padding=(220, 10, 220, 0))
     uicore.animations.FadeTo(self.container, startVal=0.0, endVal=1.0, duration=0.5)
class ConditionsContainer(Container):
    def ApplyAttributes(self, attributes):
        Container.ApplyAttributes(self, attributes)
        self.uiEntries = {}
        self._ConstructLayout()

    def _ConstructLayout(self):
        button = Button(parent=self,
                        label='Refresh Conditions',
                        func=self.FetchData,
                        align=uiconst.TOTOP,
                        padBottom=4)
        self.scrollContainer = ScrollContainer(
            name='achievementScrollContainer',
            align=uiconst.TOALL,
            parent=self)

    def FlushData(self):
        self.uiEntries = {}
        self.scrollContainer.Flush()

    def AddElement(self, conditionText, conditionCount):
        self.uiEntries[conditionText] = ConditionsEntry(
            align=uiconst.TOTOP,
            parent=self.scrollContainer,
            conditionText=conditionText,
            conditionCount=conditionCount)

    def UpdateStats(self, characterStats):
        for uiEntry in self.uiEntries.itervalues():
            uiEntry.SetConditionText(uiEntry.conditionText, '-')

        for condText, condCount in characterStats.iteritems():
            uiEntry = self.uiEntries.get(condText, None)
            if not uiEntry:
                continue
            uiEntry.SetConditionText(condText, condCount)

    def FetchData(self, *args):
        userStats = sm.GetService('achievementSvc').GetDebugStatsFromCharacter(
            force=True)
        self.UpdateStats(userStats)
Example #33
0
 def Layout(self):
     scroll = ScrollContainer(parent=self,
                              align=uiconst.TOALL,
                              pushContent=False)
     VgsHeaderLarge(parent=scroll,
                    align=uiconst.TOTOP,
                    padding=(self.PADDING, self.PADDING, self.PADDING, 0),
                    text=localization.GetByLabel(
                        'UI/VirtualGoodsStore/Purchase/ChooseOffer'))
     VgsLabelSmall(parent=scroll,
                   align=uiconst.TOTOP,
                   padding=(self.PADDING, 0, self.PADDING, self.PADDING),
                   text=localization.GetByLabel(
                       'UI/VirtualGoodsStore/Purchase/ChooseOfferSubtext'))
     sortedOffers = self._SortOffers(self.offers)
     for offer in sortedOffers:
         OfferEntry(parent=scroll,
                    align=uiconst.TOTOP,
                    padding=(self.PADDING, 0, self.PADDING, self.PADDING),
                    offer=offer,
                    onClick=lambda offer=offer: self.PickOffer(offer))
Example #34
0
 def ApplyAttributes(self, attributes):
     Window.ApplyAttributes(self, attributes)
     self.SetWndIcon(self.iconNum, mainTop=-8)
     self.sr.mainIcon.state = uiconst.UI_NORMAL
     self.sr.mainIcon.GetDragData = self.GetDragDataForIcon
     self.sr.mainIcon.isDragObject = True
     self.groupID = attributes.groupID
     self.groupInfo = GetGroupInfo(self.groupID)
     self.groupName = self.groupInfo['name']
     wndCaption = WndCaptionLabel(text=self.groupName,
                                  parent=self.sr.topParent,
                                  align=uiconst.RELATIVE)
     scrollContainer = ScrollContainer(parent=self.sr.main,
                                       padding=(10, 0, 10, 10))
     self.contentCont = ContainerAutoSize(parent=scrollContainer,
                                          align=uiconst.TOTOP,
                                          columns=1)
     self.LoadContentCont()
     w, h = self.contentCont.GetAbsoluteSize()
     newHeight = h + self.sr.topParent.height + 40
     self.height = newHeight
class SellBuyItemsWindow(Window):
    __notifyevents__ = ['OnSessionChanged']
    default_width = 520
    default_height = 280
    default_minSize = (default_width, default_height)
    default_windowID = 'SellBuyItemsWindow'
    captionTextPath = 'UI/Inventory/ItemActions/MultiBuy'
    scrollId = 'MultiBuyScroll'
    tradeForCorpSettingConfig = 'buyUseCorp'
    tradeTextPath = 'UI/Market/MarketQuote/CommandSell'
    orderCap = 'MultiSellOrderCap'
    tradeOnConfirm = True
    MAX_PRICE = 9223372036854.0
    corpCheckboxTop = 28
    numbersGridTop = 6
    showTaxAndBrokersFee = True
    dropLabelPath = 'UI/Market/Marketbase/DropItemsToAdd'

    def ApplyAttributes(self, attributes):
        Window.ApplyAttributes(self, attributes)
        self.marketQuoteSvc = sm.GetService('marketQuote')
        self.InitializeVariables(attributes)
        self.SetCaption(GetByLabel(self.captionTextPath))
        self.scope = 'station_inflight'
        self.SetTopparentHeight(0)
        mainCont = Container(parent=self.sr.main, name='mainCont', padding=4)
        self.infoCont = Container(parent=mainCont, name='bottomCont', align=uiconst.TOBOTTOM, height=88, padTop=4)
        Line(parent=self.infoCont, align=uiconst.TOTOP)
        self.bottomLeft = Container(parent=self.infoCont, name='bottomLeft', padLeft=6, padTop=6)
        self.bottomRight = Container(parent=self.infoCont, name='bottomRight', align=uiconst.TORIGHT, width=250, padRight=6, padTop=6)
        self.dropCont = Container(parent=mainCont, name='dropCont', align=uiconst.TOTOP, height=28, state=uiconst.UI_NORMAL, padBottom=4)
        self.dropLabel = EveCaptionSmall(text=GetByLabel(self.dropLabelPath), parent=self.dropCont, align=uiconst.CENTER)
        self.dropLabel.opacity = 0.6
        self.fakeItemsCont = Container(parent=self.dropCont, align=uiconst.TOALL, clipChildren=True)
        self.locationCont = Container(parent=mainCont, name='locationCont', align=uiconst.TOTOP)
        scrollCont = Container(parent=mainCont, name='scrollCont')
        self.itemsScroll = ScrollContainer(parent=scrollCont, id=self.scrollId)
        btnGroup = ButtonGroup(parent=self.sr.main, idx=0, line=False)
        btnGroup.AddButton(GetByLabel(self.tradeTextPath), self.PerformTrade, isDefault=self.tradeOnConfirm)
        btnGroup.AddButton(GetByLabel('UI/Generic/Cancel'), self.Cancel)
        self.DrawNumbers()
        corpAcctName = self._CanTradeForCorp()
        if corpAcctName is not None:
            self.DrawCheckBox(corpAcctName)
        self.globalDragHover = uicore.event.RegisterForTriuiEvents(uiconst.UI_MOUSEHOVER, self.OnGlobalMouseHover)

    def StartAddItemsThread(self):
        if len(self.preItems):
            self.addItemsThread = uthread.new(self.AddPreItems, self.preItems)

    def InitializeVariables(self, attributes):
        self.globalDragHover = None
        self.cannotTradeItemList = []
        self.itemList = []
        self.preItems = attributes.preItems or []
        self.useCorp = None
        self.hasDrawn = False
        self.addItemsThread = None
        self.baseStationID = None

    def DrawNumbers(self):
        self.numbersGrid = LayoutGrid(parent=self.bottomRight, columns=2, align=uiconst.TORIGHT, top=self.numbersGridTop)
        if self.showTaxAndBrokersFee:
            self.brokersFee = EveLabelMedium(text='', padRight=4)
            self.numbersGrid.AddCell(self.brokersFee)
            self.brokersFeeAmt = EveLabelMediumBold(text='', align=uiconst.CENTERRIGHT, padLeft=4)
            self.numbersGrid.AddCell(self.brokersFeeAmt)
            self.salesTax = EveLabelMedium(text='', padRight=4)
            self.numbersGrid.AddCell(self.salesTax)
            self.salesTaxAmt = EveLabelMediumBold(text='', align=uiconst.CENTERRIGHT, padLeft=4)
            self.numbersGrid.AddCell(self.salesTaxAmt)
            spacer = Container(align=uiconst.TOTOP, height=12)
            self.numbersGrid.AddCell(spacer, colSpan=2)
        self.totalAmt = EveLabelLargeBold(text='', align=uiconst.CENTERRIGHT, padLeft=4, state=uiconst.UI_NORMAL)
        self.numbersGrid.AddCell(self.totalAmt, colSpan=2)

    def DrawCheckBox(self, corpAcctName):
        useCorpWallet = settings.user.ui.Get(self.tradeForCorpSettingConfig, False)
        top = self.corpCheckboxTop
        self.useCorp = Checkbox(text=GetByLabel('UI/Market/MarketQuote/UseCorpAccount', accountName=corpAcctName), parent=self.bottomLeft, configName='usecorp', checked=useCorpWallet, callback=self.OnUseCorp, pos=(0,
         top,
         350,
         0), align=uiconst.TOPLEFT)

    def _CanTradeForCorp(self):
        if session.corprole & (corpRoleAccountant | corpRoleTrader):
            corpAcctName = sm.GetService('corp').GetMyCorpAccountName()
            if corpAcctName is not None:
                return corpAcctName

    def OnUseCorp(self, *args):
        if self.useCorp.checked:
            newValue = True
        else:
            newValue = False
        settings.user.ui.Set(self.tradeForCorpSettingConfig, newValue)

    def TradingForCorp(self):
        if self.useCorp:
            useCorp = self.useCorp.checked
        else:
            useCorp = False
        return useCorp

    def DropItems(self, dragObj, nodes):
        pass

    def PerformTrade(self, *args):
        pass

    def UpdateNumbers(self):
        pass

    def GetItems(self):
        return self.itemList

    def AddPreItems(self, preItems):
        pass

    def IsAllowedGuid(self, guid):
        return True

    def DrawDraggedItems(self, dragData):
        if not self.IsAllowedGuid(getattr(dragData[0], '__guid__', None)):
            return
        self.hasDrawn = True
        uicore.animations.FadeOut(self.dropLabel, duration=0.15)
        noOfItems = len(dragData)
        noOfAvailable = math.floor((self.width - 16) / 28)
        for i, dragItem in enumerate(dragData):
            c = Container(parent=self.fakeItemsCont, align=uiconst.TOLEFT, padding=2, width=24)
            if noOfItems > noOfAvailable and i == noOfAvailable - 1:
                icon = Sprite(parent=c, texturePath='res:/UI/Texture/classes/MultiSell/DotDotDot.png', state=uiconst.UI_DISABLED, width=24, height=24, align=uiconst.CENTER)
                icon.SetAlpha(0.6)
                return
            typeID = self.GetTypeIDFromDragItem(dragItem)
            icon = Icon(parent=c, typeID=typeID, state=uiconst.UI_DISABLED)
            icon.SetSize(24, 24)

    def GetTypeIDFromDragItem(self, dragItem):
        getTypeID = dragItem.item.typeID
        return getTypeID

    def OnDropData(self, dragSource, dragData):
        self.ClearDragData()

    def ClearDragData(self):
        self.fakeItemsCont.Flush()
        uicore.animations.FadeIn(self.dropLabel, 0.6, duration=0.3)
        self.hasDrawn = False

    def OnGlobalMouseHover(self, *args, **kw):
        shouldClearDragData = True
        if uicore.IsDragging() and uicore.dragObject:
            mo = uicore.uilib.mouseOver
            if mo == self or mo.IsUnder(self):
                shouldClearDragData = False
                if not self.hasDrawn:
                    self.DrawDraggedItems(uicore.dragObject.dragData)
        if shouldClearDragData:
            self.ClearDragData()
        return True

    def Cancel(self, *args):
        self.Close()

    def Close(self, *args, **kwds):
        Window.Close(self, *args, **kwds)
        if self.addItemsThread:
            self.addItemsThread.kill()
        uicore.event.UnregisterForTriuiEvents(self.globalDragHover)

    def CheckOrderAvailability(self, preItems):
        availableOrders = int(sm.GetService('machoNet').GetGlobalConfig().get(self.orderCap, 100)) - len(self.itemList)
        if len(preItems) > availableOrders:
            eve.Message('CustomNotify', {'notify': GetByLabel('UI/Market/MarketQuote/TooManyItemsForOrder')})
            return preItems[:availableOrders]
        return preItems

    def RemoveItem(self, itemEntry):
        self.itemsScroll._RemoveChild(itemEntry)
        self.itemList.remove(itemEntry)
        self.RemoveItemFromCollection(itemEntry)
        self.UpdateNumbers()
        self.UpdateHeaderCount()

    def RemoveItemFromCollection(self, itemEntry):
        pass

    def DoAddItem(self, item):
        itemEntry = self.GetItemEntry(item)
        self.AddItemToCollection(item, itemEntry)
        itemEntry.state = uiconst.UI_NORMAL
        self.itemsScroll._InsertChild(0, itemEntry)
        self.itemList.append(itemEntry)
        self.UpdateNumbers()
        self.UpdateHeaderCount()
        return itemEntry

    def UpdateHeaderCount(self):
        self.SetCaption('%s (%i) - %s' % (GetByLabel(self.captionTextPath), len(self.itemList), self.GetStationLocationText()))

    def GetStationLocationText(self):
        if self.baseStationID is None:
            return ''
        stationLocation = cfg.evelocations.Get(self.baseStationID).locationName
        return stationLocation

    def DisplayErrorHints(self):
        hintTextList = self.GetErrorHints()
        if hintTextList:
            hintText = '<br>'.join(hintTextList)
            eve.Message('CustomNotify', {'notify': hintText})

    def GetErrorHints(self):
        hintTextList = self.BuildHintTextList(self.cannotTradeItemList, 'UI/Market/MarketQuote/CannotBeSold')
        return hintTextList

    def BuildHintTextList(self, itemList, labelPath):
        hintTextList = []
        if len(itemList):
            text = '<b>%s</b>' % GetByLabel(labelPath)
            hintTextList.append(text)
            for item in itemList:
                hintTextList.append(evetypes.GetName(item.typeID))

        return hintTextList

    def ClearErrorLists(self):
        self.cannotTradeItemList = []
 def __init__(self, *args, **kwargs):
     ScrollContainer.__init__(self, *args, **kwargs)
     self.contentLoader = None
     self.runningScrollUpdate = False
     self.clipCont.clipChildren = False