Package horizons :: Package engine :: Module engine :: Class Fife
[hide private]
[frames] | no frames]

Class Fife

source code

Basic initiation of engine. Followed later by init().

Instance Methods [hide private]
 
__init__(self) source code
 
load_settings(self)
Load the settings from a python file and load them into the engine.
source code
 
init_logging(self)
Initialize the LogManager.
source code
 
init(self)
Second initialization stage of engine
source code
 
init_animation_loader(self, use_atlases) source code
 
set_cursor_image(self, which="default")
Sets a certain cursor image.
source code
 
get_fife_setting(self, settingname) source code
 
set_fife_setting(self, settingname, value)
Probably saves setting in memory.
source code
 
get_uh_setting(self, settingname) source code
 
set_uh_setting(self, settingname, value)
Probably saves setting in memory.
source code
 
get_hotkey_settings(self) source code
 
get_keys_for_action(self, action, default=False)
Returns list of current hotkeys for *action* or its default hotkeys.
source code
 
set_key_for_action(self, action, newkey)
Replaces all existing hotkeys for *action* with *newkey*.
source code
 
add_key_for_action(self, action, addkey)
Adds hotkey *addkey* to list of hotkeys for action *action*.
source code
 
remove_key_for_action(self, action, remkey)
Removes hotkey *remkey* from list of hotkeys for action *action*.
source code
 
replace_key_for_action(self, action, oldkey, newkey)
Replaces key *oldkey* with key *newkey* for action *action*
source code
 
save_settings(self) source code
 
play_sound(self, emitter, soundfile)
Plays a soundfile on the given emitter.
source code
 
get_locale(self) source code
 
run(self) source code
 
loop(self) source code
 
__kill_engine(self)
Called when the engine is quit
source code
 
breakLoop(self, returnValue=None) source code
 
quit(self)
Quits the engine.
source code
Class Methods [hide private]
 
getVersion(cls)
Returns a tuple (Major, Minor, Patch) version of the current running Fife.
source code
Class Variables [hide private]
  log = logging.getLogger('engine.engine')
Method Details [hide private]

load_settings(self)

source code 

Load the settings from a python file and load them into the engine. Called in the ApplicationBase constructor.

set_cursor_image(self, which="default")

source code 

Sets a certain cursor image. See definition of cursor_images for reference.

set_fife_setting(self, settingname, value)

source code 

Probably saves setting in memory. Call save_settings() later

set_uh_setting(self, settingname, value)

source code 

Probably saves setting in memory. Call save_settings() later

play_sound(self, emitter, soundfile)

source code 

Plays a soundfile on the given emitter.

Parameters:
  • emitter - string with the emitters name in horizons.globals.fife.sound.emitter that is to play the sound
  • soundfile - string containing the path to the soundfile