Nebula
Loading...
Searching...
No Matches
Input Namespace Reference

Detailed Description

FIXME!

Namespaces

namespace  Modifier
 The modifier keys as a bitmask.

Classes

struct  ActionBinding
 One control. More...
struct  ActionEntry
 An action as the map holds it. More...
class  ActionMap
 An action is a name for something the game asks for, such as "Jump". More...
struct  ActionPrev
 What an edge is measured against. More...
struct  ActionState
 One action for one player, as this frame built it. More...
class  InputDisplayEventHandler
 Translates DisplayEvents that are relevant for the input system into InputEvents. More...
class  InputEvent
 The input events of the Input subsystems. More...
class  InputHandler
 Input handlers receive and process input events. More...
class  InputPriority
 Input priorities for input handlers. More...
class  InputServer
 The InputServer is the central object of the Input subsystem. More...
class  Key
 Define standard key codes. More...
class  Mouse
 An input handler which represents a mouse for polling. More...
class  MouseButton
 Mouse button codes and conversion from/to string. More...
struct  PlayerDevice
 One device a player can answer from. More...
struct  PlayerSlot
 A player as the devices its bindings can answer from. More...

Typedefs

using ActionId = IndexT
 The index of an action in the map. A name the map does not have answers with InvalidAction.
typedef unsigned char Char

Enumerations

enum  DeviceType { InvalidDevice = 0 , KeyboardMouseDevice , GamePadDevice }
enum  SourceType {
  InvalidSource = 0 , KeySource , MouseButtonSource , GamePadButtonSource ,
  GamePadAxisSource , MouseMoveSource , MouseWheelSource
}
enum  ActionKind { DigitalAction = 0 , AnalogAction }

Functions

 __ImplementClass (Input::ActionMap, 'INAM', Core::RefCounted)
 __ImplementInterfaceSingleton (Input::ActionMap)
ActionId FindAction (const Util::String &name)
 The reads as code uses them.
bool IsActionHeld (ActionId action, IndexT playerIndex=0)
bool IsActionPressed (ActionId action, IndexT playerIndex=0)
bool IsActionReleased (ActionId action, IndexT playerIndex=0)
float GetActionValue (ActionId action, IndexT playerIndex=0)
float GetAxis (ActionId negativeAction, ActionId positiveAction, IndexT playerIndex=0)
Math::vec2 GetAxis2 (ActionId negativeX, ActionId positiveX, ActionId negativeY, ActionId positiveY, IndexT playerIndex=0)
IndexT GetLastActionPlayer (ActionId action)
 __ImplementClass (Input::InputHandler, 'INPH', Core::RefCounted)
 __ImplementClass (Input::InputServer, 'INPS', GLFW::GLFWInputServer)
 __ImplementInterfaceSingleton (Input::InputServer)
 __ImplementClass (Input::InputDisplayEventHandler, 'WIEH', CoreGraphics::DisplayEventHandler)

Variables

constexpr ActionId InvalidAction = InvalidIndex
constexpr IndexT MaxActions = 256
 The size of the state block.
constexpr IndexT MaxPlayers = 4
constexpr IndexT MaxBindingsPerAction = 8
constexpr IndexT MaxDevicesPerPlayer = 2

Typedef Documentation

◆ ActionId

The index of an action in the map. A name the map does not have answers with InvalidAction.

◆ Char

typedef unsigned char Input::Char

Enumeration Type Documentation

◆ ActionKind

Enumerator
DigitalAction 
AnalogAction 

◆ DeviceType

Enumerator
InvalidDevice 
KeyboardMouseDevice 
GamePadDevice 

◆ SourceType

Enumerator
InvalidSource 
KeySource 
MouseButtonSource 
GamePadButtonSource 
GamePadAxisSource 
MouseMoveSource 
MouseWheelSource 

Function Documentation

◆ __ImplementClass() [1/4]

◆ __ImplementClass() [2/4]

◆ __ImplementClass() [3/4]

◆ __ImplementClass() [4/4]

◆ __ImplementInterfaceSingleton() [1/2]

◆ __ImplementInterfaceSingleton() [2/2]

◆ FindAction()

ActionId Input::FindAction ( const Util::String & name)
inline

The reads as code uses them.

They are the map's calls without naming the object.

◆ GetActionValue()

float Input::GetActionValue ( ActionId action,
IndexT playerIndex = 0 )
inline

◆ GetAxis()

float Input::GetAxis ( ActionId negativeAction,
ActionId positiveAction,
IndexT playerIndex = 0 )
inline

◆ GetAxis2()

Math::vec2 Input::GetAxis2 ( ActionId negativeX,
ActionId positiveX,
ActionId negativeY,
ActionId positiveY,
IndexT playerIndex = 0 )
inline

◆ GetLastActionPlayer()

IndexT Input::GetLastActionPlayer ( ActionId action)
inline

◆ IsActionHeld()

bool Input::IsActionHeld ( ActionId action,
IndexT playerIndex = 0 )
inline

◆ IsActionPressed()

bool Input::IsActionPressed ( ActionId action,
IndexT playerIndex = 0 )
inline

◆ IsActionReleased()

bool Input::IsActionReleased ( ActionId action,
IndexT playerIndex = 0 )
inline

Variable Documentation

◆ InvalidAction

ActionId Input::InvalidAction = InvalidIndex
constexpr

◆ MaxActions

IndexT Input::MaxActions = 256
constexpr

The size of the state block.

The managed mirror reads it with the same stride, so both sides must use the same numbers.

◆ MaxBindingsPerAction

IndexT Input::MaxBindingsPerAction = 8
constexpr

◆ MaxDevicesPerPlayer

IndexT Input::MaxDevicesPerPlayer = 2
constexpr

◆ MaxPlayers

IndexT Input::MaxPlayers = 4
constexpr