LeviLamina
Loading...
Searching...
No Matches
TouchMoveAndTurnInteractControl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/input/JoystickState.h"
7#include "mc/deps/input/TouchControl.h"
8#include "mc/deps/input/TouchMoveAndTurnControlState.h"
9
10// auto generated forward declare list
11// clang-format off
12class InputEventQueue;
14class RectangleArea;
17// clang-format on
18
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mCondition;
24 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mIsLeftHanded;
25 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mJoystickAlwaysVisible;
26 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mAltJoystickAlwaysVisible;
27 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mAltStickEnabled;
28 ::ll::TypedStorage<8, 64, ::std::function<float()>> mThumbstickOpacity;
29 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mStaticJoystick;
30 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mStaticAltJoystick;
31 ::ll::TypedStorage<8, 64, ::std::function<::RectangleArea()>> mDefaultMoveStickArea;
32 ::ll::TypedStorage<8, 64, ::std::function<::RectangleArea()>> mDefaultAltStickArea;
33 ::ll::TypedStorage<8, 64, ::std::function<::RectangleArea()>> mHotbarArea;
34 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mJoystickVisibleWhenUnused;
35 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mAltJoystickVisibleWhenUnused;
36 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mShowActionButton;
37 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mSprintOnMovement;
38 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mIsInputSprinting;
39 ::ll::TypedStorage<8, 64, ::std::function<float()>> mClientActivePointer;
40 ::ll::TypedStorage<8, 64, ::std::function<bool()>> mIsInControlEditMode;
41 ::ll::TypedStorage<8, 64, ::std::function<::std::vector<::RectangleArea>()>> mGetInactiveAreasCallback;
42 ::ll::TypedStorage<4, 4, uint const> mTurnInteractButtonId;
43 ::ll::TypedStorage<4, 4, uint const> mTapButtonId;
44 ::ll::TypedStorage<4, 4, uint const> mHoldButtonId;
45 ::ll::TypedStorage<4, 4, uint const> mSprintButtonId;
46 ::ll::TypedStorage<8, 152, ::TouchMoveAndTurnControlState> mState;
47 // NOLINTEND
48
49public:
50 // prevent constructor by default
51 TouchMoveAndTurnInteractControl();
52
53public:
54 // virtual functions
55 // NOLINTBEGIN
56 virtual ~TouchMoveAndTurnInteractControl() /*override*/;
57
58 virtual void
59 tick(::InputEventQueue& eventQueue, ::TouchPointResults& touchPointResults, int yAxisInversionFactor) /*override*/;
60
61 virtual void render(::InputRenderContext& context) const /*override*/;
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI TouchMoveAndTurnInteractControl(
68 ::TouchControlConfig const& touchControlConfig,
69 ::std::function<::std::vector<::RectangleArea>()> inactiveAreas
70 );
71
72 MCAPI bool _isClientCurrentActivePointer(int processedPointerId) const;
73
74 MCAPI void _renderJoystick(
75 ::InputRenderContext& context,
76 ::JoystickState state,
77 bool initialized,
78 float x,
79 float y,
80 float x0,
81 float y0,
82 ::RectangleArea const& moveArea,
83 ::RectangleArea const& defaultArea,
84 float radius,
85 bool staticJoystick,
86 bool joystickVisibleWhenUnused,
87 bool joystickAlwaysVisible
88 ) const;
89
90 MCAPI void _setPreviousActionPointer(int processedPointerId);
91
92 MCAPI bool _shouldUpdateActivePointer(int processedPointerId) const;
93
94 MCAPI void _tickAltTurn(
95 ::InputEventQueue& eventQueue,
96 ::TouchPointResults& touchPointResults,
97 ::RectangleArea const& altTurnArea,
98 ::RectangleArea const& defaultAltTurnArea,
99 float maxAltTurnZone,
100 bool staticJoystick,
101 bool joystickAlwaysVisible,
102 bool joystickVisibleWhenUnused
103 );
104
105 MCAPI void _tickHold(
106 ::InputEventQueue& eventQueue,
107 ::TouchPointResults& touchPointResults,
108 int yAxisInversionFactor,
109 ::RectangleArea const& moveArea,
110 ::RectangleArea const& turnArea,
111 ::RectangleArea const& altTurnArea,
112 ::RectangleArea const& defaultMoveArea,
113 ::RectangleArea const& defaultAltTurnArea,
114 float maxMovementZone,
115 bool staticJoystick,
116 bool staticAltJoystick,
117 bool altStickEnabled
118 );
119
120 MCAPI void _tickMove(
121 ::InputEventQueue& eventQueue,
122 ::TouchPointResults& touchPointResults,
123 ::RectangleArea const& moveArea,
124 ::RectangleArea const& defaultMoveArea,
125 float maxMovementZone,
126 bool staticJoystick,
127 bool joystickAlwaysVisible,
128 bool joystickVisibleWhenUnused
129 );
130
131 MCAPI void _tickTurn(
132 ::InputEventQueue& eventQueue,
133 ::TouchPointResults& touchPointResults,
134 int yAxisInversionFactor,
135 ::RectangleArea const& turnArea,
136 float maxMovementZone
137 );
138
139 MCAPI bool calculateTouchDelta(
140 float x,
141 float y,
142 float x0,
143 float y0,
144 float& dx,
145 float& dy,
146 float deadZone,
147 float maximumMovementZone,
148 bool autoSprint
149 );
150
151 MCAPI void calibrateMoveDelta(float& dx, float& dy);
152
153 MCAPI void drawJoystick(
154 ::InputRenderContext& context,
155 ::JoystickState joystickState,
156 float x,
157 float y,
158 float x0,
159 float y0,
160 float joystickRadius
161 ) const;
162 // NOLINTEND
163
164public:
165 // constructor thunks
166 // NOLINTBEGIN
167 MCAPI void* $ctor(
168 ::TouchControlConfig const& touchControlConfig,
169 ::std::function<::std::vector<::RectangleArea>()> inactiveAreas
170 );
171 // NOLINTEND
172
173public:
174 // destructor thunk
175 // NOLINTBEGIN
176 MCAPI void $dtor();
177 // NOLINTEND
178
179public:
180 // virtual function thunks
181 // NOLINTBEGIN
182 MCAPI void $tick(::InputEventQueue& eventQueue, ::TouchPointResults& touchPointResults, int yAxisInversionFactor);
183
184 MCAPI void $render(::InputRenderContext& context) const;
185 // NOLINTEND
186
187public:
188 // vftables
189 // NOLINTBEGIN
190 MCNAPI static void** $vftable();
191 // NOLINTEND
192};
Definition InputEventQueue.h:5
Definition InputRenderContext.h:5
Definition RectangleArea.h:5
Definition TouchControl.h:5
Definition TouchMoveAndTurnInteractControl.h:5
static MCAPI void ** $vftable()
Definition TouchPointResults.h:5
Definition TouchControlConfig.h:5