Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-08-28 18:12:27 +0000
committerStijn Buys <ingar@osirion.org>2011-08-28 18:12:27 +0000
commit25b84292bf3808d8fa4ab0797586d50009fcf978 (patch)
tree62fc528ca5e7c13b999ee243980460171bafe810 /src/ui/inputbox.cc
parent57f96d26fd5311541e61a08542f71b9417963c5e (diff)
Moved ui::InputBox command completion into a seperate method instead of hardcoded to the tab key.
Diffstat (limited to 'src/ui/inputbox.cc')
-rw-r--r--src/ui/inputbox.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/inputbox.cc b/src/ui/inputbox.cc
index 5656cb9..89e3243 100644
--- a/src/ui/inputbox.cc
+++ b/src/ui/inputbox.cc
@@ -142,15 +142,14 @@ void InputBox::draw()
Paint::set_color(palette()->foreground());
}
+void InputBox::complete()
+{
+ core::CommandBuffer::complete(input_text, input_pos);
+}
+
bool InputBox::on_keypress(const int key, const unsigned int modifier)
{
switch (key) {
- case SDLK_TAB:
- // FIXME should not be here
- core::CommandBuffer::complete(input_text, input_pos);
- return true;
- break;
-
case SDLK_HOME:
input_pos = 0;
return true;