1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

SDL: Use scancodes for keybindings (#14964)

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
y5nw 2025-03-16 20:35:34 +01:00 committed by GitHub
parent e0378737b7
commit cc65c8bd70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 509 additions and 369 deletions

View file

@ -16,6 +16,7 @@
#include "itemdef.h"
#include "touchscreenlayout.h"
#include "util/basic_macros.h"
#include "client/keycode.h"
namespace irr
{
@ -57,7 +58,7 @@ enum class TapState
struct button_info
{
float repeat_counter;
EKEY_CODE keycode;
KeyPress keypress;
std::vector<size_t> pointer_ids;
std::shared_ptr<IGUIImage> gui_button = nullptr;
@ -202,7 +203,7 @@ private:
// for its buttons. We only want static image display, not interactivity,
// from Irrlicht.
void emitKeyboardEvent(EKEY_CODE keycode, bool pressed);
void emitKeyboardEvent(const KeyPress &keycode, bool pressed);
void loadButtonTexture(IGUIImage *gui_button, const std::string &path);
void buttonEmitAction(button_info &btn, bool action);