mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-10 07:30:08 -04:00
Cleaned up and tweaked
This commit is contained in:
parent
9c9021f63b
commit
b300cc258e
5 changed files with 38 additions and 104 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue