LeviLamina
Loading...
Searching...
No Matches
SliderComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/CardinalDirection.h"
7#include "mc/client/gui/OrientationType.h"
8#include "mc/client/gui/controls/ComponentReceiveActionType.h"
9#include "mc/client/gui/controls/UIComponent.h"
10
11// auto generated forward declare list
12// clang-format off
15class UIControl;
16class VisualTree;
20struct ScreenEvent;
21// clang-format on
22
23class SliderComponent : public ::UIComponent {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mSliderBoxControl;
28 ::ll::TypedStorage<4, 4, uint> mTrackScrollButtonId;
29 ::ll::TypedStorage<4, 4, uint> mSmallDecreaseButtonId;
30 ::ll::TypedStorage<4, 4, uint> mSmallIncreaseButtonId;
31 ::ll::TypedStorage<4, 4, uint> mSelectedButtonId;
32 ::ll::TypedStorage<4, 4, uint> mDeselectedButtonId;
33 ::ll::TypedStorage<1, 1, bool> mTrackActive;
34 ::ll::TypedStorage<1, 1, bool> mDragActive;
35 ::ll::TypedStorage<1, 1, ::ui::OrientationType> mSliderDirection;
36 ::ll::TypedStorage<1, 1, bool> mInverted;
37 ::ll::TypedStorage<4, 4, float> mPercentage;
38 ::ll::TypedStorage<4, 4, int> mCurrentStep;
39 ::ll::TypedStorage<4, 4, int> mNumberSteps;
40 ::ll::TypedStorage<4, 4, float> mSliderSpeed;
41 ::ll::TypedStorage<4, 8, ::std::optional<float>> mSliderTimeout;
42 ::ll::TypedStorage<8, 8, double> mLastRefreshTime;
43 bool mStepSlider : 1;
44 bool mHover : 1;
45 bool mSelectOnHover : 1;
46 ::ll::TypedStorage<4, 4, uint> mSliderNameId;
47 ::ll::TypedStorage<8, 32, ::std::string> mSliderCollectionName;
48 ::ll::TypedStorage<1, 1, ::ui::CardinalDirection> mLastDirection;
49 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mBackground;
50 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mBackgroundHover;
51 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mProgress;
52 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mProgressHover;
53 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mDefaultControl;
54 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mHoverControl;
55 ::ll::TypedStorage<8, 32, ::std::string> mTTSSliderValue;
56 // NOLINTEND
57
58public:
59 // virtual functions
60 // NOLINTBEGIN
61 virtual ~SliderComponent() /*override*/;
62
63 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
64
65 virtual void reset() /*override*/;
66
67 virtual ::ComponentReceiveActionType receive(
68 ::VisualTree& visualTree,
69 ::ScreenInputContext& context,
70 ::UIAnimationController& screenEvent,
71 ::ScreenEvent const&
72 ) /*override*/;
73
74 virtual ::ComponentReceiveActionType receive(::ScreenEvent const& screenEvent) /*override*/;
75
76 virtual ::std::string const& getTextToSpeechComponentValue() const /*override*/;
77 // NOLINTEND
78
79public:
80 // member functions
81 // NOLINTBEGIN
82 MCAPI void _createSteps();
83
84 MCAPI void _finalizeSliderBox();
85
86 MCAPI ::ComponentReceiveActionType
87 _handleButtonEvent(::VisualTree& context, ::ScreenInputContext& buttonData, ::ButtonScreenEventData const&);
88
89 MCAPI void _handleControllerDirectionEvent(
90 ::VisualTree& context,
91 ::ScreenInputContext& controllerData,
92 ::ControllerDirectionEventData const&
93 );
94
95 MCAPI void _handleHoverEvent(::VisualTree& hoverData, ::HoverScreenEventData const&);
96
97 MCAPI void _moveSliderBox(::glm::vec2 offsetDelta);
98
99 MCAPI void _sendSliderChangeEvent(::ScreenInputContext& context, bool finalized);
100
101 MCAPI void _setSelected(bool selected);
102
103 MCAPI void _setSliderValue(float value);
104
105 MCAPI void _updateControlVisibility();
106
107 MCAPI void _updateSliderFromPosition(::glm::vec2 const& pointerPosition, bool finalize);
108
109 MCAPI void _updateSliderFromStepSize(int stepSize);
110
111 MCAPI ::ui::OrientationType getSliderDirection() const;
112
113 MCAPI bool getSliderSelected() const;
114
115 MCAPI float getSliderTimeoutDefaultValue() const;
116
117 MCAPI float getSliderValue() const;
118
119 MCAPI void setNumberSteps(int steps);
120
121 MCAPI void setSliderTimeout(float timeout);
122
123 MCAPI void setSliderValue(float value);
124 // NOLINTEND
125
126public:
127 // destructor thunk
128 // NOLINTBEGIN
129 MCAPI void $dtor();
130 // NOLINTEND
131
132public:
133 // virtual function thunks
134 // NOLINTBEGIN
135 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
136
137 MCAPI void $reset();
138
139 MCAPI ::ComponentReceiveActionType $receive(
140 ::VisualTree& visualTree,
141 ::ScreenInputContext& context,
142 ::UIAnimationController& screenEvent,
143 ::ScreenEvent const&
144 );
145
146 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
147
148 MCFOLD ::std::string const& $getTextToSpeechComponentValue() const;
149 // NOLINTEND
150
151public:
152 // vftables
153 // NOLINTBEGIN
154 MCNAPI static void** $vftable();
155 // NOLINTEND
156};
Definition ScreenInputContext.h:5
Definition SliderComponent.h:5
static MCAPI void ** $vftable()
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition VisualTree.h:5
Definition ButtonScreenEventData.h:5
Definition ControllerDirectionEventData.h:5
Definition HoverScreenEventData.h:5
Definition ScreenEvent.h:5