group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
InputBindings.hpp File Reference
#include "SDL3/SDL_events.h"
#include "SDL3/SDL_gamepad.h"
#include "SDL3/SDL_mouse.h"
#include "SDL3/SDL_scancode.h"
#include <array>
#include <cstddef>
#include <cstdint>
#include <string>
#include <string_view>
Include dependency graph for InputBindings.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Binding
 One configurable action binding. More...
class  InputBindings
 Stores action-to-input bindings and helper conversions for UI and persistence. More...

Enumerations

enum class  Action : uint8_t {
  Forward , Back , Left , Right ,
  Jump , Crouch , AbilityMenu , Ability1 ,
  Ability2 , Shoot , Scope , Reload ,
  Pickup , SwitchToPrimary , SwitchToSecondary , PreviousWeapon ,
  NextWeapon , CycleGrenade , KillSelf , Scoreboard ,
  BuyMenu , PushToTalk , Count
}
 Player-configurable gameplay and HUD actions sampled by the client. More...
enum class  BindingDevice : uint8_t { KeyboardMouse , Controller }
enum class  BindingKind : uint8_t {
  Unbound , Keyboard , MouseButton , MouseWheel ,
  GamepadButton , GamepadAxis
}
 Physical input source type used by a binding. More...
enum class  MouseButton : uint8_t {
  None = 0 , Left = SDL_BUTTON_LEFT , Middle = SDL_BUTTON_MIDDLE , Right = SDL_BUTTON_RIGHT ,
  X1 = SDL_BUTTON_X1 , X2 = SDL_BUTTON_X2
}
 Mouse buttons supported by the rebind UI. More...
enum class  MouseWheelDirection : uint8_t { None , Up , Down }
enum class  GamepadAxisBinding : uint8_t { None , LeftTrigger , RightTrigger }

Enumeration Type Documentation

◆ Action

enum class Action : uint8_t
strong

Player-configurable gameplay and HUD actions sampled by the client.

Enumerator
Forward 

Move forward.

Back 

Move backward.

Left 

Strafe left.

Right 

Strafe right.

Jump 

Jump and skip respawn while dead.

Crouch 

Crouch and slide.

AbilityMenu 

Open the ability selection radial menu.

Ability1 

Activate the first ability slot.

Ability2 

Activate the second ability slot.

Shoot 

Fire the equipped weapon.

Scope 

Aim/scope the equipped weapon.

Reload 

Reload the equipped weapon.

Pickup 

Pick up an interactable weapon or item.

SwitchToPrimary 

Switch to the primary weapon slot.

SwitchToSecondary 

Switch to the secondary weapon slot.

PreviousWeapon 

Cycle to the previous weapon slot.

NextWeapon 

Cycle to the next weapon slot.

CycleGrenade 

Quick-throw or open the grenade radial menu.

KillSelf 

Request self-elimination.

Scoreboard 

Show the scoreboard while held.

BuyMenu 

Toggle the buy menu.

PushToTalk 

Hold to transmit voice chat.

Count 

Keep this last, used for iteration and array sizing.

◆ BindingDevice

enum class BindingDevice : uint8_t
strong
Enumerator
KeyboardMouse 
Controller 

◆ BindingKind

enum class BindingKind : uint8_t
strong

Physical input source type used by a binding.

Enumerator
Unbound 

No physical input is assigned.

Keyboard 

SDL keyboard scancode binding.

MouseButton 

SDL mouse button binding.

MouseWheel 

SDL mouse wheel direction binding.

GamepadButton 

SDL gamepad button binding.

GamepadAxis 

SDL gamepad trigger-axis binding.

◆ GamepadAxisBinding

enum class GamepadAxisBinding : uint8_t
strong
Enumerator
None 
LeftTrigger 
RightTrigger 

◆ MouseButton

enum class MouseButton : uint8_t
strong

Mouse buttons supported by the rebind UI.

Enumerator
None 

No mouse button.

Left 

Left mouse button.

Middle 

Middle mouse button.

Right 

Right mouse button.

X1 

First extra mouse button.

X2 

Second extra mouse button.

◆ MouseWheelDirection

enum class MouseWheelDirection : uint8_t
strong
Enumerator
None 
Up 
Down