2020-02-26 19:49:26 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Screen.h"
|
2020-11-15 15:49:36 +00:00
|
|
|
#include <lvgl/src/lv_core/lv_style.h>
|
|
|
|
#include <lvgl/src/lv_core/lv_obj.h>
|
2020-02-26 19:49:26 +00:00
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
|
|
|
|
class Modal : public Screen{
|
|
|
|
public:
|
|
|
|
Modal(DisplayApp* app);
|
|
|
|
~Modal() override;
|
|
|
|
|
2020-03-28 18:05:28 +00:00
|
|
|
void Show(const char* msg);
|
2020-02-26 19:49:26 +00:00
|
|
|
void Hide();
|
|
|
|
|
|
|
|
bool Refresh() override;
|
|
|
|
bool OnButtonPushed() override;
|
|
|
|
|
|
|
|
static void mbox_event_cb(lv_obj_t *obj, lv_event_t evt);
|
|
|
|
private:
|
|
|
|
void OnEvent(lv_obj_t *event_obj, lv_event_t evt);
|
|
|
|
|
|
|
|
lv_style_t modal_style;
|
|
|
|
lv_obj_t *obj;
|
|
|
|
lv_obj_t *mbox;
|
|
|
|
lv_obj_t *info;
|
|
|
|
bool running = true;
|
2020-03-25 20:23:40 +00:00
|
|
|
bool isVisible = false;
|
2020-02-26 19:49:26 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|