Add dial and thermo
This commit is contained in:
2024-08-27 11:10:45 +02:00
parent 1bbfe5f907
commit da4300e8de
6 changed files with 141 additions and 4 deletions
+21
View File
@@ -0,0 +1,21 @@
#pragma once
#include "UI_item.hpp"
#define UI_DIAL_TYPE std::string("UI_dial")
class UI_dial : public UI_item
{
public:
UI_dial(std::string id, std::string text, Color fg_color, Color bg_color, double min, double max, double value);
UI_dial(const json& j);
void set_value(double value) override;
double value() const;
void from_json(const json& j) override;
json to_json() const override;
private:
double m_min;
double m_max;
double m_value;
};