mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Added love.keyboard.setTextInput to enable/disable text input events (enabled by default.)
This fixes the issue of receiving an unwanted text input event if a key is used to bring a game's textbox into focus, since textinput events can be triggered after keypress events if the keypress generates text.
This commit is contained in:
@@ -254,6 +254,17 @@ public:
|
||||
**/
|
||||
virtual bool isDown(Key *keylist) const = 0;
|
||||
|
||||
/**
|
||||
* Sets whether text input events should be sent
|
||||
* @param enable Whether to send text input events.
|
||||
**/
|
||||
virtual void setTextInput(bool enable) = 0;
|
||||
|
||||
/**
|
||||
* Gets whether text input events are enabled.
|
||||
**/
|
||||
virtual bool hasTextInput() const = 0;
|
||||
|
||||
static bool getConstant(const char *in, Key &out);
|
||||
static bool getConstant(Key in, const char *&out);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user