![]() |
DDraceNetwork Documentation
|
#include <touch_controls.h>
Classes | |
| class | CUnitRect |
| class | CButtonLabel |
| class | CButtonVisibility |
| class | CButtonVisibilityData |
| class | CTouchButton |
| class | CTouchButtonBehavior |
| class | CPredefinedTouchButtonBehavior |
| class | CIngameMenuTouchButtonBehavior |
| class | CExtraMenuTouchButtonBehavior |
| class | CEmoticonTouchButtonBehavior |
| class | CSpectateTouchButtonBehavior |
| class | CSwapActionTouchButtonBehavior |
| class | CUseActionTouchButtonBehavior |
| class | CJoystickTouchButtonBehavior |
| class | CJoystickActionTouchButtonBehavior |
| class | CJoystickAimTouchButtonBehavior |
| class | CJoystickFireTouchButtonBehavior |
| class | CJoystickHookTouchButtonBehavior |
| class | CBindTouchButtonBehavior |
| class | CBindToggleTouchButtonBehavior |
| class | CActionState |
| class | CPopupParam |
| class | CIssueParam |
Public Types | |
| 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 } |
Static Public Attributes | |
| static constexpr const int | BUTTON_SIZE_SCALE = 1000000 |
| static constexpr const int | BUTTON_SIZE_MINIMUM = 50000 |
| static constexpr const int | BUTTON_SIZE_MAXIMUM = 500000 |
| static const constexpr int | MAX_EXTRA_MENU_NUMBER = (int)EButtonVisibility::EXTRA_MENU_5 - (int)EButtonVisibility::EXTRA_MENU_1 + 1 |
Private Types | |
| enum | { ACTION_AIM , ACTION_FIRE , ACTION_HOOK , NUM_ACTIONS } |
Private Member Functions | |
| void | InitVisibilityFunctions () |
| int | NextActiveAction (int Action) const |
| int | NextDirectTouchAction () const |
| void | UpdateButtonsGame (const std::vector< IInput::CTouchFingerState > &vTouchFingerStates) |
| void | ResetButtons () |
| void | RenderButtonsGame () |
| vec2 | CalculateScreenSize () const |
| bool | ParseConfiguration (const void *pFileData, unsigned FileLength) |
| std::optional< EDirectTouchIngameMode > | ParseDirectTouchIngameMode (const json_value *pModeValue) |
| std::optional< EDirectTouchSpectateMode > | ParseDirectTouchSpectateMode (const json_value *pModeValue) |
| std::optional< ColorRGBA > | ParseColor (const json_value *pColorValue, const char *pAttributeName, std::optional< ColorRGBA > DefaultColor) const |
| std::optional< CTouchButton > | ParseButton (const json_value *pButtonObject) |
| std::unique_ptr< CTouchButtonBehavior > | ParseBehavior (const json_value *pBehaviorObject) |
| std::unique_ptr< CPredefinedTouchButtonBehavior > | ParsePredefinedBehavior (const json_value *pBehaviorObject) |
| std::unique_ptr< CExtraMenuTouchButtonBehavior > | ParseExtraMenuBehavior (const json_value *pBehaviorObject) |
| std::unique_ptr< CBindTouchButtonBehavior > | ParseBindBehavior (const json_value *pBehaviorObject) |
| std::unique_ptr< CBindToggleTouchButtonBehavior > | ParseBindToggleBehavior (const json_value *pBehaviorObject) |
| void | WriteConfiguration (CJsonWriter *pWriter) |
| void | BuildPositionXY (std::vector< CUnitRect > vVisibleButtonRects, CUnitRect MyRect) |
| std::optional< CUnitRect > | FindPositionXY (std::vector< CUnitRect > &vVisibleButtonRects, CUnitRect MyRect) |
| void | RenderButtonsEditor () |
| void | UpdateButtonsEditor (const std::vector< IInput::CTouchFingerState > &vTouchFingerStates) |
| void | UpdateSampleButton (const CTouchButton &SrcButton) |
Static Private Attributes | |
| static constexpr const char *const | DIRECT_TOUCH_INGAME_MODE_NAMES [(int) EDirectTouchIngameMode::NUM_STATES] = {"disabled", "action", "aim", "fire", "hook"} |
| static constexpr const char *const | DIRECT_TOUCH_SPECTATE_MODE_NAMES [(int) EDirectTouchSpectateMode::NUM_STATES] = {"disabled", "aim"} |
| static constexpr const char *const | SHAPE_NAMES [(int) EButtonShape::NUM_SHAPES] = {"rect", "circle"} |
| static constexpr const char *const | LABEL_TYPE_NAMES [(int) CButtonLabel::EType::NUM_TYPES] = {"plain", "localized", "icon"} |
Additional Inherited Members | |
| Protected Member Functions inherited from CComponentInterfaces | |
| class CGameClient * | GameClient () const |
| class IClient * | Client () const |
| class IKernel * | Kernel () const |
| class IEngine * | Engine () const |
| class IGraphics * | Graphics () const |
| class ITextRender * | TextRender () const |
| class IInput * | Input () const |
| class IStorage * | Storage () const |
| class CUi * | Ui () const |
| class ISound * | Sound () const |
| class CRenderTools * | RenderTools () const |
| class CRenderMap * | RenderMap () const |
| class IConfigManager * | ConfigManager () const |
| class CConfig * | Config () const |
| class IConsole * | Console () const |
| class IDemoPlayer * | DemoPlayer () const |
| class IDemoRecorder * | DemoRecorder (int Recorder) const |
| class IFavorites * | Favorites () const |
| class IServerBrowser * | ServerBrowser () const |
| class CLayers * | Layers () const |
| class CCollision * | Collision () const |
| int64_t | time () const |
| float | LocalTime () const |
| class IHttp * | Http () const |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
| bool CTouchControls::AnyIssueNotResolved | ( | ) | const |
|
inline |
|
inline |
|
private |
| CTouchControls::CUnitRect CTouchControls::CalculateHitbox | ( | const CUnitRect & | Rect, |
| EButtonShape | Shape ) const |
| CUIRect CTouchControls::CalculateScreenFromUnitRect | ( | CUnitRect | Unit, |
| EButtonShape | Shape = EButtonShape::RECT ) const |
|
private |
|
inline |
|
inline |
| void CTouchControls::DeleteSelectedButton | ( | ) |
|
inline |
|
inline |
|
private |
| std::vector< CTouchControls::CTouchButton * > CTouchControls::GetButtonsEditor | ( | ) |
|
inline |
|
inline |
|
private |
|
inline |
|
inline |
| bool CTouchControls::IsRectOverlapping | ( | CUnitRect | MyRect, |
| EButtonShape | Shape ) const |
| std::array< CTouchControls::CIssueParam,(unsigned) CTouchControls::EIssueType::NUM_ISSUES > CTouchControls::Issues | ( | ) |
| bool CTouchControls::LoadConfigurationFromClipboard | ( | ) |
| bool CTouchControls::LoadConfigurationFromFile | ( | int | StorageType | ) |
| CTouchControls::CTouchButton * CTouchControls::NewButton | ( | ) |
|
private |
|
private |
|
overridevirtual |
Called to let the components run initialization code.
Reimplemented from CComponent.
|
overridevirtual |
Called when the component should get rendered.
The render order depends on the component insertion order.
Reimplemented from CComponent.
|
overridevirtual |
Called to reset the component. This method is usually called on your component constructor to avoid code duplication.
Reimplemented from CComponent.
|
overridevirtual |
Called with all current touch finger states.
| vTouchFingerStates | The touch finger states to be handled. |
Reimplemented from CComponent.
|
overridevirtual |
Called when the window has been resized.
Reimplemented from CComponent.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
|
inline |
|
private |
|
private |
| CTouchControls::CPopupParam CTouchControls::RequiredPopup | ( | ) |
| void CTouchControls::ResetButtonPointers | ( | ) |
|
private |
| void CTouchControls::ResetVirtualVisibilities | ( | ) |
|
inline |
|
inline |
| void CTouchControls::SaveConfigurationToClipboard | ( | ) |
| bool CTouchControls::SaveConfigurationToFile | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Gets the size of the non-abstract component.
Implements CComponent.
|
private |
|
private |
| std::optional< CTouchControls::CUnitRect > CTouchControls::UpdatePosition | ( | CUnitRect | MyRect, |
| EButtonShape | Shape, | ||
| bool | Ignore = false ) |
|
private |
|
inline |
|
private |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
The currently selected action which is used for direct touch and is changed and used by some button behaviors.
|
private |
|
private |
The states of the different actions for direct touch input.
|
private |
The activation states of the different extra menus which are toggle by the extra menu button behavior.
|
private |
|
private |
|
private |
Background color of active touch buttons.
Saved to the touch controls configuration.
Background color of inactive touch buttons.
Saved to the touch controls configuration.
|
private |
Mode of direct touch input while ingame.
Saved to the touch controls configuration.
|
private |
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.
|
private |
Mode of direct touch input while spectating.
Saved to the touch controls configuration.
|
private |
Whether editing mode is currently active.
|
private |
Whether there are changes to the current configuration in editing mode.
|
private |
Counts how many joysticks are pressed.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
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.
|
private |
|
private |
All touch buttons.
Saved to the touch controls configuration.
|
private |
|
private |
|
private |
|
staticconstexpr |
|
staticconstexprprivate |