Changeset 655 for trunk/game/scripts


Ignore:
Timestamp:
10/15/10 10:24:51 (9 years ago)
Author:
beliar
Message:

Patch by Beliar

  • Adapted main menu to new screen clearing behaviour of fife. Added a container that is shown behind the menu.
  • Changed MainMenu? from Container to VBox
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/mainmenuview.py

    r653 r655  
    4040    def showMenu(self): 
    4141        """"Shows the main menu""" 
     42        self.main_menu_background.show() 
    4243        self.main_menu.show() 
    4344         
     
    4546        """"Hides the main menu""" 
    4647        self.main_menu.hide() 
     48        self.main_menu_background.hide() 
    4749 
    4850    def initalizeMainMenu(self, new_game, load_game, quit_game): 
    4951        """Initialized the main menu and sets the callbacks""" 
     52        self.main_menu_background = pychan.loadXML("gui/main_menu_background.xml") 
     53        screen_mode = self.engine.getCurrentScreenMode() 
     54        self.main_menu_background.width = screen_mode.getWidth() 
     55        self.main_menu_background.height = screen_mode.getHeight() 
    5056        self.main_menu = pychan.loadXML("gui/main_menu.xml") 
     57        self.main_menu.adaptLayout() 
    5158        self.new_game_callback = new_game 
    5259        self.load_game_callback = load_game 
Note: See TracChangeset for help on using the changeset viewer.