HPL3/Amnesia: Rebirth/Scripting/cLuxInputHandler

From Frictional Wiki
< HPL3‎ | Amnesia: Rebirth‎ | Scripting
Revision as of 22:33, 15 November 2020 by Abion47 (talk | contribs) (Created page with "{{ScriptingStub}} Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki! ==Fields== cLuxInputHandler has no public fields. ==...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Fields

cLuxInputHandler has no public fields.

Functions

Return Type Function And Description
void AddKeyboardLayoutKey(eKey aKey, eLuxKeyboardLayoutType aType, const cImGuiGfx &in aGfxKey, const cImGuiLabelData &in aLabelKey)
void AddKeyboardLayoutRange(eKey aFirstKey, eKey aLastKey, eLuxKeyboardLayoutType aType, const cImGuiGfx &in aGfxKey, const cImGuiLabelData &in aLabelKey)
void AddPresetToProfile(const tString &in asProfile, const tString &in asPreset, const array<int> avActions, const array<tString> avBindings, const array<bool> avAnalog)
void ClearKeyboardLayout()
void CreateAction(const tString &in asName, int alId, bool abConfigurable, const tString &in asCat)
void CreateActionInput(const tString &in asInputType, int alActionId)
void CreateAnalogAction(const tString &in asName, int alId, bool abConfigurable, const tString &in asCat, int alAxis, float afMul, int alAnalogId)
void CreateAnalogGamepadAction(const tString &in asName, int alId, const tString &in asCat, int alAnalogId, float afSmoothness, int alDirectionLimit, int alMaxAccelerationPos, float afPrevAccelerationPosMul)
void CreateAnalogGamepadActionInput(const tString &in asInputType, int alActionId)
void CreateDebugAction(const tString &in asName, int alId)
void CreateGamepadProfile(const tString &in asName, const tString &in asPrefix, const array<tString> avButtons, const array<tString> avAxes, const array<uint> avDPad)
void FetchGamepadInputLayoutString(const tString &in asInputName, tString &out asPrefixName, tString &out asLayoutString)
tString GetActionName(int alId, bool abAnalog)
void GetActionsAssociatedToGamepadControl(const tString &in asProfile, const tString &in asPreset, const tString &in asControl, tString &out asActions)
bool GetGamepadMappingAction(int alId, int &out alAction, tString &out asPrimary, bool &out abAnalog)
int GetGamepadMappingActionNum()
float GetGamepadSensitivity()
bool GetGamepadWasLastDeviceUsed()
int GetLastUsedGamepadIndex(float afTimeLimit = -1.0f)
tString GetLatestKeyPressed()
int GetMaxSmoothMousePos()
float GetMouseSensitivity()
float GetPrevSmoothMousePosMul()
cVector2f GetRelMousePos()
bool GetSmoothMouse()
cVector2f GetSmoothMousePos(const cVector2f &in avRelPosMouse)
float GetTimeSinceGamepadWasUsed(int alID)
bool IsGamepadConnected()
bool IsYAxisInverted()
void LoadKeyConfig()
void ResetSmoothMousePos()
void SetGamepadColor(int alDevice, const cColor &in aColor)
void SetGamepadMapping(const tString &in asProfile, const tString &in asPreset)
void SetGamepadSensitivity(float afX)
void SetKeyboardLayoutDefaults(const cImGuiGfx &in aGfxKey, const cImGuiLabelData &in aLabelKey)
void SetMaxSmoothMousePos(int alX)
void SetMouseLayout(const array<tString> avButtons)
void SetMouseSensitivity(float afX)
void SetPrevSmoothMousePosMul(float afX)
void SetPrimaryGamepad(int alDevice)
void SetRumble(int alDevice, float afStrength, float afDuration)
void SetSmoothMouse(bool abX)
bool WasAnalogueInputFromPad()

Details

AddKeyboardLayoutKey

void AddKeyboardLayoutKey(eKey aKey,
                          eLuxKeyboardLayoutType aType,
                          const cImGuiGfx &in aGfxKey,
                          const cImGuiLabelData &in aLabelKey)


Parameters

Returns:

  • void

AddKeyboardLayoutRange

void AddKeyboardLayoutRange(eKey aFirstKey,
                            eKey aLastKey,
                            eLuxKeyboardLayoutType aType,
                            const cImGuiGfx &in aGfxKey,
                            const cImGuiLabelData &in aLabelKey)


Parameters

Returns:

  • void

AddPresetToProfile

void AddPresetToProfile(const tString &in asProfile,
                        const tString &in asPreset,
                        const int avActions,
                        const tString avBindings,
                        const bool avAnalog)


Parameters

  • asProfile (tString) —
  • asPreset (tString) —
  • avActions (int) —
  • avBindings (tString) —
  • avAnalog (bool) —

Returns:

  • void

ClearKeyboardLayout

void ClearKeyboardLayout()

Returns:

  • void

CreateAction

void CreateAction(const tString &in asName,
                  int alId,
                  bool abConfigurable,
                  const tString &in asCat)


Parameters

  • asName (tString) —
  • alId (int) —
  • abConfigurable (bool) —
  • asCat (tString) —

Returns:

  • void

CreateActionInput

void CreateActionInput(const tString &in asInputType,
                       int alActionId)


Parameters

  • asInputType (tString) —
  • alActionId (int) —

Returns:

  • void

CreateAnalogAction

void CreateAnalogAction(const tString &in asName,
                        int alId,
                        bool abConfigurable,
                        const tString &in asCat,
                        int alAxis,
                        float afMul,
                        int alAnalogId)


Parameters

  • asName (tString) —
  • alId (int) —
  • abConfigurable (bool) —
  • asCat (tString) —
  • alAxis (int) —
  • afMul (float) —
  • alAnalogId (int) —

Returns:

  • void

CreateAnalogGamepadAction

void CreateAnalogGamepadAction(const tString &in asName,
                               int alId,
                               const tString &in asCat,
                               int alAnalogId,
                               float afSmoothness,
                               int alDirectionLimit,
                               int alMaxAccelerationPos,
                               float afPrevAccelerationPosMul)


Parameters

  • asName (tString) —
  • alId (int) —
  • asCat (tString) —
  • alAnalogId (int) —
  • afSmoothness (float) —
  • alDirectionLimit (int) —
  • alMaxAccelerationPos (int) —
  • afPrevAccelerationPosMul (float) —

Returns:

  • void

CreateAnalogGamepadActionInput

void CreateAnalogGamepadActionInput(const tString &in asInputType,
                                    int alActionId)


Parameters

  • asInputType (tString) —
  • alActionId (int) —

Returns:

  • void

CreateDebugAction

void CreateDebugAction(const tString &in asName,
                       int alId)


Parameters

  • asName (tString) —
  • alId (int) —

Returns:

  • void

CreateGamepadProfile

void CreateGamepadProfile(const tString &in asName,
                          const tString &in asPrefix,
                          const tString avButtons,
                          const tString avAxes,
                          const uint avDPad)


Parameters

Returns:

  • void

FetchGamepadInputLayoutString

void FetchGamepadInputLayoutString(const tString &in asInputName,
                                   tString &out asPrefixName,
                                   tString &out asLayoutString)


Parameters

Returns:

  • void

GetActionName

tString GetActionName(int alId,
                      bool abAnalog)


Parameters

  • alId (int) —
  • abAnalog (bool) —

Returns:

  • tString

GetActionsAssociatedToGamepadControl

void GetActionsAssociatedToGamepadControl(const tString &in asProfile,
                                          const tString &in asPreset,
                                          const tString &in asControl,
                                          tString &out asActions)


Parameters

Returns:

  • void

GetGamepadMappingAction

bool GetGamepadMappingAction(int alId,
                             int &out alAction,
                             tString &out asPrimary,
                             bool &out abAnalog)


Parameters

  • alId (int) —
  • alAction (int) —
  • asPrimary (tString) —
  • abAnalog (bool) —

Returns:

  • bool

GetGamepadMappingActionNum

int GetGamepadMappingActionNum()

Returns:

  • int

GetGamepadSensitivity

float GetGamepadSensitivity()

Returns:

  • float

GetGamepadWasLastDeviceUsed

bool GetGamepadWasLastDeviceUsed()

Returns:

  • bool

GetLastUsedGamepadIndex

int GetLastUsedGamepadIndex(float afTimeLimit = -1.0f)


Parameters

  • afTimeLimit (float) —

Returns:

  • int

GetLatestKeyPressed

const tString& GetLatestKeyPressed()

Returns:

  • const tString&

GetMaxSmoothMousePos

int GetMaxSmoothMousePos()

Returns:

  • int

GetMouseSensitivity

float GetMouseSensitivity()

Returns:

  • float

GetPrevSmoothMousePosMul

float GetPrevSmoothMousePosMul()

Returns:

  • float

GetRelMousePos

cVector2f GetRelMousePos()

Returns:

  • cVector2f

GetSmoothMouse

bool GetSmoothMouse()

Returns:

  • bool

GetSmoothMousePos

cVector2f GetSmoothMousePos(const cVector2f &in avRelPosMouse)


Parameters

Returns:

  • cVector2f

GetTimeSinceGamepadWasUsed

float GetTimeSinceGamepadWasUsed(int alID)


Parameters

  • alID (int) —

Returns:

  • float

IsGamepadConnected

bool IsGamepadConnected()

Returns:

  • bool

IsYAxisInverted

bool IsYAxisInverted()

Returns:

  • bool

LoadKeyConfig

void LoadKeyConfig()

Returns:

  • void

ResetSmoothMousePos

void ResetSmoothMousePos()

Returns:

  • void

SetGamepadColor

void SetGamepadColor(int alDevice,
                     const cColor &in aColor)


Parameters

  • alDevice (int) —
  • aColor (cColor) —

Returns:

  • void

SetGamepadMapping

void SetGamepadMapping(const tString &in asProfile,
                       const tString &in asPreset)


Parameters

Returns:

  • void

SetGamepadSensitivity

void SetGamepadSensitivity(float afX)


Parameters

  • afX (float) —

Returns:

  • void

SetKeyboardLayoutDefaults

void SetKeyboardLayoutDefaults(const cImGuiGfx &in aGfxKey,
                               const cImGuiLabelData &in aLabelKey)


Parameters

Returns:

  • void

SetMaxSmoothMousePos

void SetMaxSmoothMousePos(int alX)


Parameters

  • alX (int) —

Returns:

  • void

SetMouseLayout

void SetMouseLayout(const tString avButtons)


Parameters

Returns:

  • void

SetMouseSensitivity

void SetMouseSensitivity(float afX)


Parameters

  • afX (float) —

Returns:

  • void

SetPrevSmoothMousePosMul

void SetPrevSmoothMousePosMul(float afX)


Parameters

  • afX (float) —

Returns:

  • void

SetPrimaryGamepad

void SetPrimaryGamepad(int alDevice)


Parameters

  • alDevice (int) —

Returns:

  • void

SetRumble

void SetRumble(int alDevice,
               float afStrength,
               float afDuration)


Parameters

  • alDevice (int) —
  • afStrength (float) —
  • afDuration (float) —

Returns:

  • void

SetSmoothMouse

void SetSmoothMouse(bool abX)


Parameters

  • abX (bool) —

Returns:

  • void

WasAnalogueInputFromPad

bool WasAnalogueInputFromPad()

Returns:

  • bool

References

See all references...