summaryrefslogtreecommitdiff
path: root/src/video/sdl2_v.h
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2019-11-04 18:16:34 +0000
committerCharles Pigott <charlespigott@googlemail.com>2019-11-10 17:58:42 +0000
commita15ace0f5b7efcc55717fa4f7ddfb0f50f5d0f6f (patch)
tree2e5dce72621828e6f7250f82ae9c1e5a8617192e /src/video/sdl2_v.h
parent1dba06656d5dda3f8efc6a3dc2a8596428e17df5 (diff)
downloadopenttd-a15ace0f5b7efcc55717fa4f7ddfb0f50f5d0f6f.tar.xz
Fix #7783, Fix #7816: [SDL2] Fix input handling in edit context
In particular this fixes handling of the shift key
Diffstat (limited to 'src/video/sdl2_v.h')
-rw-r--r--src/video/sdl2_v.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video/sdl2_v.h b/src/video/sdl2_v.h
index ba7e322ed..ed8543ed4 100644
--- a/src/video/sdl2_v.h
+++ b/src/video/sdl2_v.h
@@ -37,10 +37,19 @@ public:
bool ClaimMousePointer() override;
+ void EditBoxGainedFocus() override;
+
+ void EditBoxLostFocus() override;
+
const char *GetName() const override { return "sdl"; }
private:
int PollEvent();
bool CreateMainSurface(uint w, uint h, bool resize);
+
+ /**
+ * This is true to indicate that keyboard input is in text input mode, and SDL_TEXTINPUT events are enabled.
+ */
+ bool edit_box_focused;
};
/** Factory for the SDL video driver. */