Package horizons :: Package gui :: Package modules :: Module playerdataselection :: Class PlayerDataSelection
[hide private]
[frames] | no frames]

Class PlayerDataSelection

source code

Subwidget for selecting player name and color. Used by Multiplayer and Singleplayer menu.

Instance Methods [hide private]
 
__init__(self, color_palette=None) source code
 
set_color(self, color_id)
Updates the background color of large label where players see their currently chosen color.
source code
 
set_player_name(self, playername)
Updates the player name
source code
 
get_player_name(self)
Returns the name that was entered by the user
source code
 
get_player_color(self)
Returns the color that the player selected as Color obj
source code
 
get_widget(self) source code
 
update_data(self)
Update the player's name and color from the settings
source code
 
save_settings(self)
Stores the current player_name and color into settings
source code
Method Details [hide private]

__init__(self, color_palette=None)
(Constructor)

source code 
Parameters:
  • widgets - WidgetsDict

set_color(self, color_id)

source code 

Updates the background color of large label where players see their currently chosen color.

Parameters:
  • color_id - int. Gets converted to util.Color object.