コード例 #1
0
 def __setPopularItems(self):
     # Generate a list of popular items.
     itemList = self.cr.catalogManager.popularItems.generateList()
     catalogItemList = CatalogItemListGUI(self.phoneGui)
     for item in itemList:
         catalogItemList.addItem(item, 'Popular')
     self.phoneGui.tabButtons['POPULAR_TAB'].setCatalogItemPages(catalogItemList.generatePages())
     # Now that the popular items are set we can show the CatalogGUI
     self.phoneGui.show()
     # We want our default tab to be the popular tab. We need to click it twice to prevent a glitch.
     self.phoneGui.tabButtons['POPULAR_TAB'].tabClicked()
コード例 #2
0
    def __generateCatalogPages(self):
        itemList = base.localAvatar.monthlyCatalog.generateList()
        itemList += base.localAvatar.weeklyCatalog.generateList()
        itemList += base.localAvatar.backCatalog.generateList()

        sortedItems = CatalogItemSorter(itemList).sortItems()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['FURNITURE']:
            catalogItemList.addItem(item, 'Furniture')
        for item in sortedItems['UNSORTED']:
            catalogItemList.addItem(item, 'Unsorted Items')
        self.phoneGui.tabButtons['FURNITURE_TAB'].setCatalogItemPages(
            catalogItemList.generatePages())
        self.phoneGui.tabButtons['FURNITURE_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['EMOTIONS']:
            catalogItemList.addItem(item, 'Emotions')
        self.phoneGui.tabButtons['EMOTE_TAB'].setCatalogItemPages(
            catalogItemList.generatePages())
        self.phoneGui.tabButtons['EMOTE_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['SPECIAL']:
            catalogItemList.addItem(item, 'Special')
        self.phoneGui.tabButtons['SPECIAL_TAB'].setCatalogItemPages(
            catalogItemList.generatePages())
        self.phoneGui.tabButtons['SPECIAL_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['CLOTHING']:
            catalogItemList.addItem(item, 'Clothing')
        self.phoneGui.tabButtons['CLOTHING_TAB'].setCatalogItemPages(
            catalogItemList.generatePages())
        self.phoneGui.tabButtons['CLOTHING_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['PHRASES']:
            catalogItemList.addItem(item, 'Phrases')
        self.phoneGui.tabButtons['PHRASES_TAB'].setCatalogItemPages(
            catalogItemList.generatePages())
        self.phoneGui.tabButtons['PHRASES_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['NAMETAG']:
            catalogItemList.addItem(item, 'Nametag')
        self.phoneGui.tabButtons['NAMETAG_TAB'].setCatalogItemPages(
            catalogItemList.generatePages())
        self.phoneGui.tabButtons['NAMETAG_TAB'].tabClicked()
コード例 #3
0
    def __generateCatalogPages(self):
        itemList = base.localAvatar.monthlyCatalog.generateList()
        itemList += base.localAvatar.weeklyCatalog.generateList()
        itemList += base.localAvatar.backCatalog.generateList()

        sortedItems = CatalogItemSorter(itemList).sortItems()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['FURNITURE']:
            catalogItemList.addItem(item, 'Furniture')
        for item in sortedItems['UNSORTED']:
            catalogItemList.addItem(item, 'Unsorted Items')
        self.phoneGui.tabButtons['FURNITURE_TAB'].setCatalogItemPages(catalogItemList.generatePages())
        self.phoneGui.tabButtons['FURNITURE_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['EMOTIONS']:
            catalogItemList.addItem(item, 'Emotions')
        self.phoneGui.tabButtons['EMOTE_TAB'].setCatalogItemPages(catalogItemList.generatePages())
        self.phoneGui.tabButtons['EMOTE_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['SPECIAL']:
            catalogItemList.addItem(item, 'Special')
        self.phoneGui.tabButtons['SPECIAL_TAB'].setCatalogItemPages(catalogItemList.generatePages())
        self.phoneGui.tabButtons['SPECIAL_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['CLOTHING']:
            catalogItemList.addItem(item, 'Clothing')
        self.phoneGui.tabButtons['CLOTHING_TAB'].setCatalogItemPages(catalogItemList.generatePages())
        self.phoneGui.tabButtons['CLOTHING_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['PHRASES']:
            catalogItemList.addItem(item, 'Phrases')
        self.phoneGui.tabButtons['PHRASES_TAB'].setCatalogItemPages(catalogItemList.generatePages())
        self.phoneGui.tabButtons['PHRASES_TAB'].tabClicked()

        catalogItemList = CatalogItemListGUI(self.phoneGui)
        for item in sortedItems['NAMETAG']:
            catalogItemList.addItem(item, 'Nametag')
        self.phoneGui.tabButtons['NAMETAG_TAB'].setCatalogItemPages(catalogItemList.generatePages())
        self.phoneGui.tabButtons['NAMETAG_TAB'].tabClicked()