Angel 3.2
A 2D Game Prototyping Engine
Public Member Functions | List of all members
LuaConsole Class Reference

Console to process Lua input during the game. More...

#include <LuaConsole.h>

+ Inheritance diagram for LuaConsole:

Public Member Functions

 LuaConsole ()
virtual void Execute (String input)
virtual StringList GetCompletions (const String &input)
- Public Member Functions inherited from Console
 Console ()
virtual ~Console ()
void Render ()
void Update (float)
void Enable (bool bEnable=true)
bool IsEnabled ()
bool GetInput (int key)
bool GetSpecialInputDown (int key)
void ToggleConsole ()
unsigned char GetToggleConsoleKey ()
void WriteToOutput (String output)
void SetPrompt (const String &prompt)
const unsigned int GetTabWidth ()
void SetTabWidth (unsigned int newTabWidth)
void AdvanceInputHistory (int byVal)
void AcceptAutocomplete ()

Additional Inherited Members

- Protected Member Functions inherited from Console
bool IsTextKey (unsigned char key)
void AcceptCurrentInput ()
- Protected Attributes inherited from Console
String _currentInput
StringList _inputHistory
int _inputHistoryPos
String _prompt
StringList _buffer
String _unsplitBuffer
float _lineHeight
StringList _autoCompleteList
int _cursorPos
unsigned int _tabWidth

Detailed Description

An implementation of the Console class that runs input strings of Lua code, and prints output from the Lua runtime.

Definition at line 39 of file LuaConsole.h.

Constructor & Destructor Documentation

LuaConsole::LuaConsole ( )

Basic constructor; sets up our prompts and prints the welcome message.

Definition at line 36 of file LuaConsole.cpp.

Member Function Documentation

void LuaConsole::Execute ( String  input)

Attempts to execute the given string as Lua. Any errors will be output the console.

inputthe string to execute

Implements Console.

Definition at line 52 of file LuaConsole.cpp.

StringList LuaConsole::GetCompletions ( const String &  input)

Gets potential autocompletions from the Lua runtime given a starting string.

inputthe beginning of the string to try to complete
a list of potential matches

Implements Console.

Definition at line 111 of file LuaConsole.cpp.

The documentation for this class was generated from the following files: