def __init__(self, owner, avId): self.owner = owner self.avId = avId self.hp = 0 self.maxHp = 0 GuiButton.__init__(self, text='', text_scale=PiratesGuiGlobals.TextScaleSmall, text_pos=(0.025, 0.085), text_align=TextNode.ALeft, text_fg=self.OnlineTextColor, text_shadow=PiratesGuiGlobals.TextShadow, textMayChange=1, text_wordwrap=14, relief=None, borderWidth=PiratesGuiGlobals.BorderWidthSmall, frameColor=(0.45, 0.45, 0.35, 1.0), image_scale=(0.45, 1, 0.2), image_pos=(0.215, 0.0, 0.08), command=self.select) self.initialiseoptions(AvatarInfoButton) self.hpMeter = DirectWaitBar(parent=self, relief=DGG.RAISED, borderWidth=(0.004, 0.004), range=50, value=20, frameColor=(0.05, 0.35, 0.05, 1), barColor=(0.1, 0.7, 0.1, 1), pos=(0.015, 0, 0.06), frameSize=(0, 0.25, 0, 0.018), text='%s/%s' % (self.hp, self.maxHp), text_align=TextNode.ALeft, text_scale=PiratesGuiGlobals.TextScaleMicro, text_fg=PiratesGuiGlobals.TextFG2, text_shadow=PiratesGuiGlobals.TextShadow, text_pos=(0.256, 0, 0.005), textMayChange=1) return
def __init__(self, owner, avId): self.owner = owner self.avId = avId self.hp = 0 self.maxHp = 0 GuiButton.__init__(self, text = '', text_scale = PiratesGuiGlobals.TextScaleSmall, text_pos = (0.025000000000000001, 0.085000000000000006), text_align = TextNode.ALeft, text_fg = self.OnlineTextColor, text_shadow = PiratesGuiGlobals.TextShadow, textMayChange = 1, text_wordwrap = 14, relief = None, borderWidth = PiratesGuiGlobals.BorderWidthSmall, frameColor = (0.45000000000000001, 0.45000000000000001, 0.34999999999999998, 1.0), image_scale = (0.45000000000000001, 1, 0.20000000000000001), image_pos = (0.215, 0.0, 0.080000000000000002), command = self.select) self.initialiseoptions(AvatarInfoButton) self.hpMeter = DirectWaitBar(parent = self, relief = DGG.RAISED, borderWidth = (0.0040000000000000001, 0.0040000000000000001), range = 50, value = 20, frameColor = (0.050000000000000003, 0.34999999999999998, 0.050000000000000003, 1), barColor = (0.10000000000000001, 0.69999999999999996, 0.10000000000000001, 1), pos = (0.014999999999999999, 0, 0.059999999999999998), frameSize = (0, 0.25, 0, 0.017999999999999999), text = '%s/%s' % (self.hp, self.maxHp), text_align = TextNode.ALeft, text_scale = PiratesGuiGlobals.TextScaleMicro, text_fg = PiratesGuiGlobals.TextFG2, text_shadow = PiratesGuiGlobals.TextShadow, text_pos = (0.25600000000000001, 0, 0.0050000000000000001), textMayChange = 1)
def __init__(self, parent, **kw): optiondefs = (('nodePath', None, None), ('image_scale', (1.0, 1.0, 1.0), None)) self.defineoptions(kw, optiondefs) GuiButton.__init__(self, parent) self.initialiseoptions(RepairGameButton) self.disabledStateNode = self.stateNodePath[3].getChild(0) self.downStateNode = self.stateNodePath[1].getChild(0) self.overStateNode = self.stateNodePath[2].getChild(0) self.inProgress = False self._initGUI()
def __init__(self, parent, **kw): optiondefs = (('nodePath', None, None), ('image_scale', (1.0, 1.0, 1.0), None)) self.defineoptions(kw, optiondefs) GuiButton.__init__(self, parent) self.initialiseoptions(RepairGameButton) self.disabledStateNode = self.stateNodePath[3].getChild(0) self.downStateNode = self.stateNodePath[1].getChild(0) self.overStateNode = self.stateNodePath[2].getChild(0) self.inProgress = False self._initGUI()