Changeset 97 for trunk/PARPG/scripts
- Timestamp:
- 06/05/09 15:36:51 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PARPG/scripts/hud.py
r90 r97 29 29 self.initializeMainMenu() 30 30 self.initializeOptionsMenu() 31 self.initializeHelpMenu() 31 32 32 33 def initializeHud(self): … … 52 53 self.menu_events = {"resumeButton":self.hideMenu, "saveButton":self.saveGame, 53 54 "loadButton":self.loadGame, 54 "optionsButton":self.displayOptions} 55 "optionsButton":self.displayOptions, 56 "helpButton":self.displayHelp} 55 57 self.main_menu.mapEvents(self.menu_events) 56 58 59 def initializeHelpMenu(self): 60 """Initialize the help menu""" 61 62 self.help_dialog = pychan.loadXML("gui/help.xml") 63 help_events = {"closeButton":self.help_dialog.hide} 64 self.help_dialog.mapEvents(help_events) 65 66 main_help_text = "Put help text here" 67 68 keybindings_text = "A : Add a test action to the actions display[br]I : Toggle the inventory screen[br]F5 : Take a screenshot [br] (saves to <parpg>/screenshots/)[br]Q : Quit the game" 69 70 self.help_dialog.distributeInitialData({ 71 "MainHelpText":main_help_text, 72 "KeybindText":keybindings_text 73 }) 57 74 58 75 def initializeOptionsMenu(self): … … 88 105 self.options_menu.hide() 89 106 107 def displayHelp(self): 108 """ Display the help screen """ 109 self.help_dialog.show() 110 90 111 91 112 def refreshActionsBox(self):
Note: See TracChangeset
for help on using the changeset viewer.