metaforce/Runtime/GuiSys/CGuiSliderGroup.hpp

38 lines
1.1 KiB
C++
Raw Normal View History

2016-03-10 03:47:37 +00:00
#ifndef __URDE_CGUISLIDERGROUP_HPP__
#define __URDE_CGUISLIDERGROUP_HPP__
2016-03-11 00:23:16 +00:00
#include "CGuiCompoundWidget.hpp"
2016-03-17 22:19:25 +00:00
#include <functional>
2016-03-10 03:47:37 +00:00
namespace urde
{
2016-03-11 00:23:16 +00:00
class CGuiSliderGroup : public CGuiCompoundWidget
{
2016-03-17 22:19:25 +00:00
float xf8_minVal;
float xfc_maxVal;
float x100_curVal;
float x104_increment;
u32 x108_ = 2;
CGuiWidget* x10c_workers[2] = {};
std::function<void(const CGuiSliderGroup*, float)> x114_changeCallback;
2016-03-11 00:23:16 +00:00
public:
2016-03-17 22:19:25 +00:00
CGuiSliderGroup(const CGuiWidgetParms& parms, float a, float b, float c, float d);
FourCC GetWidgetTypeID() const {return FOURCC('SLGP');}
2016-03-11 00:23:16 +00:00
2016-03-17 22:19:25 +00:00
void SetSelectionChangedCallback(std::function<void(const CGuiSliderGroup*, float)>&& func);
void SetIncrement(float inc) {x104_increment = inc;}
void SetMinVal(float min) {xf8_minVal = min; SetCurVal(x100_curVal);}
void SetMaxVal(float max) {xfc_maxVal = max; SetCurVal(x100_curVal);}
void SetCurVal(float cur);
bool AddWorkerWidget(CGuiWidget* worker);
CGuiWidget* GetWorkerWidget(int id);
static CGuiSliderGroup* Create(CGuiFrame* frame, CInputStream& in, bool flag);
2016-03-11 00:23:16 +00:00
};
2016-03-10 03:47:37 +00:00
}
#endif // __URDE_CGUISLIDERGROUP_HPP__