2020-02-16 12:32:36 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include "Screen.h"
|
|
|
|
#include <bits/unique_ptr.h>
|
2020-02-26 14:49:26 -05:00
|
|
|
#include "Modal.h"
|
2020-02-16 12:32:36 -05:00
|
|
|
#include <lvgl/src/lv_core/lv_style.h>
|
2020-08-14 03:46:37 -04:00
|
|
|
#include <DisplayApp/Apps.h>
|
2020-02-16 12:32:36 -05:00
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
class Tile : public Screen {
|
|
|
|
public:
|
2020-08-14 03:46:37 -04:00
|
|
|
struct Applications {
|
|
|
|
const char* icon;
|
|
|
|
Pinetime::Applications::Apps application;
|
|
|
|
};
|
|
|
|
|
|
|
|
explicit Tile(DisplayApp* app, std::array<Applications, 6>& applications);
|
2020-02-16 12:32:36 -05:00
|
|
|
~Tile() override;
|
|
|
|
|
2020-02-23 10:14:03 -05:00
|
|
|
bool Refresh() override;
|
2020-02-23 07:44:39 -05:00
|
|
|
bool OnButtonPushed() override;
|
|
|
|
|
2020-02-23 10:14:03 -05:00
|
|
|
void OnObjectEvent(lv_obj_t* obj, lv_event_t event, uint32_t buttonId);
|
2020-02-16 12:32:36 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
lv_obj_t * btnm1;
|
2020-02-23 07:44:39 -05:00
|
|
|
bool running = true;
|
2020-02-26 14:49:26 -05:00
|
|
|
|
|
|
|
std::unique_ptr<Modal> modal;
|
2020-08-14 03:46:37 -04:00
|
|
|
|
|
|
|
const char* btnm_map1[8];
|
|
|
|
Pinetime::Applications::Apps apps[6];
|
2020-02-16 12:32:36 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|