aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Windows64/KeyboardMouseInput.h
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Client/Windows64/KeyboardMouseInput.h')
-rw-r--r--Minecraft.Client/Windows64/KeyboardMouseInput.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Minecraft.Client/Windows64/KeyboardMouseInput.h b/Minecraft.Client/Windows64/KeyboardMouseInput.h
index 5945b26a..fff924bf 100644
--- a/Minecraft.Client/Windows64/KeyboardMouseInput.h
+++ b/Minecraft.Client/Windows64/KeyboardMouseInput.h
@@ -84,6 +84,11 @@ public:
void SetScreenCursorHidden(bool hidden) { m_screenWantsCursorHidden = hidden; }
bool IsScreenCursorHidden() const { return m_screenWantsCursorHidden; }
+ // Text input: buffer characters typed while the native keyboard scene is open
+ void OnChar(wchar_t c);
+ bool ConsumeChar(wchar_t &outChar);
+ void ClearCharBuffer();
+
float GetMoveX() const;
float GetMoveY() const;
@@ -129,6 +134,11 @@ private:
bool m_kbmActive;
bool m_screenWantsCursorHidden;
+
+ static const int CHAR_BUFFER_SIZE = 32;
+ wchar_t m_charBuffer[CHAR_BUFFER_SIZE];
+ int m_charBufferHead;
+ int m_charBufferTail;
};
extern KeyboardMouseInput g_KBMInput;