From 85b9fe1438840ef507164b9ea3891492534d3cb6 Mon Sep 17 00:00:00 2001 From: Jett Date: Sun, 28 Sep 2025 16:44:46 -0400 Subject: [PATCH] adjusted formatting. --- examples/core/core_input_actions.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/examples/core/core_input_actions.c b/examples/core/core_input_actions.c index b9b18c21d..633c3ee85 100644 --- a/examples/core/core_input_actions.c +++ b/examples/core/core_input_actions.c @@ -25,12 +25,13 @@ which can be reassigned to e.g. KEY_A and also assigned to a gamepad button. the action will trigger with either gamepad or keys */ + #include #include #include #include "raylib.h" // add your own action types here -enum +typedef enum ActionType { NO_ACTION, ACTION_UP, @@ -39,24 +40,24 @@ enum ACTION_RIGHT, ACTION_FIRE, MAX_ACTION -} Action_Type; +} ActionType; // struct for key and button inputs -typedef struct +typedef struct ActionInput { int key; int button; -} Action_Input_t; +} ActionInput; // gamepad index, change this if you have multiple gamepads. -int GamePadID = 0; -static Action_Input_t _actions[MAX_ACTION] = {0}; +int gamepadIndex = 0; +static ActionInput _actions[MAX_ACTION] = {0}; // combines IsKeyPressed and IsGameButtonPressed to one action bool isActionPressed(int action) { if (action