mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Add screen capture button.
This commit is contained in:
parent
7cf55cef52
commit
40d7f3a134
@ -42,6 +42,7 @@ SystemStatusView::SystemStatusView() {
|
||||
add_children({ {
|
||||
&button_back,
|
||||
&title,
|
||||
&button_camera,
|
||||
&button_sleep,
|
||||
&sd_card_status_view,
|
||||
} });
|
||||
@ -52,6 +53,10 @@ SystemStatusView::SystemStatusView() {
|
||||
}
|
||||
};
|
||||
|
||||
button_camera.on_select = [this](ImageButton&) {
|
||||
this->on_camera();
|
||||
};
|
||||
|
||||
button_sleep.on_select = [this](ImageButton&) {
|
||||
DisplaySleepMessage message;
|
||||
EventDispatcher::message_map().send(&message);
|
||||
@ -71,6 +76,9 @@ void SystemStatusView::set_title(const std::string new_value) {
|
||||
}
|
||||
}
|
||||
|
||||
void SystemStatusView::on_camera() {
|
||||
}
|
||||
|
||||
/* Navigation ************************************************************/
|
||||
|
||||
bool NavigationView::is_top() const {
|
||||
|
@ -60,6 +60,29 @@ static constexpr Bitmap bitmap_sleep {
|
||||
{ 16, 16 }, bitmap_sleep_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_camera_data[] = {
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0xcc, 0x03,
|
||||
0xe8, 0x07,
|
||||
0xfc, 0x3f,
|
||||
0x3c, 0x3c,
|
||||
0x9c, 0x39,
|
||||
0xdc, 0x3b,
|
||||
0xdc, 0x3b,
|
||||
0x9c, 0x39,
|
||||
0x3c, 0x3c,
|
||||
0xfc, 0x3f,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
};
|
||||
|
||||
static constexpr Bitmap bitmap_camera {
|
||||
{ 16, 16 }, bitmap_camera_data
|
||||
};
|
||||
|
||||
class SystemStatusView : public View {
|
||||
public:
|
||||
std::function<void(void)> on_back;
|
||||
@ -84,6 +107,13 @@ private:
|
||||
default_title,
|
||||
};
|
||||
|
||||
ImageButton button_camera {
|
||||
{ 22 * 8, 0, 2 * 8, 1 * 16 },
|
||||
&bitmap_camera,
|
||||
Color::white(),
|
||||
Color::black()
|
||||
};
|
||||
|
||||
ImageButton button_sleep {
|
||||
{ 25 * 8, 0, 2 * 8, 1 * 16 },
|
||||
&bitmap_sleep,
|
||||
@ -94,6 +124,8 @@ private:
|
||||
SDCardStatusView sd_card_status_view {
|
||||
{ 28 * 8, 0 * 16, 2 * 8, 1 * 16 }
|
||||
};
|
||||
|
||||
void on_camera();
|
||||
};
|
||||
|
||||
class NavigationView : public View {
|
||||
|
Loading…
Reference in New Issue
Block a user