def createNewItem(self, item, parent, itemType=None, columnWidths=[], color=None):
     if itemType == PiratesGuiGlobals.UIListItemType_ColumHeadings:
         newItem = StatRowHeadingGui(
             item,
             self.getColumnLabels(),
             parent,
             textScale=0.059999999999999998,
             itemHeight=PiratesGuiGlobals.TMCompletePageHeight / 16,
             itemWidth=columnWidths[0] + columnWidths[1] * 2 - PiratesGuiGlobals.BorderWidth[0] * 2,
             itemWidths=columnWidths,
             frameColor=(0.0, 0.0, 0.0, 0.0),
         )
     else:
         newItem = StatRowGui(
             item,
             self.getColumnLabels(),
             parent,
             itemHeight=PiratesGuiGlobals.TMCompletePageHeight / 16,
             itemWidth=columnWidths[0] + columnWidths[1] * 2 - PiratesGuiGlobals.BorderWidth[0] * 2,
             itemWidths=columnWidths,
             txtColor=color,
             frameColor=(0.0, 0.0, 0.0, 0.0),
         )
     newItem.setup()
     return newItem
Ejemplo n.º 2
0
 def createNewItem(self,
                   item,
                   parent,
                   itemType=None,
                   columnWidths=[],
                   color=None):
     if itemType == PiratesGuiGlobals.UIListItemType_ColumHeadings:
         newItem = StatRowHeadingGui(
             item,
             self.getColumnLabels(),
             parent,
             textScale=0.059999999999999998,
             itemHeight=PiratesGuiGlobals.TMCompletePageHeight / 16,
             itemWidth=columnWidths[0] + columnWidths[1] * 2 -
             PiratesGuiGlobals.BorderWidth[0] * 2,
             itemWidths=columnWidths,
             frameColor=(0.0, 0.0, 0.0, 0.0))
     else:
         newItem = StatRowGui(
             item,
             self.getColumnLabels(),
             parent,
             itemHeight=PiratesGuiGlobals.TMCompletePageHeight / 16,
             itemWidth=columnWidths[0] + columnWidths[1] * 2 -
             PiratesGuiGlobals.BorderWidth[0] * 2,
             itemWidths=columnWidths,
             txtColor=color,
             frameColor=(0.0, 0.0, 0.0, 0.0))
     newItem.setup()
     return newItem
 def createNewItem(self, item, parent, itemType = None, columnWidths = [], color = None):
     if itemType == PiratesGuiGlobals.UIListItemType_ColumHeadings:
         newItem = StatRowHeadingGui(item, self.gameRules.getColumnLabels(), parent, itemHeight = PiratesGuiGlobals.TMCompletePageHeight / 16, itemWidths = columnWidths)
     else:
         newItem = StatRowGui(item, self.gameRules.getColumnLabels(), parent, itemHeight = PiratesGuiGlobals.TMCompletePageHeight / 16, itemWidths = columnWidths, txtColor = color)
     newItem.setup()
     return newItem
Ejemplo n.º 4
0
 def createNewItem(self, item, parent, itemType = None, columnWidths = [], color = None):
     if itemType == PiratesGuiGlobals.UIListItemType_ColumHeadings:
         newItem = StatRowHeadingGui(item, self.game.getColumnLabels(), parent, textScale = 0.059999999999999998, itemHeight = PiratesGuiGlobals.TMCompletePageHeight / 10, itemWidths = columnWidths, frameColor = (0.0, 0.0, 0.0, 0.0))
     elif item[0] == PLocalizer.PVPTeamTotal:
         newItem = StatRowGui(item, self.game.getColumnLabels(), parent, textScale = 0.055, itemHeight = PiratesGuiGlobals.TMCompletePageHeight / 12, itemWidths = columnWidths, txtColor = color, frameColor = (0.0, 0.0, 0.0, 0.0))
     else:
         newItem = StatRowGui(item, self.game.getColumnLabels(), parent, itemHeight = PiratesGuiGlobals.TMCompletePageHeight / 16, itemWidths = columnWidths, txtColor = color, frameColor = (0.0, 0.0, 0.0, 0.0))
     newItem.setup()
     return newItem
 def createNewItem(self, item, parent, itemType=None, columnWidths=[], color=None):
     if itemType == PiratesGuiGlobals.UIListItemType_ColumHeadings:
         newItem = StatRowHeadingGui(item, self.game.getColumnLabels(), parent, textScale=0.06, itemHeight=PiratesGuiGlobals.TMCompletePageHeight / 10, itemWidths=columnWidths, frameColor=(0.0,
                                                                                                                                                                                             0.0,
                                                                                                                                                                                             0.0,
                                                                                                                                                                                             0.0))
     elif item[0] == PLocalizer.PVPTeamTotal:
         newItem = StatRowGui(item, self.game.getColumnLabels(), parent, textScale=0.055, itemHeight=PiratesGuiGlobals.TMCompletePageHeight / 12, itemWidths=columnWidths, txtColor=color, frameColor=(0.0,
                                                                                                                                                                                                       0.0,
                                                                                                                                                                                                       0.0,
                                                                                                                                                                                                       0.0))
     else:
         newItem = StatRowGui(item, self.game.getColumnLabels(), parent, itemHeight=PiratesGuiGlobals.TMCompletePageHeight / 16, itemWidths=columnWidths, txtColor=color, frameColor=(0.0,
                                                                                                                                                                                      0.0,
                                                                                                                                                                                      0.0,
                                                                                                                                                                                      0.0))
     newItem.setup()
     return newItem