CommonLibSSE (Parapets fork)
RE::ControlMap Class Reference

#include <ControlMap.h>

Inheritance diagram for RE::ControlMap:
RE::BSTSingletonSDM< ControlMap > RE::BSTEventSource< UserEventEnabled > RE::BSTSingletonSDMBase< Traits >

Classes

struct  InputContext
 
struct  LinkedMapping
 
struct  UserEventMapping
 

Public Types

enum  : std::uint32_t { kInvalid = static_cast<std::uint8_t>(-1) }
 
using InputContextID = UserEvents::INPUT_CONTEXT_ID
 
using UEFlag = UserEvents::USER_EVENT_FLAG
 
- Public Types inherited from RE::BSTSingletonSDMBase< Traits >
using Type = typename Traits::Type
 
using Allocator = typename Traits::Allocator
 
- Public Types inherited from RE::BSTEventSource< UserEventEnabled >
using Sink = BSTEventSink< UserEventEnabled >
 

Public Member Functions

std::int8_t AllowTextInput (bool a_allow)
 
constexpr bool AreControlsEnabled (UEFlag a_flags) const noexcept
 
bool GetButtonNameFromUserEvent (const BSFixedString &a_eventID, INPUT_DEVICE a_device, BSFixedString &a_buttonName)
 
std::uint32_t GetMappedKey (std::string_view a_eventID, INPUT_DEVICE a_device, InputContextID a_context=InputContextID::kGameplay) const
 
bool GetMappingFromEventName (const BSFixedString &a_eventID, UserEvents::INPUT_CONTEXT_ID a_context, INPUT_DEVICE a_device, UserEventMapping &a_mapping)
 
std::string_view GetUserEventName (std::uint32_t a_buttonID, INPUT_DEVICE a_device, InputContextID a_context=InputContextID::kGameplay) const
 
constexpr bool IsActivateControlsEnabled () const noexcept
 
constexpr bool IsConsoleControlsEnabled () const noexcept
 
constexpr bool IsFightingControlsEnabled () const noexcept
 
constexpr bool IsLookingControlsEnabled () const noexcept
 
constexpr bool IsMenuControlsEnabled () const noexcept
 
constexpr bool IsMainFourControlsEnabled () const noexcept
 
constexpr bool IsMovementControlsEnabled () const noexcept
 
constexpr bool IsPOVSwitchControlsEnabled () const noexcept
 
constexpr bool IsSneakingControlsEnabled () const noexcept
 
constexpr bool IsVATSControlsEnabled () const noexcept
 
constexpr bool IsWheelZoomControlsEnabled () const noexcept
 
void StoreControls ()
 
void LoadStoredControls ()
 
void ToggleControls (UEFlag a_flags, bool a_enable, bool a_storeState)
 
- Public Member Functions inherited from RE::BSTEventSource< UserEventEnabled >
 BSTEventSource ()
 
void AddEventSink (Sink *a_eventSink)
 
void RemoveEventSink (Sink *a_eventSink)
 
void SendEvent (const UserEventEnabled *a_event)
 
void operator() (const UserEventEnabled *a_event)
 

Static Public Member Functions

static ControlMapGetSingleton ()
 

Public Attributes

InputContextcontrolMap [InputContextID::kTotal]
 
BSTArray< LinkedMappinglinkedMappings
 
BSTArray< InputContextIDcontextPriorityStack
 
stl::enumeration< UEFlag, std::uint32_t > enabledControls
 
stl::enumeration< UEFlag, std::uint32_t > storedControls
 
std::int8_t textEntryCount
 
bool ignoreKeyboardMouse
 
bool ignoreActivateDisabledEvents
 
std::uint8_t pad12B
 
stl::enumeration< PC_GAMEPAD_TYPE, std::uint32_t > gamePadMapType
 
- Public Attributes inherited from RE::BSTEventSource< UserEventEnabled >
BSTArray< Sink * > sinks
 
BSTArray< Sink * > pendingRegisters
 
BSTArray< Sink * > pendingUnregisters
 
BSSpinLock lock
 
bool notifying
 
std::uint8_t pad51
 
std::uint16_t pad52
 
std::uint32_t pad54
 

Member Typedef Documentation

◆ InputContextID

◆ UEFlag

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : std::uint32_t
Enumerator
kInvalid 

Member Function Documentation

◆ AllowTextInput()

std::int8_t RE::ControlMap::AllowTextInput ( bool  a_allow)

◆ AreControlsEnabled()

constexpr bool RE::ControlMap::AreControlsEnabled ( UEFlag  a_flags) const
inlineconstexprnoexcept

◆ GetButtonNameFromUserEvent()

bool RE::ControlMap::GetButtonNameFromUserEvent ( const BSFixedString a_eventID,
INPUT_DEVICE  a_device,
BSFixedString a_buttonName 
)

◆ GetMappedKey()

std::uint32_t RE::ControlMap::GetMappedKey ( std::string_view  a_eventID,
INPUT_DEVICE  a_device,
InputContextID  a_context = InputContextID::kGameplay 
) const

◆ GetMappingFromEventName()

bool RE::ControlMap::GetMappingFromEventName ( const BSFixedString a_eventID,
UserEvents::INPUT_CONTEXT_ID  a_context,
INPUT_DEVICE  a_device,
UserEventMapping a_mapping 
)

◆ GetSingleton()

static ControlMap* RE::ControlMap::GetSingleton ( )
static

◆ GetUserEventName()

std::string_view RE::ControlMap::GetUserEventName ( std::uint32_t  a_buttonID,
INPUT_DEVICE  a_device,
InputContextID  a_context = InputContextID::kGameplay 
) const

◆ IsActivateControlsEnabled()

constexpr bool RE::ControlMap::IsActivateControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsConsoleControlsEnabled()

constexpr bool RE::ControlMap::IsConsoleControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsFightingControlsEnabled()

constexpr bool RE::ControlMap::IsFightingControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsLookingControlsEnabled()

constexpr bool RE::ControlMap::IsLookingControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsMainFourControlsEnabled()

constexpr bool RE::ControlMap::IsMainFourControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsMenuControlsEnabled()

constexpr bool RE::ControlMap::IsMenuControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsMovementControlsEnabled()

constexpr bool RE::ControlMap::IsMovementControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsPOVSwitchControlsEnabled()

constexpr bool RE::ControlMap::IsPOVSwitchControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsSneakingControlsEnabled()

constexpr bool RE::ControlMap::IsSneakingControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsVATSControlsEnabled()

constexpr bool RE::ControlMap::IsVATSControlsEnabled ( ) const
inlineconstexprnoexcept

◆ IsWheelZoomControlsEnabled()

constexpr bool RE::ControlMap::IsWheelZoomControlsEnabled ( ) const
inlineconstexprnoexcept

◆ LoadStoredControls()

void RE::ControlMap::LoadStoredControls ( )

◆ StoreControls()

void RE::ControlMap::StoreControls ( )

◆ ToggleControls()

void RE::ControlMap::ToggleControls ( UEFlag  a_flags,
bool  a_enable,
bool  a_storeState 
)

Member Data Documentation

◆ contextPriorityStack

BSTArray<InputContextID> RE::ControlMap::contextPriorityStack

◆ controlMap

InputContext* RE::ControlMap::controlMap[InputContextID::kTotal]

◆ enabledControls

stl::enumeration<UEFlag, std::uint32_t> RE::ControlMap::enabledControls

◆ gamePadMapType

stl::enumeration<PC_GAMEPAD_TYPE, std::uint32_t> RE::ControlMap::gamePadMapType

◆ ignoreActivateDisabledEvents

bool RE::ControlMap::ignoreActivateDisabledEvents

◆ ignoreKeyboardMouse

bool RE::ControlMap::ignoreKeyboardMouse

◆ linkedMappings

BSTArray<LinkedMapping> RE::ControlMap::linkedMappings

◆ pad12B

std::uint8_t RE::ControlMap::pad12B

◆ storedControls

stl::enumeration<UEFlag, std::uint32_t> RE::ControlMap::storedControls

◆ textEntryCount

std::int8_t RE::ControlMap::textEntryCount

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