3#include "mc/_HeaderOutputPredefine.h"
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"
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;
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;
61 virtual ~SliderComponent() ;
63 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
65 virtual void reset() ;
67 virtual ::ComponentReceiveActionType receive(
68 ::VisualTree& visualTree,
69 ::ScreenInputContext& context,
70 ::UIAnimationController& animationController,
71 ::ScreenEvent
const& screenEvent
74 virtual ::ComponentReceiveActionType receive(::ScreenEvent
const& screenEvent) ;
76 virtual ::std::string
const& getTextToSpeechComponentValue() const ;
82 MCAPI
void _createSteps();
84 MCAPI
void _finalizeSliderBox();
86 MCAPI ::ComponentReceiveActionType _handleButtonEvent(
87 ::VisualTree& visualTree,
88 ::ScreenInputContext& context,
89 ::ButtonScreenEventData const& buttonData
92 MCAPI
void _handleControllerDirectionEvent(
93 ::VisualTree& visualTree,
94 ::ScreenInputContext& context,
95 ::ControllerDirectionEventData const& controllerData
98 MCAPI
void _handleHoverEvent(::VisualTree& visualTree, ::HoverScreenEventData const& hoverData);
100 MCAPI
void _moveSliderBox(::glm::vec2 offsetDelta);
102 MCAPI
void _sendSliderChangeEvent(::ScreenInputContext& context,
bool finalized);
104 MCAPI
void _setSelected(
bool selected);
106 MCAPI
void _setSliderValue(
float value);
108 MCAPI
void _updateControlVisibility();
110 MCAPI
void _updateSliderBarProgress();
112 MCAPI
void _updateSliderFromDirection(::ui::CardinalDirection direction);
114 MCAPI
void _updateSliderFromPosition(::glm::vec2 const& pointerPosition,
bool finalize);
116 MCAPI
void _updateSliderFromStepSize(
int stepSize);
118 MCAPI
bool getSliderSelected() const;
120 MCAPI
void setSliderValue(
float value);
132 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
136 MCAPI ::ComponentReceiveActionType $receive(
137 ::VisualTree& visualTree,
138 ::ScreenInputContext& context,
139 ::UIAnimationController& animationController,
140 ::ScreenEvent const& screenEvent
143 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
145 MCFOLD ::std::
string const& $getTextToSpeechComponentValue() const;
Definition ScreenInputContext.h:5
Definition SliderComponent.h:5
static MCAPI void ** $vftable()
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition VisualTree.h:5
Definition ControllerDirectionEventData.h:5
Definition HoverScreenEventData.h:5
Definition ScreenEvent.h:5