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