Package horizons :: Package gui :: Package modules :: Module multiplayermenu :: Class MultiplayerMenu
[hide private]
[frames] | no frames]

Class MultiplayerMenu

source code

windows.Window --+
                 |
                MultiplayerMenu

Instance Methods [hide private]
 
__init__(self, mainmenu, windows) source code
 
hide(self)
Hide the window.
source code
 
show(self)
Show the window.
source code
 
close(self)
Closes the window.
source code
 
on_return(self)
Define what happens when RETURN is pressed.
source code
 
_check_connection(self)
Check if all dependencies for multiplayer games are met and we can connect to the master server.
source code
 
_on_error(self, exception, fatal=True)
Error callback
source code
 
_display_game_name(self, game) source code
 
_refresh(self, play_sound=False)
Refresh list of games.
source code
 
_update_game_details(self)
Set map name and other misc data in a widget.
source code
 
_join_game(self)
Joins a multiplayer game.
source code
 
_create_game(self) source code
    Inherited from windows.Window
 
_hide_modal_background(self) source code
 
_show_modal_background(self)
Loads transparent background that de facto prohibits access to other gui elements by eating all input events.
source code
 
on_escape(self)
Define what happens when ESC is pressed.
source code
 
open(self, **kwargs)
Open the window.
source code
Method Details [hide private]

__init__(self, mainmenu, windows)
(Constructor)

source code 
Overrides: windows.Window.__init__

hide(self)

source code 

Hide the window.

After this call, the window should not be visible anymore. However, it remains in the stack of open windows and will be visible once it becomes the topmost window again.

You should *never* call this directly in your code, other than in `close()` when you overwrote it in your subclass.

Overrides: windows.Window.hide
(inherited documentation)

show(self)

source code 

Show the window.

After this call, the window should be visible. You should *never* call this directly in your code.

Overrides: windows.Window.show
(inherited documentation)

close(self)

source code 

Closes the window.

You should *never* call this directly in your code. Use `self._windows.close()` to ask the WindowManager to remove the window instead.

You may override this method in a subclass if you need to do stuff when a window is closed.

Overrides: windows.Window.close
(inherited documentation)

on_return(self)

source code 

Define what happens when RETURN is pressed.

Overrides: windows.Window.on_return
(inherited documentation)

_check_connection(self)

source code 

Check if all dependencies for multiplayer games are met and we can connect to the master server. If any dependency is not met, the window is closed.

_refresh(self, play_sound=False)

source code 

Refresh list of games.

Parameters:
  • play_sound - whether to play the refresh sound @return bool, whether refresh worked

_join_game(self)

source code 

Joins a multiplayer game. Displays lobby for that specific game