Batch #9046 by youko: 0 byte-identical, 1 confirmed by peer review. - fn_11714 UIMessageBoxAutoreturn::Configure: logic confirmed by peer review Peer-reviewed-by: eAthena, Lumen, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
124 lines
2.7 KiB
C++
124 lines
2.7 KiB
C++
#ifndef RAGNAROK_SOURCE_UI_UIBARGRAPH_H
|
|
#define RAGNAROK_SOURCE_UI_UIBARGRAPH_H
|
|
|
|
#include "UI/Window/UIWindow.h"
|
|
|
|
#include <cstdint>
|
|
#include <functional>
|
|
|
|
struct UIButtonContext;
|
|
|
|
class UIBarGraph : public UIWindow {
|
|
public:
|
|
explicit UIBarGraph(UIWindowContext& context) : UIWindow(context, 0), m_value(0) {
|
|
}
|
|
|
|
void Paint() override;
|
|
|
|
void SetValue(float value);
|
|
|
|
/* 007C */ float m_value;
|
|
};
|
|
|
|
class UIBarGraph2 : public UIBarGraph {
|
|
public:
|
|
explicit UIBarGraph2(UIWindowContext& context);
|
|
|
|
void Paint() override;
|
|
|
|
/* 0080 */ int m_vertical;
|
|
/* 0084 */ int m_backgroundRed;
|
|
/* 0088 */ int m_backgroundGreen;
|
|
/* 008C */ int m_backgroundBlue;
|
|
/* 0090 */ int m_fillRed;
|
|
/* 0094 */ int m_fillGreen;
|
|
/* 0098 */ int m_fillBlue;
|
|
};
|
|
|
|
class UIBarGraph3 : public UIWindow {
|
|
public:
|
|
explicit UIBarGraph3(UIWindowContext& context);
|
|
~UIBarGraph3() override;
|
|
|
|
protected:
|
|
/* 007C */ const int* m_current;
|
|
/* 0080 */ const int* m_maximum;
|
|
};
|
|
|
|
class UIBarGraph4 : public UIBarGraph3 {
|
|
public:
|
|
explicit UIBarGraph4(UIWindowContext& context) : UIBarGraph3(context) {
|
|
}
|
|
|
|
void Paint() override;
|
|
void Slot28(int x, int y) override;
|
|
|
|
void SetValues(const int* current, const int* maximum);
|
|
|
|
/* 0084 */ bool m_plainColor;
|
|
|
|
protected:
|
|
UIButtonContext* m_controls;
|
|
};
|
|
|
|
class UIINT64BarGraph : public UIWindow {
|
|
public:
|
|
explicit UIINT64BarGraph(UIWindowContext& context);
|
|
|
|
void Paint() override;
|
|
void Slot28(int x, int y) override;
|
|
|
|
void SetValues(std::int64_t current, std::int64_t maximum);
|
|
void FillBackground(std::uint32_t color);
|
|
|
|
/* 007C */ unsigned char m_plainColor;
|
|
|
|
protected:
|
|
/* 0080 */ std::int64_t m_current;
|
|
/* 0088 */ std::int64_t m_maximum;
|
|
UIButtonContext* m_controls;
|
|
};
|
|
|
|
class UIPetInfoBarGraph : public UIWindow {
|
|
public:
|
|
explicit UIPetInfoBarGraph(UIWindowContext& context);
|
|
|
|
void Paint() override;
|
|
void SetValue(int value);
|
|
|
|
/* 007C */ int unknown_007C;
|
|
};
|
|
|
|
class UIBarGraphHomun : public UIWindow {
|
|
public:
|
|
explicit UIBarGraphHomun(UIWindowContext& context);
|
|
|
|
void Paint() override;
|
|
|
|
void SetValues(std::function<std::int64_t()> current, std::function<std::int64_t()> maximum);
|
|
|
|
protected:
|
|
/* 0080 */ std::function<std::int64_t()> m_current;
|
|
/* 00A8 */ std::function<std::int64_t()> m_maximum;
|
|
};
|
|
|
|
class UIBarGraphPlayer : public UIWindow {
|
|
public:
|
|
explicit UIBarGraphPlayer(UIWindowContext& context);
|
|
~UIBarGraphPlayer() override;
|
|
|
|
void Paint() override;
|
|
|
|
void SetValues(std::function<std::int64_t()> current, std::function<std::int64_t()> maximum);
|
|
|
|
protected:
|
|
/* 0080 */ std::function<std::int64_t()> m_current;
|
|
/* 00A8 */ std::function<std::int64_t()> m_maximum;
|
|
};
|
|
|
|
class UIBarGraphPlayerAP : public UIBarGraphPlayer {
|
|
public:
|
|
void Paint() override;
|
|
};
|
|
|
|
#endif
|