3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/controls/ButtonHandleResult.h"
7#include "mc/client/gui/controls/UIComponent.h"
8#include "mc/client/gui/screens/ScreenEventScope.h"
9#include "mc/deps/input/InputMode.h"
10#include "mc/deps/input/enums/ButtonState.h"
11#include "mc/deps/input/enums/DirectionId.h"
31 enum class PressType :
int {
40 ::ll::TypedStorage<4, 4, uint> toButtonId;
41 ::ll::TypedStorage<1, 1, ::ScreenEventScope> scope;
49 ::ll::TypedStorage<4, 4, int> pressCount;
50 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> lastPressTime;
51 ::ll::TypedStorage<4, 8, ::glm::vec2> position;
58 ::ll::TypedStorage<8, 24, ::std::vector<::ScreenButtonMapping>> mButtonMappings;
59 ::ll::TypedStorage<8, 24, ::std::vector<::InputComponent::ScreenHoverButtonMapping>> mHoverButtonMappings;
60 ::ll::TypedStorage<1, 1, ::ScreenEventScope> mRemappingMappingScope;
61 ::ll::TypedStorage<1, 1, bool> mAlwaysHandlePointer;
62 ::ll::TypedStorage<1, 1, bool> mAlwaysHandleControllerDirection;
63 ::ll::TypedStorage<1, 1, bool> mHasRemappingMapping;
64 ::ll::TypedStorage<1, 1, bool> mAlwaysListensToInput;
65 ::ll::TypedStorage<1, 1, bool> mModal;
66 ::ll::TypedStorage<1, 1, bool> mInlineModal;
67 ::ll::TypedStorage<1, 1, bool> mIgnoreHoverChange;
68 ::ll::TypedStorage<1, 1, bool> mHoverEnabled;
69 ::ll::TypedStorage<1, 1, bool> mConsumeHoverEvents;
70 ::ll::TypedStorage<1, 1, bool> mPreventsTouchControl;
71 ::ll::TypedStorage<1, 1, bool> mGamepadDeflectionMode;
72 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint, ::InputComponent::PressStats>> mPressStats;
78 virtual ~InputComponent() ;
80 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
82 virtual void reset() ;
84 virtual void onVisibilityChanged(
bool visible) ;
90 MCAPI ::InputComponent::PressType
91 _detectDoubleClick(uint buttonId, ::ButtonState state, ::glm::vec2
const& pointerPosition,
bool isTTSTouchEnabled);
93 MCAPI
bool _getContentPanelHover(::glm::vec2
const& pointerPosition);
95 MCAPI
bool _sendButtonScreenEvent(
96 ::ScreenInputContext& context,
97 ::ScreenButtonMapping
const& buttonMapping,
99 ::glm::vec2
const& pointerPosition,
100 ::VisualTree& visualTree,
101 ::UIAnimationController& animationController,
102 ::InputMode inputMode
105 MCAPI
bool _sendHoverScreenEvent(
106 ::ScreenInputContext& context,
107 ::VisualTree& visualTree,
108 ::UIAnimationController& animationController,
109 ::glm::vec2
const& position,
113 MCAPI
bool _shouldHandlePressedMapping(
114 ::ScreenButtonMapping
const& buttonMapping,
117 ::glm::vec2
const& pointerPosition,
118 ::InputMode inputMode
121 MCAPI ::ButtonHandleResult handleButtonEvent(
122 ::VisualTree& visualTree,
123 ::UIAnimationController& animationController,
124 ::ScreenInputContext& context,
127 ::glm::vec2
const& pointerPosition,
128 ::InputMode inputMode,
129 bool isTTSTouchEnabled
132 MCAPI
bool handleControllerDirection(
133 ::VisualTree& visualTree,
134 ::UIAnimationController& animationController,
135 ::ScreenInputContext& context,
136 ::DirectionId directionId,
137 ::glm::vec2
const& deltaPosition,
141 MCAPI
bool handleFocusLocation(
142 ::VisualTree& visualTree,
143 ::UIAnimationController& animationController,
144 ::ScreenInputContext& context,
145 ::glm::vec2
const& position,
149 MCAPI
bool handlePointerLocation(
150 ::VisualTree& visualTree,
151 ::UIAnimationController& animationController,
152 ::ScreenInputContext& context,
153 ::glm::vec2
const& position,
154 ::glm::vec2
const& deltaPosition,
158 MCAPI
bool isWithinClipRegion(::glm::vec2
const& pointerPosition)
const;
170 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
174 MCAPI
void $onVisibilityChanged(
bool visible);
Definition ScreenInputContext.h:5
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition VisualTree.h:5