This commit is contained in:
2024-08-29 15:00:27 +02:00
parent 6c6a60e980
commit 21a2c16607
31 changed files with 457 additions and 409 deletions
+5 -8
View File
@@ -1,14 +1,11 @@
#include "UI_led.hpp"
UI_led::UI_led(std::string id, std::string text, Color fg_color, Color bg_color, Color led_color) :
UI_item(id, UI_LED_TYPE, text, 12, fg_color, bg_color),
m_led_color(led_color)
UI_led::UI_led(std::string id, std::string text, Color fg_color, Color bg_color, Color led_color)
: UI_item(id, UI_LED_TYPE, text, 12, fg_color, bg_color), m_led_color(led_color)
{
}
UI_led::UI_led(const json& j) :
UI_item(UI_LED_TYPE)
UI_led::UI_led(const json &j) : UI_item(UI_LED_TYPE)
{
from_json(j);
}
@@ -23,7 +20,7 @@ void UI_led::set_led_color(Color led_color)
m_led_color = led_color;
}
void UI_led::from_json(const json& j)
void UI_led::from_json(const json &j)
{
UI_item::from_json(j);
std::string color;
@@ -35,5 +32,5 @@ json UI_led::to_json() const
{
json j = UI_item::to_json();
j["led_color"] = m_led_color.to_hex();
return j;
return j;
}