Cleaned up and tweaked

This commit is contained in:
klockee 2020-08-08 04:24:57 -04:00
parent 9c9021f63b
commit b300cc258e
5 changed files with 38 additions and 104 deletions

View file

@ -243,7 +243,10 @@ public:
~LiveDateTime();
void paint(Painter& painter) override;
void set_seconds_enabled(bool new_value);
void set_date_enabled(bool new_value);
std::string& string() {
return text;
}
@ -251,6 +254,9 @@ public:
private:
void on_tick_second();
bool date_enabled = true;
bool seconds_enabled = false;
rtc::RTC datetime { };
SignalToken signal_token_tick_second { };
std::string text { };
@ -428,16 +434,6 @@ private:
const Bitmap* bitmap_;
};
class DateTimeButton : public Button {
public:
DateTimeButton(Rect parent_rect, std::string text);
void paint(Painter& painter) override;
private:
std::string text_;
void on_tick_second();
};
class Image : public Widget {
public:
Image();