summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-11 22:25:21 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-11 22:25:21 +0300
commit120ef46ea296729baee0c88c046008d8e18644fa (patch)
tree36ac86de113f11e60c31008ea15d286bb30d831d /src/gui/widgets/textfield.h
parentc4d16b36a373ba5609360e2698372926d7f2dc0f (diff)
downloadmv-120ef46ea296729baee0c88c046008d8e18644fa.tar.gz
mv-120ef46ea296729baee0c88c046008d8e18644fa.tar.bz2
mv-120ef46ea296729baee0c88c046008d8e18644fa.tar.xz
mv-120ef46ea296729baee0c88c046008d8e18644fa.zip
Add ability to show onscreen keyboard if input field focused.
Diffstat (limited to 'src/gui/widgets/textfield.h')
-rw-r--r--src/gui/widgets/textfield.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h
index 0c30fc819..0569d5d30 100644
--- a/src/gui/widgets/textfield.h
+++ b/src/gui/widgets/textfield.h
@@ -25,6 +25,7 @@
#include "gui/widgets/widget2.h"
+#include <guichan/focuslistener.hpp>
#include <guichan/widgets/textfield.hpp>
#include "localconsts.h"
@@ -39,6 +40,7 @@ class TextField;
* \ingroup GUI
*/
class TextField : public gcn::TextField,
+ public gcn::FocusListener,
public Widget2
{
public:
@@ -122,6 +124,10 @@ class TextField : public gcn::TextField,
void handleCopy() const;
+ void focusGained(const gcn::Event &event);
+
+ void focusLost(const gcn::Event &event);
+
protected:
void drawCaret(gcn::Graphics* graphics, int x) override;