From 69ed7e5ae640b0a2cd95d66b42b4c369fe522433 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 31 Dec 2015 22:42:51 +0300 Subject: Fix compilation with SDL2. --- src/gui/widgets/inttextfield.cpp | 4 +++- src/gui/widgets/textfield.cpp | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/inttextfield.cpp b/src/gui/widgets/inttextfield.cpp index fa525f87d..5e099a4cb 100644 --- a/src/gui/widgets/inttextfield.cpp +++ b/src/gui/widgets/inttextfield.cpp @@ -23,6 +23,8 @@ #include "gui/widgets/inttextfield.h" #ifdef USE_SDL2 +#include "enums/input/keyvalue.h" + #include "gui/sdlinput.h" #endif @@ -68,7 +70,7 @@ void IntTextField::keyPressed(KeyEvent &event) #ifdef USE_SDL2 const int val = event.getKey().getValue(); - if (val != Key::TEXTINPUT) + if (val != KeyValue::TEXTINPUT) return; const std::string str = event.getText(); diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp index 36315af34..bcbf20e1c 100644 --- a/src/gui/widgets/textfield.cpp +++ b/src/gui/widgets/textfield.cpp @@ -79,6 +79,10 @@ #include "gui/popups/popupmenu.h" +#ifdef USE_SDL2 +#include "enums/input/keyvalue.h" +#endif + #include "resources/image.h" #include "resources/imagerect.h" @@ -290,7 +294,7 @@ void TextField::keyPressed(KeyEvent &event) logger->log("TextField::keyPressed %d", val); #ifdef USE_SDL2 - if (val == Key::TEXTINPUT) + if (val == KeyValue::TEXTINPUT) { std::string str = event.getText(); mText.insert(mCaretPosition, str); -- cgit v1.2.3-70-g09d2