mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
UI
Add color map to thermo
This commit is contained in:
@@ -13,10 +13,18 @@ class UI_thermo : public UI_item
|
||||
void set_value(double value) override;
|
||||
double value() const;
|
||||
|
||||
void set_start_color(Color color);
|
||||
void set_end_color(Color color);
|
||||
void add_color_stop(double value, Color color);
|
||||
void add_color_stop_normalized(double value, Color color);
|
||||
void remove_color_stop(double value);
|
||||
void remove_color_stop_normalized(double value);
|
||||
|
||||
void from_json(const json& j) override;
|
||||
json to_json() const override;
|
||||
private:
|
||||
double m_min;
|
||||
double m_max;
|
||||
double m_value;
|
||||
std::unordered_map<double, Color> m_color_map;
|
||||
};
|
||||
Reference in New Issue
Block a user