1#ifndef GAME_CLIENT_COMPONENTS_TOUCH_CONTROLS_H
2#define GAME_CLIENT_COMPONENTS_TOUCH_CONTROLS_H
40 int Sizeof()
const override {
return sizeof(*this); }
44 bool OnTouchState(
const std::vector<IInput::CTouchFingerState> &vTouchFingerStates)
override;
358 static constexpr const char *
const BEHAVIOR_ID =
"joystick-action";
531 void UpdateButtons(
const std::vector<IInput::CTouchFingerState> &vTouchFingerStates);
Definition: component.h:20
Definition: jsonwriter.h:15
Definition: touch_controls.h:500
IInput::CTouchFinger m_Finger
Definition: touch_controls.h:503
bool m_Active
Definition: touch_controls.h:502
Definition: touch_controls.h:157
int m_Y
Definition: touch_controls.h:160
int m_X
Definition: touch_controls.h:159
int m_H
Definition: touch_controls.h:162
int m_W
Definition: touch_controls.h:161
Definition: touch_controls.h:22
void UpdateButtons(const std::vector< IInput::CTouchFingerState > &vTouchFingerStates)
Definition: touch_controls.cpp:915
void OnWindowResize() override
Definition: touch_controls.cpp:722
void RenderButtons()
Definition: touch_controls.cpp:1096
void OnReset() override
Definition: touch_controls.cpp:716
std::optional< EDirectTouchIngameMode > ParseDirectTouchIngameMode(const json_value *pModeValue)
Definition: touch_controls.cpp:1189
void WriteConfiguration(CJsonWriter *pWriter)
Definition: touch_controls.cpp:1549
int m_DirectTouchLastAction
Definition: touch_controls.h:497
int NextActiveAction(int Action) const
Definition: touch_controls.cpp:865
void SaveConfigurationToClipboard()
Definition: touch_controls.cpp:805
int m_ActionSelected
Definition: touch_controls.h:491
void SetEditingActive(bool EditingActive)
Definition: touch_controls.h:65
void OnRender() override
Definition: touch_controls.cpp:751
int NextDirectTouchAction() const
Definition: touch_controls.cpp:879
EButtonShape
Definition: touch_controls.h:74
static constexpr const char *const SHAPE_NAMES[(int) EButtonShape::NUM_SHAPES]
Definition: touch_controls.h:80
bool m_aExtraMenuActive[(int) EButtonVisibility::EXTRA_MENU_5 -(int) EButtonVisibility::EXTRA_MENU_1+1]
Definition: touch_controls.h:486
bool IsEditingActive() const
Definition: touch_controls.h:64
int Sizeof() const override
Definition: touch_controls.h:40
EDirectTouchSpectateMode DirectTouchSpectate() const
Definition: touch_controls.h:58
bool LoadConfigurationFromClipboard()
Definition: touch_controls.cpp:785
std::optional< EDirectTouchSpectateMode > ParseDirectTouchSpectateMode(const json_value *pModeValue)
Definition: touch_controls.cpp:1219
std::optional< CTouchButton > ParseButton(const json_value *pButtonObject)
Definition: touch_controls.cpp:1249
std::unique_ptr< CBindTouchButtonBehavior > ParseBindBehavior(const json_value *pBehaviorObject)
Definition: touch_controls.cpp:1449
bool m_EditingActive
Definition: touch_controls.h:521
vec2 CalculateScreenSize() const
Definition: touch_controls.cpp:1109
std::unique_ptr< CBindToggleTouchButtonBehavior > ParseBindToggleBehavior(const json_value *pBehaviorObject)
Definition: touch_controls.cpp:1490
CActionState m_aDirectTouchActionStates[NUM_ACTIONS]
Definition: touch_controls.h:509
static constexpr const char *const DIRECT_TOUCH_SPECTATE_MODE_NAMES[(int) EDirectTouchSpectateMode::NUM_STATES]
Definition: touch_controls.h:71
std::vector< CTouchButton > m_vTouchButtons
Definition: touch_controls.h:481
bool LoadConfigurationFromFile(int StorageType)
Definition: touch_controls.cpp:770
void OnInit() override
Definition: touch_controls.cpp:707
void SetDirectTouchSpectate(EDirectTouchSpectateMode DirectTouchSpectate)
Definition: touch_controls.h:59
void SetEditingChanges(bool EditingChanges)
Definition: touch_controls.h:67
std::unique_ptr< CExtraMenuTouchButtonBehavior > ParseExtraMenuBehavior(const json_value *pBehaviorObject)
Definition: touch_controls.cpp:1432
EDirectTouchIngameMode
Definition: touch_controls.h:25
EDirectTouchIngameMode DirectTouchIngame() const
Definition: touch_controls.h:52
bool HasEditingChanges() const
Definition: touch_controls.h:66
std::unique_ptr< CPredefinedTouchButtonBehavior > ParsePredefinedBehavior(const json_value *pBehaviorObject)
Definition: touch_controls.cpp:1393
void SetDirectTouchIngame(EDirectTouchIngameMode DirectTouchIngame)
Definition: touch_controls.h:53
bool ParseConfiguration(const void *pFileData, unsigned FileLength)
Definition: touch_controls.cpp:1116
@ ACTION_AIM
Definition: touch_controls.h:120
@ ACTION_HOOK
Definition: touch_controls.h:122
@ NUM_ACTIONS
Definition: touch_controls.h:123
@ ACTION_FIRE
Definition: touch_controls.h:121
void ResetButtons()
Definition: touch_controls.cpp:1084
bool OnTouchState(const std::vector< IInput::CTouchFingerState > &vTouchFingerStates) override
Definition: touch_controls.cpp:731
CButtonVisibilityData m_aVisibilityFunctions[(int) EButtonVisibility::NUM_VISIBILITIES]
Definition: touch_controls.h:116
static constexpr const char *const LABEL_TYPE_NAMES[(int) CButtonLabel::EType::NUM_TYPES]
Definition: touch_controls.h:154
std::unique_ptr< CTouchButtonBehavior > ParseBehavior(const json_value *pBehaviorObject)
Definition: touch_controls.cpp:1358
EDirectTouchIngameMode m_DirectTouchIngame
Definition: touch_controls.h:467
bool SaveConfigurationToFile()
Definition: touch_controls.cpp:791
bool m_EditingChanges
Definition: touch_controls.h:526
EButtonVisibility
Definition: touch_controls.h:83
EDirectTouchSpectateMode
Definition: touch_controls.h:34
CJoystickActionTouchButtonBehavior * m_pPrimaryJoystickTouchButtonBehavior
Definition: touch_controls.h:516
void InitVisibilityFunctions()
Definition: touch_controls.cpp:813
static constexpr const char *const DIRECT_TOUCH_INGAME_MODE_NAMES[(int) EDirectTouchIngameMode::NUM_STATES]
Definition: touch_controls.h:70
EDirectTouchSpectateMode m_DirectTouchSpectate
Definition: touch_controls.h:474
struct _json_value json_value
Definition: serverbrowser.h:17