Ignore:
Timestamp:
03/01/11 21:30:59 (8 years ago)
Author:
aspidites
Message:

Patch by Aspidites

+ added code to hud.py and mainmenuview.py to allow the options menu to be displayed.

  • controls on settings menu don't work yet
Location:
branches/active/character_customization/game/parpg
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/game/parpg/gui/hud.py

    r754 r763  
    197197           @return: None""" 
    198198        self.main_menu = pychan.loadXML("gui/hud_pause_menu.xml") 
     199        self.settings_menu = pychan.loadXML("gui/settings_menu.xml") 
    199200        #TODO: find more suitalbe place for onOptilonsPress implementation 
    200201        self.menu_events = {"resumeButton": self.hideMenu,  
    201                             "optionsButton": None, 
     202                            "optionsButton": self.displaySettings, 
    202203                            "helpButton": self.displayHelp} 
    203204        self.main_menu.mapEvents(self.menu_events) 
     
    225226        self.enabled = True 
    226227 
     228    def displaySettings(self): 
     229        """Displays the optons menu. 
     230           @return: None""" 
     231        self.settings_menu.show() 
     232        self.settings_menu.mapEvents({"okButton": self.settings_menu.close()}) 
    227233 
    228234    def initializeHelpMenu(self): 
  • branches/active/character_customization/game/parpg/mainmenuview.py

    r753 r763  
    6666        menu_events["newButton"] = self.newGame 
    6767        menu_events["loadButton"] = self.loadGame 
    68         #TODO: reimplement fife's Setting.onoptionsPress in a more suitable place 
    69         #menu_events["optionsButton"] = self.model.settings.onOptionsPress 
    70         menu_events["optionsButton"] = None 
     68        menu_events["optionsButton"] = self.displaySettings 
    7169        menu_events["quitButton"] = self.quitGame 
    7270        self.main_menu.mapEvents(menu_events) 
     
    9290        """Creates the quit confirmation dialog 
    9391           @return: None""" 
     92        self.settings_menu = pychan.loadXML("gui/settings_menu.xml") 
    9493        self.quit_window = pychan.widgets.Window(title=unicode("Quit?"), \ 
    9594                                                 min_size=(200,0)) 
     
    122121           @return: None""" 
    123122        self.quit_window.show() 
    124      
     123 
     124    def displaySettings(self): 
     125        self.settings_menu.show()  
     126        self.settings_menu.mapEvents({"okButton": self.settings_menu.close}) 
Note: See TracChangeset for help on using the changeset viewer.