def createScoreboard(self):
     pMissionTime, pShipDamage, pSkeletonKills, pNavyKills, pCreatureKills, pSeamonsterKills, pPirateKills, pTownfolkKills, pShipKills, pRepairCost, pExp, pGold, pCargo, pLootBoxes, dummyCrew = self.playerStats
     missionResults = self.getMissionResults()
     self.leftPanel = Scoreboard.Scoreboard(
         '', (self.width - self.buffer * 2) / 2.0, self.height - 0.1,
         missionResults, self.titleHeight)
     self.leftPanel.reparentTo(self)
     self.leftPanel.setPos(self.buffer, 0, 0.2)
     cargoResults = self.getCargoResults()
     self.rightPanel = Scoreboard.Scoreboard(
         '', (self.width - self.buffer * 2) / 2.0, self.height - 0.1,
         cargoResults, self.titleHeight)
     self.rightPanel.reparentTo(self)
     self.rightPanel.setPos((self.width + self.buffer) / 2.0, 0, 0.2)
     if len(pLootBoxes) == 0:
         self.leftPanel.hide()
         self.configure(frameSize=(self.width / 4.0, self.width * 3.0 / 4.0,
                                   0, self.height))
         self.title.setX(self.width / 4.0 + 0.03)
         self.rightPanel.setX(self.width / 4.0 + self.buffer)
     if len(pLootBoxes) == 0:
         len(pCargo) == 0 and self.takeAllButton.hide()
         self.newCloseButton.hide()
     else:
         if len(pLootBoxes) == 0:
             self.closeButton.hide()
             self.newCloseButton.setX(1.77)
         else:
             self.closeButton.hide()
Ejemplo n.º 2
0
    def createScoreboard(self, scoreboardPos):
        invasionResults = self.getInvasionResults()
        self.panel = Scoreboard.Scoreboard('', self.width, self.height - 0.715, invasionResults, self.titleHeight)
        self.panel.reparentTo(self)
        self.panel.setPos(scoreboardPos)
        for item in self.panel.list.items:
            item.descText['text_font'] = PiratesGlobals.getPirateOutlineFont()
            item.valueText['text_font'] = PiratesGlobals.getPirateOutlineFont()

        lenItems = len(self.panel.list.items)
        self.panel.list.items[0].descText.configure(text_fg=PiratesGuiGlobals.TextFG4)
        self.panel.list.items[0].valueText.configure(text_fg=PiratesGuiGlobals.TextFG4)