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;
17struct ScreenEvent;
18// clang-format on
19
20class SliderComponent : public ::UIComponent {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mSliderBoxControl;
25 ::ll::TypedStorage<4, 4, uint> mTrackScrollButtonId;
26 ::ll::TypedStorage<4, 4, uint> mSmallDecreaseButtonId;
27 ::ll::TypedStorage<4, 4, uint> mSmallIncreaseButtonId;
28 ::ll::TypedStorage<4, 4, uint> mSelectedButtonId;
29 ::ll::TypedStorage<4, 4, uint> mDeselectedButtonId;
30 ::ll::TypedStorage<1, 1, bool> mTrackActive;
31 ::ll::TypedStorage<1, 1, bool> mDragActive;
32 ::ll::TypedStorage<1, 1, ::ui::OrientationType> mSliderDirection;
33 ::ll::TypedStorage<1, 1, bool> mInverted;
34 ::ll::TypedStorage<4, 4, float> mPercentage;
35 ::ll::TypedStorage<4, 4, int> mCurrentStep;
36 ::ll::TypedStorage<4, 4, int> mNumberSteps;
37 ::ll::TypedStorage<4, 4, float> mSliderSpeed;
38 ::ll::TypedStorage<4, 8, ::std::optional<float>> mSliderTimeout;
39 ::ll::TypedStorage<8, 8, double> mLastRefreshTime;
40 bool mStepSlider : 1;
41 bool mHover : 1;
42 bool mSelectOnHover : 1;
43 ::ll::TypedStorage<4, 4, uint> mSliderNameId;
44 ::ll::TypedStorage<8, 32, ::std::string> mSliderCollectionName;
45 ::ll::TypedStorage<1, 1, ::ui::CardinalDirection> mLastDirection;
46 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mBackground;
47 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mBackgroundHover;
48 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mProgress;
49 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mProgressHover;
50 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mDefaultControl;
51 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mHoverControl;
52 ::ll::TypedStorage<8, 32, ::std::string> mTTSSliderValue;
53 // NOLINTEND
54
55public:
56 // virtual functions
57 // NOLINTBEGIN
58 virtual ~SliderComponent() /*override*/ = default;
59
60 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
61
62 virtual void reset() /*override*/;
63
64 virtual ::ComponentReceiveActionType receive(
65 ::VisualTree& visualTree,
66 ::ScreenInputContext& context,
67 ::UIAnimationController& animationController,
68 ::ScreenEvent const& screenEvent
69 ) /*override*/;
70
71 virtual ::ComponentReceiveActionType receive(::ScreenEvent const& screenEvent) /*override*/;
72
73 virtual ::std::string const& getTextToSpeechComponentValue() const /*override*/;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
79 MCAPI void _createSteps();
80
81 MCAPI void _finalizeSliderBox();
82
83 MCAPI void _sendSliderChangeEvent(::ScreenInputContext& context, bool finalized);
84
85 MCAPI void _setSelected(bool selected);
86
87 MCAPI void _setSliderValue(float value);
88
89 MCAPI void _updateSliderFromPosition(::glm::vec2 const& pointerPosition, bool finalize);
90
91 MCAPI void _updateSliderFromStepSize(int stepSize);
92
93 MCAPI bool getSliderSelected() const;
94
95 MCAPI void setNumberSteps(int steps);
96
97 MCAPI void setSliderValue(float value);
98 // NOLINTEND
99
100public:
101 // virtual function thunks
102 // NOLINTBEGIN
103 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
104
105 MCAPI void $reset();
106
107 MCAPI ::ComponentReceiveActionType $receive(
108 ::VisualTree& visualTree,
109 ::ScreenInputContext& context,
110 ::UIAnimationController& animationController,
111 ::ScreenEvent const& screenEvent
112 );
113
114 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
115
116 MCFOLD ::std::string const& $getTextToSpeechComponentValue() const;
117 // NOLINTEND
118};
Definition ScreenInputContext.h:5
Definition SliderComponent.h:5
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5