ice.ice

Main pong program class.

class LevelGUI: ice.guiswapper.SwappableGUI;

Level selection GUI.

this(GUISystem guiSystem, ref Node levels, void delegate(const(immutable(char)[])) initGame);

Initialize level selection menu.

Parameters:
GUISystem guiSystem GUI system to build the menu widgets with.
Node levels YAML to load level filenames from.
void delegate(const(immutable(char)[])) initGame Function that takes level filename and starts a game.
Throws:
GUIInitException on failure.
class IceGUI: ice.guiswapper.SwappableGUI;

Class holding all GUI used by ICE (main menu, etc.).

Signal:
public mixin Signal!() quit
Emitted when the player clicks the button to quit.

Signal:
public mixin Signal!() resetVideo
Emitted when the player clicks the button to reset video mode.

this(GUISystem guiSystem, VFSDir gameDir, GUIElement parent, MonitorManager monitor);

Construct IceGUI with specified parameters.

Parameters:
GUISystem guiSystem Reference to the GUI system.
VFSDir gameDir Game data directory.
GUIElement parent GUI element to use as parent for all pong GUI elements.
MonitorManager monitor Monitor subsystem, used to initialize monitor GUI view.
Throws:
GUIInitException on failure. YAMLException on a YAML error. VFSException on a filesystem error. TODO replace old GUI with the new YAML loadable GUI.
const @property const(MonitorView) monitor();

Get the monitor widget. TODO replace old GUI with the new YAML loadable GUI.

void monitorToggle();

Toggle monitor display. TODO replace old GUI with the new YAML loadable GUI.

class Ice;

"Main" ICE class.

this(VFSDir gameDir);

Initialize ICE.

Parameters:
VFSDir gameDir Root directory of the game's virtual file system.
Throws GameStartupException on an expected, correctly handled failure.
void run();

Main ICE event loop.

YAMLNode writeDefaultConfig(E)(VFSFile configFile);

Write the default config.yaml contents to specified file.

Parameters:
configFile File to write the config to.
Returns:
YAMLNode storing the default configuration.
Throws:
An exception of type specified by the E template parameter. (Allows differentiating between writing default config when config.yaml is missing, and potential use for configuration resets.