2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2017-01-14 04:16:10 +00:00
|
|
|
#include "CGuiGroup.hpp"
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-01-22 01:40:12 +00:00
|
|
|
class CSimplePool;
|
2016-03-10 03:47:37 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CAuiMeter : public CGuiGroup {
|
|
|
|
bool xc4_noRoundUp;
|
|
|
|
s32 xc8_maxCapacity;
|
|
|
|
s32 xcc_capacity;
|
|
|
|
s32 xd0_value = 0;
|
|
|
|
std::vector<CGuiGroup*> xd4_workers;
|
|
|
|
void UpdateMeterWorkers();
|
2017-01-14 04:16:10 +00:00
|
|
|
|
2016-03-11 00:23:16 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
CAuiMeter(const CGuiWidgetParms& parms, bool noRoundUp, u32 maxCapacity, u32 workerCount);
|
2019-08-09 12:45:18 +00:00
|
|
|
FourCC GetWidgetTypeID() const override { return FOURCC('METR'); }
|
2017-01-14 04:16:10 +00:00
|
|
|
|
2019-08-09 12:45:18 +00:00
|
|
|
void OnVisibleChange() override;
|
2018-12-08 05:30:43 +00:00
|
|
|
void SetCurrValue(s32 val);
|
|
|
|
void SetCapacity(s32 cap);
|
|
|
|
void SetMaxCapacity(s32 cap);
|
2019-08-09 12:45:18 +00:00
|
|
|
CGuiWidget* GetWorkerWidget(int id) const override;
|
|
|
|
bool AddWorkerWidget(CGuiWidget* worker) override;
|
2017-01-14 04:16:10 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
static std::shared_ptr<CGuiWidget> Create(CGuiFrame* frame, CInputStream& in, CSimplePool* sp);
|
2016-03-10 03:47:37 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|