Event in lua (partial)
Some checks failed
Build Dusk / run-tests (push) Failing after 2m30s
Build Dusk / build-linux (push) Failing after 2m37s
Build Dusk / build-psp (push) Failing after 1m54s

This commit is contained in:
2026-01-27 12:47:15 -06:00
parent 9b73f1717f
commit 6e78ee188d
12 changed files with 345 additions and 19 deletions

View File

@@ -8,10 +8,23 @@
#pragma once
#include "inputbutton.h"
#include "inputaction.h"
#include "event/event.h"
#define INPUT_LISTENER_PRESSED_MAX 16
#define INPUT_LISTENER_RELEASED_MAX INPUT_LISTENER_PRESSED_MAX
typedef struct {
const inputaction_t action;
} inputevent_t;
typedef struct {
inputactiondata_t actions[INPUT_ACTION_COUNT];
eventlistener_t pressedListeners[INPUT_LISTENER_PRESSED_MAX];
event_t eventPressed;
eventlistener_t releasedListeners[INPUT_LISTENER_RELEASED_MAX];
event_t eventReleased;
#if INPUT_GAMEPAD == 1
float_t deadzone;
#endif