ezEngine  Milestone 7
ezInputSlotFlags Struct Reference

These flags are specified when registering an input slot (by a device), to define some capabilities and restrictions of the hardware. More...

#include <Declarations.h>


struct  Bits

Public Types

enum  Enum {
  None = 0, ReportsRelativeValues = EZ_BIT(0), ValueBinaryZeroOrOne = EZ_BIT(1), ValueRangeZeroToOne = EZ_BIT(2),
  ValueRangeZeroToInf = EZ_BIT(3), Pressable = EZ_BIT(4), Holdable = EZ_BIT(5), HalfAxis = EZ_BIT(6),
  FullAxis = EZ_BIT(7), RequiresDeadZone = EZ_BIT(8), ValuesAreNonContinuous = EZ_BIT(9), ActivationDependsOnOthers = EZ_BIT(10),
  NeverTimeScale = EZ_BIT(11), IsButton = ValueBinaryZeroOrOne | Pressable | Holdable, IsMouseWheel = ReportsRelativeValues | ValueRangeZeroToInf | Pressable | HalfAxis | NeverTimeScale, IsAnalogTrigger = ValueRangeZeroToOne | Pressable | Holdable | FullAxis | RequiresDeadZone,
  IsMouseAxisPosition = ValueRangeZeroToOne | FullAxis | NeverTimeScale, IsMouseAxisMove = ReportsRelativeValues | ValueRangeZeroToInf | HalfAxis | NeverTimeScale, IsAnalogStick = ValueRangeZeroToOne | Holdable | HalfAxis | RequiresDeadZone, IsDoubleClick = ValueBinaryZeroOrOne | Pressable | NeverTimeScale,
  IsTouchPosition = ValueRangeZeroToOne | FullAxis | NeverTimeScale | ValuesAreNonContinuous, IsTouchPoint = ValueBinaryZeroOrOne | Pressable | Holdable | ActivationDependsOnOthers, IsDPad = ValueBinaryZeroOrOne | Pressable | Holdable | HalfAxis, Default = None
typedef ezUInt16 StorageType

Detailed Description

These flags are specified when registering an input slot (by a device), to define some capabilities and restrictions of the hardware.

By default you do not need to use these flags at all. However, when presenting the user with a list of 'possible' buttons to press to map to an action, these flags can be used to filter out unwanted slots. For example you can filter out mouse movements by requiring that the input slot must be pressable or may not represent any axis. You an additionally also use the prefix of the input slot name, to filter out all touch input slots etc. if necessary.

Class Documentation

struct ezInputSlotFlags::Bits
Class Members
StorageType ActivationDependsOnOthers: 1
StorageType FullAxis: 1
StorageType HalfAxis: 1
StorageType Holdable: 1
StorageType Pressable: 1
StorageType ReportsRelativeValues: 1
StorageType RequiresDeadZone: 1
StorageType ValueBinaryZeroOrOne: 1
StorageType ValueRangeZeroToInf: 1
StorageType ValueRangeZeroToOne: 1
StorageType ValuesAreNonContinuous: 1

Member Enumeration Documentation


The input slot reports delta values (e.g. a mouse move), instead of absolute values.


The input slot will either be zero or one. Used for all buttons and keys.


The input slot has analog values between zero and one. Used for analog axis like the xbox triggers or thumb-sticks.


The input slot has unbounded values larger than zero. Used for all absolute positions, such as the mouse position.


The slot can be pressed (e.g. a key). This is not possible for an axis, such as the mouse of an analog stick.


The user can hold down the key. Possible for buttons, but not for axes or for wheels such as the mouse wheel.


The input slot represents one half of the actually possible data. Used for all axes (pos / neg mouse movement, thumb-sticks).


The input slot represents one full axis. Mostly used for devices that report absolute values, such as the mouse position or touch input positions (values between zero and one)


The input slot represents hardware that should use a dead zone, otherwise it might fire prematurely. Mostly used on thumb-sticks and trigger buttons.


The values of the slot can jump around randomly, ie. the user can input arbitrary values, like the position on a touchpad.


Whether this slot can be activated depends on whether certain other slots are active. This is the case for touch-points which are numbered depending on how many other touch-points are already active.


When this flag is specified, data from the input slot will never be scaled by the input update time difference. Important for mouse deltas and such.

The documentation for this struct was generated from the following file: