mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-24 14:59:24 -05:00
Switch display sleep button to ImageButton.
This commit is contained in:
parent
dd6d56cff8
commit
5d4e59271a
@ -53,7 +53,7 @@ SystemStatusView::SystemStatusView() {
|
||||
}
|
||||
};
|
||||
|
||||
button_sleep.on_select = [this](Button&) {
|
||||
button_sleep.on_select = [this](ImageButton&) {
|
||||
DisplaySleepMessage message;
|
||||
EventDispatcher::message_map().send(&message);
|
||||
};
|
||||
|
@ -37,6 +37,29 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
static constexpr uint8_t bitmap_sleep_data[] = {
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x04,
|
||||
0x00, 0x08,
|
||||
0x00, 0x18,
|
||||
0x00, 0x18,
|
||||
0x00, 0x38,
|
||||
0x00, 0x3c,
|
||||
0x00, 0x3c,
|
||||
0x00, 0x3e,
|
||||
0x84, 0x1f,
|
||||
0xf8, 0x1f,
|
||||
0xf0, 0x0f,
|
||||
0xc0, 0x03,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
};
|
||||
|
||||
static constexpr Bitmap bitmap_sleep {
|
||||
{ 16, 16 }, bitmap_sleep_data
|
||||
};
|
||||
|
||||
class SystemStatusView : public View {
|
||||
public:
|
||||
std::function<void(void)> on_back;
|
||||
@ -59,9 +82,11 @@ private:
|
||||
default_title,
|
||||
};
|
||||
|
||||
Button button_sleep {
|
||||
ImageButton button_sleep {
|
||||
{ 25 * 8, 0, 2 * 8, 1 * 16 },
|
||||
"ZZ",
|
||||
&bitmap_sleep,
|
||||
Color::white(),
|
||||
Color::black()
|
||||
};
|
||||
|
||||
SDCardStatusView sd_card_status_view {
|
||||
|
Loading…
Reference in New Issue
Block a user