Python StatRowHeadingGui Example

说明

python statrowheadinggui示例是从最受好评的开源项目中提取的实现代码,你可以参考下面示例的使用方式。

编程语言: Python

命名空间/包名称: piratespiratesguiStatRowHeadingGui

示例#1
文件: Scoreboard.py项目: Puggyblue999/PiratesOfTheCarribeanOnline

 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

示例#2
文件: PVPGameBase.py项目: Puggyblue999/PiratesOfTheCarribeanOnline

 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

示例#3
文件: DistributedPVPInstance.py项目: TTGhost/POTCOR-src

 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

展开阅读全文