From f842e0b40d8382011f0bc46b1446945d99ac0425 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 14 Jan 2007 14:54:39 +0000 Subject: Upgraded to Guichan 0.6.0 (merge from guichan-0.6.0 branch). --- src/gui/inttextbox.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/inttextbox.cpp') 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()); -- cgit v1.2.3-70-g09d2