diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-05 16:37:36 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-05 16:37:36 (GMT) |
| commit | 7ae5eaab79a41f31b633ca6f1bfb0dbae2fccb90 (patch) | |
| tree | b76fc14cca5e19c5482209f34131973ad1f80e6a /src/console/ConsoleView.cpp | |
| parent | 8024caec55ff1b93eefe50663d4ddf63934f8d63 (diff) | |
| download | powder-7ae5eaab79a41f31b633ca6f1bfb0dbae2fccb90.zip powder-7ae5eaab79a41f31b633ca6f1bfb0dbae2fccb90.tar.gz | |
Started intrepreter for tpt script and various things for console
Diffstat (limited to 'src/console/ConsoleView.cpp')
| -rw-r--r-- | src/console/ConsoleView.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/console/ConsoleView.cpp b/src/console/ConsoleView.cpp index 117d8cb..f36a33b 100644 --- a/src/console/ConsoleView.cpp +++ b/src/console/ConsoleView.cpp @@ -34,6 +34,9 @@ void ConsoleView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, b { switch(key) { + case '`': + c->CloseConsole(); + break; case KEY_RETURN: case KEY_ENTER: c->EvaluateCommand(commandField->GetText()); @@ -63,7 +66,11 @@ void ConsoleView::NotifyPreviousCommandsChanged(ConsoleModel * sender) { if(currentY <= 0) break; - ui::Label * tempLabel = new ui::Label(ui::Point(0, currentY), ui::Point(Size.X, 16), commands[i].Command); + ui::Label * tempLabel = new ui::Label(ui::Point(Size.X/2, currentY), ui::Point(Size.X/2, 16), commands[i].ReturnValue); + tempLabel->SetAlignment(AlignLeft, AlignMiddle); + commandList.push_back(tempLabel); + AddComponent(tempLabel); + tempLabel = new ui::Label(ui::Point(0, currentY), ui::Point(Size.X/2, 16), commands[i].Command); tempLabel->SetAlignment(AlignLeft, AlignMiddle); commandList.push_back(tempLabel); AddComponent(tempLabel); |
