neoLegacy/Minecraft.Client/Common/UI/UIControl_Slider.h
SevenToaster509 0606ce717d Refactor: Allow slider to be set
WARNING: REQUIRES ARC TO BE EDITED TO FUNCTION, PUSHED THIS TASK TO georgev22
2026-04-13 15:30:40 +01:00

35 lines
858 B
C++

#pragma once
#include "UIControl_Base.h"
class UIControl_Slider : public UIControl_Base
{
private:
//int m_id; // 4J-TomK this is part of class UIControl and doesn't need to be here!
int m_min;
int m_max;
int m_current;
vector<wstring> m_allPossibleLabels;
// 4J-TomK - function for setting slider position on touch
IggyName m_funcSetRelativeSliderPos;
IggyName m_funcSetSliderValue;
IggyName m_funcGetRealWidth;
public:
UIControl_Slider();
virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName);
void init(UIString label, int id, int min, int max, int current);
void handleSliderMove(int newValue);
void SetSliderTouchPos(float fTouchPos);
void SetSliderValue(int value);
virtual void setAllPossibleLabels(int labelCount, wchar_t labels[][256]);
S32 GetRealWidth();
virtual void ReInit();
};