Package horizons :: Package gui :: Package modules :: Module settings :: Class SettingsDialog
[hide private]
[frames] | no frames]

Class SettingsDialog

source code

widgets.pickbeltwidget.PickBeltWidget --+
                                        |
                       windows.Window --+
                                        |
                                       SettingsDialog

Widget for Options dialog with pickbelt style pages

Instance Methods [hide private]
 
__init__(self, windows) source code
 
_init_settings(self)
Init the settings with the stored values.
source code
 
show(self)
Show the window.
source code
 
hide(self)
Hide the window.
source code
 
restart_promt(self) source code
 
set_defaults(self) source code
 
apply_settings(self) source code
 
_fill_widgets(self) source code
 
_on_slider_changed(self, widget)
Callback for updating value label of a slider after dragging it.
source code
 
_apply_PlaySounds(self, old, new) source code
 
_apply_VolumeMusic(self, old, new) source code
 
_apply_VolumeEffects(self, old, new) source code
 
_apply_FrameLimit(self, old, new) source code
 
_apply_NetworkPort(self, old, new)
Sets a new value for client network port
source code
 
_apply_Language(self, old, new) source code
 
_on_Language_changed(self, widget) source code
 
_apply_DebugLog(self, old, new) source code
    Inherited from widgets.pickbeltwidget.PickBeltWidget
 
get_widget(self) source code
 
update_view(self, number=0) 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
 
close(self)
Closes the window.
source code
 
on_escape(self)
Define what happens when ESC is pressed.
source code
 
on_return(self)
Define what happens when RETURN is pressed.
source code
 
open(self, **kwargs)
Open the window.
source code
Class Variables [hide private]
  widget_xml = 'settings.xml'
  sections = 'graphics_settings', LazyT('Graphics'), ('hotkeys_s...
    Inherited from widgets.pickbeltwidget.PickBeltWidget
  page_pos = 185, 45
  pickbelt_start_pos = 5, 150
Method Details [hide private]

__init__(self, windows)
(Constructor)

source code 
Overrides: windows.Window.__init__

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)

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)

_on_slider_changed(self, widget)

source code 

Callback for updating value label of a slider after dragging it.

As the numeric values under the hood often do not represent mental models of what the setting achieves very well, depending on the setting in question we display a modified value, sometimes with a '%' suffix.


Class Variable Details [hide private]

sections

Value:
'graphics_settings', LazyT('Graphics'), ('hotkeys_settings', LazyT('Ho\
tkeys')), ('game_settings', LazyT('Game')),