summaryrefslogtreecommitdiff
path: root/src/gui/inttextbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/inttextbox.cpp')
-rw-r--r--src/gui/inttextbox.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/inttextbox.cpp b/src/gui/inttextbox.cpp
index 92f21e5f..2a09f255 100644
--- a/src/gui/inttextbox.cpp
+++ b/src/gui/inttextbox.cpp
@@ -32,12 +32,15 @@ IntTextBox::IntTextBox(int i):
{
}
-void IntTextBox::keyPress(const gcn::Key &key)
+void
+IntTextBox::keyPressed(gcn::KeyEvent &event)
{
+ const gcn::Key &key = event.getKey();
+
if (key.isNumber() || key.getValue() == gcn::Key::BACKSPACE
|| key.getValue() == gcn::Key::DELETE)
{
- gcn::TextBox::keyPress(key);
+ gcn::TextBox::keyPressed(event);
}
std::stringstream s(gcn::TextBox::getText());