2020-02-16 12:32:36 -05:00
|
|
|
#pragma once
|
|
|
|
|
2020-11-15 10:49:36 -05:00
|
|
|
#include <lvgl/lvgl.h>
|
2020-02-16 12:32:36 -05:00
|
|
|
#include <cstdint>
|
2020-11-15 10:49:36 -05:00
|
|
|
#include <memory>
|
|
|
|
#include "Screen.h"
|
|
|
|
#include "../Apps.h"
|
2021-02-24 14:40:24 -05:00
|
|
|
#include "components/settings/Settings.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;
|
|
|
|
};
|
|
|
|
|
2021-02-24 14:40:24 -05:00
|
|
|
explicit Tile(uint8_t screenID, DisplayApp* app, Controllers::Settings& settingsController, 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
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|