#include <touch_controls.h>
|
| enum class | EDirectTouchIngameMode {
DISABLED
, ACTION
, AIM
, FIRE
,
HOOK
, NUM_STATES
} |
| |
| enum class | EDirectTouchSpectateMode { DISABLED
, AIM
, NUM_STATES
} |
| |
| enum class | EButtonVisibility {
INGAME
, ZOOM_ALLOWED
, VOTE_ACTIVE
, DUMMY_ALLOWED
,
DUMMY_CONNECTED
, RCON_AUTHED
, DEMO_PLAYER
, EXTRA_MENU_1
,
EXTRA_MENU_2
, EXTRA_MENU_3
, EXTRA_MENU_4
, EXTRA_MENU_5
,
NUM_VISIBILITIES
} |
| |
| enum class | EButtonShape { RECT
, CIRCLE
, NUM_SHAPES
} |
| |
| enum class | EPopupType { BUTTON_CHANGED
, NO_SPACE
, BUTTON_INVISIBLE
, NUM_POPUPS
} |
| |
| enum class | EIssueType { CACHE_SETTINGS
, SAVE_SETTINGS
, CACHE_POSITION
, NUM_ISSUES
} |
| |
|
| int | Sizeof () const override |
| |
| void | OnInit () override |
| |
| void | OnReset () override |
| |
| void | OnWindowResize () override |
| |
| bool | OnTouchState (const std::vector< IInput::CTouchFingerState > &vTouchFingerStates) override |
| |
| void | OnRender () override |
| |
| bool | LoadConfigurationFromFile (int StorageType) |
| |
| bool | LoadConfigurationFromClipboard () |
| |
| bool | SaveConfigurationToFile () |
| |
| void | SaveConfigurationToClipboard () |
| |
| EDirectTouchIngameMode | DirectTouchIngame () const |
| |
| void | SetDirectTouchIngame (EDirectTouchIngameMode DirectTouchIngame) |
| |
| EDirectTouchSpectateMode | DirectTouchSpectate () const |
| |
| void | SetDirectTouchSpectate (EDirectTouchSpectateMode DirectTouchSpectate) |
| |
| bool | IsEditingActive () const |
| |
| void | SetEditingActive (bool EditingActive) |
| |
| bool | HasEditingChanges () const |
| |
| void | SetEditingChanges (bool EditingChanges) |
| |
| CTouchButton * | NewButton () |
| |
| void | DeleteSelectedButton () |
| |
| bool | IsRectOverlapping (CUnitRect MyRect={0, 0, BUTTON_SIZE_MINIMUM, BUTTON_SIZE_MINIMUM}) const |
| |
| CUnitRect | UpdatePosition (CUnitRect MyRect, bool Ignore=false) |
| |
| void | ResetButtonPointers () |
| |
| void | ResetVirtualVisibilities () |
| |
| CUIRect | CalculateScreenFromUnitRect (CUnitRect Unit, EButtonShape Shape=EButtonShape::RECT) const |
| |
| bool | HasUnsavedChanges () const |
| |
| void | SetUnsavedChanges (bool UnsavedChanges) |
| |
| std::array< bool,(size_t) EButtonVisibility::NUM_VISIBILITIES > | VirtualVisibilities () const |
| |
| void | ReverseVirtualVisibilities (int Number) |
| |
| std::optional< CUnitRect > | ShownRect () const |
| |
| void | SetShownRect (std::optional< CUnitRect > Rect) |
| |
| CTouchButton * | SelectedButton () const |
| |
| void | SetSelectedButton (CTouchButton *TargetButton) |
| |
| bool | NoRealButtonSelected () const |
| |
| void | RemakeSampleButton () |
| |
| CTouchButton * | SampleButton () const |
| |
| bool | IsButtonEditing () const |
| |
| ColorRGBA | DefaultBackgroundColorInactive () const |
| |
| ColorRGBA | DefaultBackgroundColorActive () const |
| |
| ColorRGBA | BackgroundColorInactive () const |
| |
| ColorRGBA | BackgroundColorActive () const |
| |
| void | SetBackgroundColorInactive (ColorRGBA Color) |
| |
| void | SetBackgroundColorActive (ColorRGBA Color) |
| |
| std::vector< CTouchButton * > | GetButtonsEditor () |
| |
| bool | PreviewAllButtons () const |
| |
| void | SetPreviewAllButtons (bool Preview) |
| |
| CPopupParam | RequiredPopup () |
| |
| bool | AnyIssueNotResolved () const |
| |
| std::array< CTouchControls::CIssueParam,(unsigned) CTouchControls::EIssueType::NUM_ISSUES > | Issues () |
| |
| virtual | ~CComponent ()=default |
| |
| virtual void | OnStateChange (int NewState, int OldState) |
| |
| virtual void | OnConsoleInit () |
| |
| virtual void | OnShutdown () |
| |
| virtual void | OnUpdate () |
| |
| virtual void | OnNewSnapshot () |
| |
| virtual void | OnRelease () |
| |
| virtual void | OnMapLoad () |
| |
| virtual void | OnMessage (int Msg, void *pRawMsg) |
| |
| virtual bool | OnCursorMove (float x, float y, IInput::ECursorType CursorType) |
| |
| virtual bool | OnInput (const IInput::CEvent &Event) |
| |
| virtual void | OnInterfacesInit (CGameClient *pClient) |
| |
| virtual | ~CComponentInterfaces ()=default |
| |
|
| CButtonVisibilityData | m_aVisibilityFunctions [(int) EButtonVisibility::NUM_VISIBILITIES] |
| |
| EDirectTouchIngameMode | m_DirectTouchIngame = EDirectTouchIngameMode::ACTION |
| |
| EDirectTouchSpectateMode | m_DirectTouchSpectate = EDirectTouchSpectateMode::AIM |
| |
| ColorRGBA | m_BackgroundColorInactive = ColorRGBA(0.0f, 0.0f, 0.0f, 0.25f) |
| |
| ColorRGBA | m_BackgroundColorActive = ColorRGBA(0.2f, 0.2f, 0.2f, 0.25f) |
| |
| std::vector< CTouchButton > | m_vTouchButtons |
| |
| bool | m_aExtraMenuActive [(int) EButtonVisibility::EXTRA_MENU_5 -(int) EButtonVisibility::EXTRA_MENU_1+1] = {false} |
| |
| int | m_ActionSelected = ACTION_FIRE |
| |
| int | m_JoystickPressCount = 0 |
| |
| int | m_DirectTouchLastAction = ACTION_FIRE |
| |
| CActionState | m_aDirectTouchActionStates [NUM_ACTIONS] |
| |
| std::vector< IInput::CTouchFinger > | m_vStaleFingers |
| |
| bool | m_EditingActive = false |
| |
| bool | m_EditingChanges = false |
| |
| std::vector< ivec2 > | m_vTargets |
| |
| std::vector< CUnitRect > | m_vLastUpdateRects |
| |
| std::vector< CUnitRect > | m_vXSortedRects |
| |
| std::vector< CUnitRect > | m_vYSortedRects |
| |
| int | m_LastWidth = -10 |
| |
| int | m_LastHeight = -10 |
| |
| bool | m_PreventSaving = false |
| |
| std::optional< IInput::CTouchFingerState > | m_ActiveFingerState |
| |
| std::optional< IInput::CTouchFingerState > | m_ZoomFingerState |
| |
| std::optional< IInput::CTouchFingerState > | m_LongPressFingerState |
| |
| vec2 | m_ZoomStartPos = vec2(0.0f, 0.0f) |
| |
| vec2 | m_AccumulatedDelta = vec2(0.0f, 0.0f) |
| |
| std::vector< IInput::CTouchFingerState > | m_vDeletedFingerState |
| |
| std::array< bool,(size_t) EButtonVisibility::NUM_VISIBILITIES > | m_aVirtualVisibilities |
| |
| std::unique_ptr< CTouchButton > | m_pSampleButton = nullptr |
| |
| std::optional< CUnitRect > | m_ShownRect |
| |
| CTouchButton * | m_pSelectedButton = nullptr |
| |
| bool | m_UnsavedChanges = false |
| |
| bool | m_PreviewAllButtons = false |
| |
| CPopupParam | m_PopupParam |
| |
| std::array< CIssueParam,(int) EIssueType::NUM_ISSUES > | m_aIssueParam |
| |
◆ anonymous enum
| Enumerator |
|---|
| ACTION_AIM | |
| ACTION_FIRE | |
| ACTION_HOOK | |
| NUM_ACTIONS | |
◆ EButtonShape
| Enumerator |
|---|
| RECT | |
| CIRCLE | |
| NUM_SHAPES | |
◆ EButtonVisibility
| Enumerator |
|---|
| INGAME | |
| ZOOM_ALLOWED | |
| VOTE_ACTIVE | |
| DUMMY_ALLOWED | |
| DUMMY_CONNECTED | |
| RCON_AUTHED | |
| DEMO_PLAYER | |
| EXTRA_MENU_1 | |
| EXTRA_MENU_2 | |
| EXTRA_MENU_3 | |
| EXTRA_MENU_4 | |
| EXTRA_MENU_5 | |
| NUM_VISIBILITIES | |
◆ EDirectTouchIngameMode
| Enumerator |
|---|
| DISABLED | |
| ACTION | |
| AIM | |
| FIRE | |
| HOOK | |
| NUM_STATES | |
◆ EDirectTouchSpectateMode
| Enumerator |
|---|
| DISABLED | |
| AIM | |
| NUM_STATES | |
◆ EIssueType
| Enumerator |
|---|
| CACHE_SETTINGS | |
| SAVE_SETTINGS | |
| CACHE_POSITION | |
| NUM_ISSUES | |
◆ EPopupType
| Enumerator |
|---|
| BUTTON_CHANGED | |
| NO_SPACE | |
| BUTTON_INVISIBLE | |
| NUM_POPUPS | |
◆ AnyIssueNotResolved()
| bool CTouchControls::AnyIssueNotResolved |
( |
| ) |
const |
◆ BackgroundColorActive()
| ColorRGBA CTouchControls::BackgroundColorActive |
( |
| ) |
const |
|
inline |
◆ BackgroundColorInactive()
| ColorRGBA CTouchControls::BackgroundColorInactive |
( |
| ) |
const |
|
inline |
◆ BuildPositionXY()
◆ CalculateScreenFromUnitRect()
◆ CalculateScreenSize()
| vec2 CTouchControls::CalculateScreenSize |
( |
| ) |
const |
|
private |
◆ DefaultBackgroundColorActive()
| ColorRGBA CTouchControls::DefaultBackgroundColorActive |
( |
| ) |
const |
|
inline |
◆ DefaultBackgroundColorInactive()
| ColorRGBA CTouchControls::DefaultBackgroundColorInactive |
( |
| ) |
const |
|
inline |
◆ DeleteSelectedButton()
| void CTouchControls::DeleteSelectedButton |
( |
| ) |
|
◆ DirectTouchIngame()
◆ DirectTouchSpectate()
◆ FindPositionXY()
◆ GetButtonsEditor()
◆ HasEditingChanges()
| bool CTouchControls::HasEditingChanges |
( |
| ) |
const |
|
inline |
◆ HasUnsavedChanges()
| bool CTouchControls::HasUnsavedChanges |
( |
| ) |
const |
|
inline |
◆ InitVisibilityFunctions()
| void CTouchControls::InitVisibilityFunctions |
( |
| ) |
|
|
private |
◆ IsButtonEditing()
| bool CTouchControls::IsButtonEditing |
( |
| ) |
const |
|
inline |
◆ IsEditingActive()
| bool CTouchControls::IsEditingActive |
( |
| ) |
const |
|
inline |
◆ IsRectOverlapping()
◆ Issues()
◆ LoadConfigurationFromClipboard()
| bool CTouchControls::LoadConfigurationFromClipboard |
( |
| ) |
|
◆ LoadConfigurationFromFile()
| bool CTouchControls::LoadConfigurationFromFile |
( |
int |
StorageType | ) |
|
◆ NewButton()
◆ NextActiveAction()
| int CTouchControls::NextActiveAction |
( |
int |
Action | ) |
const |
|
private |
◆ NextDirectTouchAction()
| int CTouchControls::NextDirectTouchAction |
( |
| ) |
const |
|
private |
◆ NoRealButtonSelected()
| bool CTouchControls::NoRealButtonSelected |
( |
| ) |
const |
|
inline |
◆ OnInit()
| void CTouchControls::OnInit |
( |
| ) |
|
|
overridevirtual |
Called to let the components run initialization code.
Reimplemented from CComponent.
◆ OnRender()
| void CTouchControls::OnRender |
( |
| ) |
|
|
overridevirtual |
Called when the component should get rendered.
The render order depends on the component insertion order.
Reimplemented from CComponent.
◆ OnReset()
| void CTouchControls::OnReset |
( |
| ) |
|
|
overridevirtual |
Called to reset the component. This method is usually called on your component constructor to avoid code duplication.
- See also
- CHud::CHud()
-
CHud::OnReset()
Reimplemented from CComponent.
◆ OnTouchState()
Called with all current touch finger states.
- Parameters
-
| vTouchFingerStates | The touch finger states to be handled. |
- Returns
true if the component used the touch events, false otherwise.
Reimplemented from CComponent.
◆ OnWindowResize()
| void CTouchControls::OnWindowResize |
( |
| ) |
|
|
overridevirtual |
Called when the window has been resized.
Reimplemented from CComponent.
◆ ParseBehavior()
◆ ParseBindBehavior()
◆ ParseBindToggleBehavior()
◆ ParseButton()
◆ ParseColor()
◆ ParseConfiguration()
◆ ParseDirectTouchIngameMode()
◆ ParseDirectTouchSpectateMode()
◆ ParseExtraMenuBehavior()
◆ ParsePredefinedBehavior()
◆ PreviewAllButtons()
| bool CTouchControls::PreviewAllButtons |
( |
| ) |
const |
|
inline |
◆ RemakeSampleButton()
| void CTouchControls::RemakeSampleButton |
( |
| ) |
|
|
inline |
◆ RenderButtonsEditor()
| void CTouchControls::RenderButtonsEditor |
( |
| ) |
|
|
private |
◆ RenderButtonsGame()
| void CTouchControls::RenderButtonsGame |
( |
| ) |
|
|
private |
◆ RequiredPopup()
◆ ResetButtonPointers()
| void CTouchControls::ResetButtonPointers |
( |
| ) |
|
◆ ResetButtons()
| void CTouchControls::ResetButtons |
( |
| ) |
|
|
private |
◆ ResetVirtualVisibilities()
| void CTouchControls::ResetVirtualVisibilities |
( |
| ) |
|
◆ ReverseVirtualVisibilities()
| void CTouchControls::ReverseVirtualVisibilities |
( |
int |
Number | ) |
|
|
inline |
◆ SampleButton()
◆ SaveConfigurationToClipboard()
| void CTouchControls::SaveConfigurationToClipboard |
( |
| ) |
|
◆ SaveConfigurationToFile()
| bool CTouchControls::SaveConfigurationToFile |
( |
| ) |
|
◆ SelectedButton()
◆ SetBackgroundColorActive()
◆ SetBackgroundColorInactive()
| void CTouchControls::SetBackgroundColorInactive |
( |
ColorRGBA |
Color | ) |
|
|
inline |
◆ SetDirectTouchIngame()
◆ SetDirectTouchSpectate()
◆ SetEditingActive()
| void CTouchControls::SetEditingActive |
( |
bool |
EditingActive | ) |
|
|
inline |
◆ SetEditingChanges()
| void CTouchControls::SetEditingChanges |
( |
bool |
EditingChanges | ) |
|
|
inline |
◆ SetPreviewAllButtons()
| void CTouchControls::SetPreviewAllButtons |
( |
bool |
Preview | ) |
|
|
inline |
◆ SetSelectedButton()
◆ SetShownRect()
| void CTouchControls::SetShownRect |
( |
std::optional< CUnitRect > |
Rect | ) |
|
|
inline |
◆ SetUnsavedChanges()
| void CTouchControls::SetUnsavedChanges |
( |
bool |
UnsavedChanges | ) |
|
|
inline |
◆ ShownRect()
| std::optional< CUnitRect > CTouchControls::ShownRect |
( |
| ) |
const |
|
inline |
◆ Sizeof()
| int CTouchControls::Sizeof |
( |
| ) |
const |
|
inlineoverridevirtual |
Gets the size of the non-abstract component.
Implements CComponent.
◆ UpdateButtonsEditor()
◆ UpdateButtonsGame()
◆ UpdatePosition()
◆ UpdateSampleButton()
◆ VirtualVisibilities()
◆ WriteConfiguration()
◆ BUTTON_SIZE_MAXIMUM
◆ BUTTON_SIZE_MINIMUM
◆ BUTTON_SIZE_SCALE
◆ DIRECT_TOUCH_INGAME_MODE_NAMES
◆ DIRECT_TOUCH_SPECTATE_MODE_NAMES
◆ LABEL_TYPE_NAMES
◆ m_AccumulatedDelta
| vec2 CTouchControls::m_AccumulatedDelta = vec2(0.0f, 0.0f) |
|
private |
◆ m_ActionSelected
The currently selected action which is used for direct touch and is changed and used by some button behaviors.
◆ m_ActiveFingerState
◆ m_aDirectTouchActionStates
The states of the different actions for direct touch input.
◆ m_aExtraMenuActive
The activation states of the different extra menus which are toggle by the extra menu button behavior.
◆ m_aIssueParam
◆ m_aVirtualVisibilities
◆ m_aVisibilityFunctions
◆ m_BackgroundColorActive
Background color of active touch buttons.
Saved to the touch controls configuration.
◆ m_BackgroundColorInactive
Background color of inactive touch buttons.
Saved to the touch controls configuration.
◆ m_DirectTouchIngame
Mode of direct touch input while ingame.
Saved to the touch controls configuration.
◆ m_DirectTouchLastAction
The action that was last activated with direct touch input, which will determine the finger that will be used to update the mouse position from direct touch input.
◆ m_DirectTouchSpectate
Mode of direct touch input while spectating.
Saved to the touch controls configuration.
◆ m_EditingActive
Whether editing mode is currently active.
◆ m_EditingChanges
| bool CTouchControls::m_EditingChanges = false |
|
private |
Whether there are changes to the current configuration in editing mode.
◆ m_JoystickPressCount
| int CTouchControls::m_JoystickPressCount = 0 |
|
private |
Counts how many joysticks are pressed.
◆ m_LastHeight
| int CTouchControls::m_LastHeight = -10 |
|
private |
◆ m_LastWidth
| int CTouchControls::m_LastWidth = -10 |
|
private |
◆ m_LongPressFingerState
◆ m_PopupParam
◆ m_PreventSaving
◆ m_PreviewAllButtons
| bool CTouchControls::m_PreviewAllButtons = false |
|
private |
◆ m_pSampleButton
◆ m_pSelectedButton
◆ m_ShownRect
| std::optional<CUnitRect> CTouchControls::m_ShownRect |
|
private |
◆ m_UnsavedChanges
| bool CTouchControls::m_UnsavedChanges = false |
|
private |
◆ m_vDeletedFingerState
◆ m_vLastUpdateRects
| std::vector<CUnitRect> CTouchControls::m_vLastUpdateRects |
|
private |
◆ m_vStaleFingers
These fingers were activating buttons that became invisible and were therefore deactivated. The fingers are stored until they are released so they do not activate direct touch input or touch buttons anymore.
◆ m_vTargets
| std::vector<ivec2> CTouchControls::m_vTargets |
|
private |
◆ m_vTouchButtons
All touch buttons.
Saved to the touch controls configuration.
◆ m_vXSortedRects
| std::vector<CUnitRect> CTouchControls::m_vXSortedRects |
|
private |
◆ m_vYSortedRects
| std::vector<CUnitRect> CTouchControls::m_vYSortedRects |
|
private |
◆ m_ZoomFingerState
◆ m_ZoomStartPos
| vec2 CTouchControls::m_ZoomStartPos = vec2(0.0f, 0.0f) |
|
private |
◆ MAX_EXTRA_MENU_NUMBER
◆ SHAPE_NAMES
The documentation for this class was generated from the following files: