mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-14 17:35:34 -04:00
Added new toolbar in main menu
This commit is contained in:
parent
bf2a04ab57
commit
9c9021f63b
7 changed files with 174 additions and 5 deletions
|
@ -110,7 +110,7 @@ public:
|
|||
void set_title(const std::string new_value);
|
||||
|
||||
private:
|
||||
static constexpr auto default_title = " v1.1.1"; // TODO: Move the version somewhere
|
||||
static constexpr auto default_title = "";
|
||||
|
||||
NavigationView& nav_;
|
||||
|
||||
|
@ -208,6 +208,59 @@ private:
|
|||
};
|
||||
};
|
||||
|
||||
class InformationView : public View {
|
||||
public:
|
||||
InformationView(NavigationView& nav);
|
||||
void update_time();
|
||||
|
||||
|
||||
private:
|
||||
void refresh();
|
||||
static constexpr auto version_string = "v1.1.1";
|
||||
NavigationView& nav_;
|
||||
|
||||
void on_time();
|
||||
|
||||
rtc::RTC datetime;
|
||||
|
||||
Rectangle backdrop {
|
||||
{ 0, 0 * 16, 240, 16 },
|
||||
{33, 33, 33}
|
||||
};
|
||||
|
||||
Text version {
|
||||
{0, 0, 11 * 8, 16},
|
||||
version_string
|
||||
};
|
||||
|
||||
ImageButton test {
|
||||
{80, 0, 16, 16},
|
||||
&bitmap_icon_camera,
|
||||
Color::white(),
|
||||
Color::dark_grey()
|
||||
};
|
||||
|
||||
Button time {
|
||||
{120, 0, 11 * 8, 16},
|
||||
""
|
||||
};
|
||||
/*
|
||||
LiveDateTime ltime {
|
||||
{120, 0, 11 * 8, 16}
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
|
||||
MessageHandlerRegistration message_handler_refresh {
|
||||
Message::ID::InfoRefresh,
|
||||
[this](const Message* const p) {
|
||||
(void)p;
|
||||
this->refresh();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class BMPView : public View {
|
||||
public:
|
||||
BMPView(NavigationView& nav);
|
||||
|
@ -261,7 +314,10 @@ public:
|
|||
Context& context() const override;
|
||||
|
||||
private:
|
||||
void on_tick_second();
|
||||
|
||||
SystemStatusView status_view { navigation_view };
|
||||
InformationView info_view { navigation_view };
|
||||
NavigationView navigation_view { };
|
||||
Context& context_;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue