mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-09 03:02:56 +00:00
Refactor: Allow slider to be set
WARNING: REQUIRES ARC TO BE EDITED TO FUNCTION, PUSHED THIS TASK TO georgev22
This commit is contained in:
parent
c0c677b6ed
commit
0606ce717d
|
|
@ -17,6 +17,7 @@ bool UIControl_Slider::setupControl(UIScene *scene, IggyValuePath *parent, const
|
|||
|
||||
//Slider specific initialisers
|
||||
m_funcSetRelativeSliderPos = registerFastName(L"SetRelativeSliderPos");
|
||||
m_funcSetSliderValue = registerFastName(L"MoveSlider");
|
||||
m_funcGetRealWidth = registerFastName(L"GetRealWidth");
|
||||
|
||||
return success;
|
||||
|
|
@ -112,6 +113,15 @@ void UIControl_Slider::handleSliderMove(int newValue)
|
|||
}
|
||||
}
|
||||
|
||||
void UIControl_Slider::SetSliderValue(int valueA)
|
||||
{
|
||||
IggyDataValue result;
|
||||
IggyDataValue value[1];
|
||||
value[0].type = IGGY_DATATYPE_number;
|
||||
value[0].number = valueA;
|
||||
IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_funcSetSliderValue, 1, value);
|
||||
}
|
||||
|
||||
void UIControl_Slider::SetSliderTouchPos(float fTouchPos)
|
||||
{
|
||||
IggyDataValue result;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ private:
|
|||
|
||||
// 4J-TomK - function for setting slider position on touch
|
||||
IggyName m_funcSetRelativeSliderPos;
|
||||
IggyName m_funcSetSliderValue;
|
||||
IggyName m_funcGetRealWidth;
|
||||
|
||||
public:
|
||||
|
|
@ -25,6 +26,7 @@ public:
|
|||
|
||||
void handleSliderMove(int newValue);
|
||||
void SetSliderTouchPos(float fTouchPos);
|
||||
void SetSliderValue(int value);
|
||||
virtual void setAllPossibleLabels(int labelCount, wchar_t labels[][256]);
|
||||
|
||||
S32 GetRealWidth();
|
||||
|
|
|
|||
Loading…
Reference in a new issue