CommonLibSSE NG
BSGamepadDevice.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSInputDevice.h"
4 #include "RE/B/BSTEvent.h"
5 
6 namespace RE
7 {
8  struct BSGamepadEvent;
9 
11  public BSInputDevice, // 00
12  public BSTEventSource<BSGamepadEvent> // 70
13  {
14  public:
15  inline static constexpr auto RTTI = RTTI_BSGamepadDevice;
16  inline static constexpr auto VTABLE = VTABLE_BSGamepadDevice;
17 
18  struct ColorParam
19  {
20  std::uint32_t r;
21  std::uint32_t g;
22  std::uint32_t b;
23  };
24 
25  ~BSGamepadDevice() override; // 00
26 
27  // override (BSInputDevice)
28  bool IsEnabled() const override; // 07 - { return connected && userIndex != -1; }
29 
30  // add
31  virtual void SetRumble(float a_lValue, float a_rValue) = 0; // 09
32  virtual void SetLEDColor(ColorParam* a_colorParam); // 0A - { return; }
33  virtual void ResetLEDColor(); // 0B - { return; }
34  virtual void Unk_0C(void); // 0C - { return 0; }
35  virtual void ProcessRawInput(int32_t a_rawX, int32_t a_rawY, float& a_outX, float& a_outY); // 0D
36  virtual void Unk_0E(void); // 0E - { return; }
37 
38  // members
39  std::int32_t userIndex; // C8
40  bool connected; // CC
41  bool listeningForInput; // CD
42  std::uint16_t padCE; // CE
43 
44  protected:
46  };
47  static_assert(sizeof(BSGamepadDevice) == 0xD0);
48 }
Definition: BSGamepadDevice.h:13
virtual void ProcessRawInput(int32_t a_rawX, int32_t a_rawY, float &a_outX, float &a_outY)
virtual void Unk_0C(void)
static constexpr auto VTABLE
Definition: BSGamepadDevice.h:16
bool IsEnabled() const override
std::uint16_t padCE
Definition: BSGamepadDevice.h:42
virtual void ResetLEDColor()
bool listeningForInput
Definition: BSGamepadDevice.h:41
std::int32_t userIndex
Definition: BSGamepadDevice.h:39
virtual void SetRumble(float a_lValue, float a_rValue)=0
static constexpr auto RTTI
Definition: BSGamepadDevice.h:15
~BSGamepadDevice() override
bool connected
Definition: BSGamepadDevice.h:40
virtual void SetLEDColor(ColorParam *a_colorParam)
virtual void Unk_0E(void)
Definition: BSInputDevice.h:11
Definition: BSTEvent.h:19
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_BSGamepadDevice(690309, 398164, 0x1f5fce8)
constexpr std::array< REL::VariantID, 1 > VTABLE_BSGamepadDevice
Definition: Offsets_VTABLE.h:5433
Definition: BSGamepadDevice.h:19
std::uint32_t b
Definition: BSGamepadDevice.h:22
std::uint32_t g
Definition: BSGamepadDevice.h:21
std::uint32_t r
Definition: BSGamepadDevice.h:20