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

Class PasswordInput

source code

windows.Window --+        
                 |        
    windows.Dialog --+    
                     |    
         windows.Popup --+
                         |
                        PasswordInput

Popup where players enter a password to join multiplayer games.

Instance Methods [hide private]
 
__init__(self, windows) source code
 
prepare(self, **kwargs)
Setup the dialog gui.
source code
 
act(self, send_password)
Do something after dialog is closed.
source code
    Inherited from windows.Dialog
 
_abort(self, retval=False)
Break out of mainloop.
source code
 
_execute(self)
Execute the dialog synchronously.
source code
 
_on_keypress(self, event)
Intercept ESC and ENTER keys and execute the appropriate actions.
source code
 
close(self)
Closes the window.
source code
 
hide(self)
Hide the window.
source code
 
on_escape(self)
Define what happens when ESC is pressed.
source code
 
show(self, **kwargs)
Show the window.
source code
 
trigger_close(self, event_name)
Close the dialog and execute the received event
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_return(self)
Define what happens when RETURN is pressed.
source code
 
open(self, **kwargs)
Open the window.
source code
Class Methods [hide private]
    Inherited from windows.Dialog
 
create_from_widget(cls, dlg, bind, event_map=None, modal=False, focus=None)
Shows any pychan dialog.
source code
Class Variables [hide private]
  focus = 'password'
hash(x)
    Inherited from windows.Popup
  modal = True
    Inherited from windows.Dialog
  return_events = {}
Method Details [hide private]

__init__(self, windows)
(Constructor)

source code 
Overrides: windows.Window.__init__

prepare(self, **kwargs)

source code 

Setup the dialog gui.

The widget has to be stored in `self._gui`. If you want to abort the dialog here return False.

Overrides: windows.Dialog.prepare
(inherited documentation)

act(self, send_password)

source code 
Do something after dialog is closed.

If you want to show the dialog again, you need to do that explicitly, e.g. with:

        self._windows.open(self)

Overrides: windows.Dialog.act
(inherited documentation)