diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-06 17:57:25 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-06 19:54:37 (GMT) |
| commit | 622f2246ef31a05eb38e8f2ab3ac9c1bd9264920 (patch) | |
| tree | fb9009f6803f395c9da457039a823a0ffcdfc98a /src/console/ConsoleView.cpp | |
| parent | f75a3c264235d5edf162fd0f7bf6e04d629704f9 (diff) | |
| download | powder-622f2246ef31a05eb38e8f2ab3ac9c1bd9264920.zip powder-622f2246ef31a05eb38e8f2ab3ac9c1bd9264920.tar.gz | |
Fix TPTScript 'set' function
Diffstat (limited to 'src/console/ConsoleView.cpp')
| -rw-r--r-- | src/console/ConsoleView.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/console/ConsoleView.cpp b/src/console/ConsoleView.cpp index 32b366c..67c83de 100644 --- a/src/console/ConsoleView.cpp +++ b/src/console/ConsoleView.cpp @@ -17,7 +17,7 @@ ConsoleView::ConsoleView(): ConsoleView * v; public: CommandHighlighter(ConsoleView * v_) { v = v_; } - void TextChangedCallback(ui::Textbox * sender) + virtual void TextChangedCallback(ui::Textbox * sender) { sender->SetDisplayText(v->c->FormatCommand(sender->GetText())); } @@ -43,6 +43,7 @@ void ConsoleView::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, b case KEY_ENTER: c->EvaluateCommand(commandField->GetText()); commandField->SetText(""); + commandField->SetDisplayText(""); break; case KEY_DOWN: c->NextCommand(); @@ -88,6 +89,7 @@ void ConsoleView::NotifyPreviousCommandsChanged(ConsoleModel * sender) void ConsoleView::NotifyCurrentCommandChanged(ConsoleModel * sender) { commandField->SetText(sender->GetCurrentCommand().Command); + commandField->SetDisplayText(c->FormatCommand(commandField->GetText())); } |
