def __init__(self, parent, repairGame, model):
     DirectFrame.__init__(self, parent = parent, relief = None, sortOrder = 40)
     self.repairGame = repairGame
     self.model = model
     self.gameIndicesToNames = { }
     self.staticElements = GUIFactory.generateStaticElements(self.model, self)
     self.buttons = GUIFactory.generateButtons(self.model, self, buttonClass = RepairGameButton, passNodePathToButton = True)
     self.staticElements['tab'].setBin('fixed', 31)
     self.staticElements['border1'].setBin('fixed', 33)
     self.staticElements['border2'].setBin('fixed', 33)
     self.staticElements['border3'].setBin('fixed', 33)
     self.staticElements['border4'].setBin('fixed', 33)
     self.staticElements['border5'].setBin('fixed', 33)
     self.stashTab()
     self.enabled = True
Ejemplo n.º 2
0
 def __init__(self, parent, repairGame, model):
     DirectFrame.__init__(self, parent=parent, relief=None, sortOrder=40)
     self.repairGame = repairGame
     self.model = model
     self.gameIndicesToNames = {}
     self.staticElements = GUIFactory.generateStaticElements(
         self.model, self)
     self.buttons = GUIFactory.generateButtons(self.model,
                                               self,
                                               buttonClass=RepairGameButton,
                                               passNodePathToButton=True)
     self.staticElements['tab'].setBin('fixed', 31)
     self.staticElements['border1'].setBin('fixed', 33)
     self.staticElements['border2'].setBin('fixed', 33)
     self.staticElements['border3'].setBin('fixed', 33)
     self.staticElements['border4'].setBin('fixed', 33)
     self.staticElements['border5'].setBin('fixed', 33)
     self.stashTab()
     self.enabled = True
Ejemplo n.º 3
0
 def destroy(self):
     self.ignore('clientLogout')
     self.ignore('seachestOpened')
     self.ignore('avatarDetailsOpened')
     self.ignore('minimapOpened')
     self.introSequence.clearToInitial()
     self.outroSequence.clearToInitial()
     self.cycleCompleteSequence.clearToInitial()
     self.shakeSequence.clearToInitial()
     del self.introSequence
     del self.outroSequence
     del self.cycleCompleteSequence
     del self.shakeSequence
     self.closeButton.destroy()
     self.closeButton.removeNode()
     del self.closeButton
     GUIFactory.destroyDirectGUIDict(self.staticElements)
     del self.staticElements
     self.repairGamePicker.destroy()
     del self.repairGamePicker
     self.removeNode()
 def destroy(self):
     self.ignore('clientLogout')
     self.ignore('seachestOpened')
     self.ignore('avatarDetailsOpened')
     self.ignore('minimapOpened')
     self.introSequence.clearToInitial()
     self.outroSequence.clearToInitial()
     self.cycleCompleteSequence.clearToInitial()
     self.shakeSequence.clearToInitial()
     del self.introSequence
     del self.outroSequence
     del self.cycleCompleteSequence
     del self.shakeSequence
     self.closeButton.destroy()
     self.closeButton.removeNode()
     del self.closeButton
     GUIFactory.destroyDirectGUIDict(self.staticElements)
     del self.staticElements
     self.repairGamePicker.destroy()
     del self.repairGamePicker
     self.removeNode()
 def _initGUI(self):
     self.model = loader.loadModel('models/gui/pir_m_gui_srp_main')
     self.repairGamePicker = RepairGamePickerGUI(self, self.repairGame, self.model.find('**/group_picker'))
     self.staticElements = GUIFactory.generateStaticElements(self.model.getChild(0), self)
     self.textElements = { }
     self.textElements['title'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), text_shadow = (0.0, 0.0, 0.0, 1.0), scale = (0.087499999999999994, 0.087499999999999994, 0.087499999999999994), pos = (0.0, 0.0, 0.91000000000000003), relief = None, textMayChange = 1, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.textElements['tutorial'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), text_shadow = (0.0, 0.0, 0.0, 1.0), text_wordwrap = 14, scale = (0.044999999999999998, 0.044999999999999998, 0.044999999999999998), pos = (0.0, 0.0, 0.79500000000000004), relief = None, textMayChange = 1, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.textElements['level'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), scale = (0.052499999999999998, 0.052499999999999998, 0.052499999999999998), pos = (0.315, 0.0, 0.69999999999999996), relief = None, textMayChange = 1, text_align = TextNode.ARight, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.textElements['level'].stash()
     self.textElements['idleMessage'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), text_shadow = (0.0, 0.0, 0.0, 1.0), text_wordwrap = 15, scale = (0.087499999999999994, 0.087499999999999994, 0.087499999999999994), pos = (0.0, 0.0, 0.0), relief = None, textMayChange = 1, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.textElements['cycleCompleteMessage'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), text_shadow = (0.0, 0.0, 0.0, 1.0), text_wordwrap = 20, scale = (0.087499999999999994, 0.087499999999999994, 0.087499999999999994), pos = (0.0, 0.0, 0.0), relief = None, textMayChange = 1, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.closeButton = GuiButton(image = (self.model.find('**/esc_button/idle'), self.model.find('**/esc_button/over'), self.model.find('**/esc_button/over'), self.model.find('**/esc_button/idle')), image_scale = (0.75, 0.75, 0.75), image_pos = (0.074999999999999997, 0, 0.080000000000000002), hotkeys = [
         'Escape'], hotkeyLabel = PLocalizer.Minigame_Repair_Leave_Game_Text, pos = (-0.40000000000000002, 0.0, 0.01), parent = base.a2dBottomRight, command = self.handleExitGame)
     self.closeButton.setBin('background', -90)
     self.model.removeNode()
     del self.model
Ejemplo n.º 6
0
 def _initGUI(self):
     self.model = loader.loadModel('models/gui/pir_m_gui_srp_main')
     self.repairGamePicker = RepairGamePickerGUI(self, self.repairGame, self.model.find('**/group_picker'))
     self.staticElements = GUIFactory.generateStaticElements(self.model.getChild(0), self)
     self.textElements = { }
     self.textElements['title'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), text_shadow = (0.0, 0.0, 0.0, 1.0), scale = (0.087499999999999994, 0.087499999999999994, 0.087499999999999994), pos = (0.0, 0.0, 0.91000000000000003), relief = None, textMayChange = 1, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.textElements['tutorial'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), text_shadow = (0.0, 0.0, 0.0, 1.0), text_wordwrap = 14, scale = (0.044999999999999998, 0.044999999999999998, 0.044999999999999998), pos = (0.0, 0.0, 0.79500000000000004), relief = None, textMayChange = 1, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.textElements['level'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), scale = (0.052499999999999998, 0.052499999999999998, 0.052499999999999998), pos = (0.315, 0.0, 0.69999999999999996), relief = None, textMayChange = 1, text_align = TextNode.ARight, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.textElements['level'].stash()
     self.textElements['idleMessage'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), text_shadow = (0.0, 0.0, 0.0, 1.0), text_wordwrap = 15, scale = (0.087499999999999994, 0.087499999999999994, 0.087499999999999994), pos = (0.0, 0.0, 0.0), relief = None, textMayChange = 1, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.textElements['cycleCompleteMessage'] = DirectLabel(text = '', text_fg = (1.0, 1.0, 1.0, 1.0), text_shadow = (0.0, 0.0, 0.0, 1.0), text_wordwrap = 20, scale = (0.087499999999999994, 0.087499999999999994, 0.087499999999999994), pos = (0.0, 0.0, 0.0), relief = None, textMayChange = 1, text_font = PiratesGlobals.getPirateFont(), parent = self.staticElements['bg'])
     self.closeButton = GuiButton(image = (self.model.find('**/esc_button/idle'), self.model.find('**/esc_button/over'), self.model.find('**/esc_button/over'), self.model.find('**/esc_button/idle')), image_scale = (0.75, 0.75, 0.75), image_pos = (0.074999999999999997, 0, 0.080000000000000002), hotkeys = [
         'Escape'], hotkeyLabel = PLocalizer.Minigame_Repair_Leave_Game_Text, pos = (-0.40000000000000002, 0.0, 0.01), parent = base.a2dBottomRight, command = self.handleExitGame)
     self.closeButton.setBin('background', -90)
     self.model.removeNode()
     del self.model