2020-03-14 15:33:47 +00:00
|
|
|
#pragma once
|
2021-11-03 22:02:30 +00:00
|
|
|
#include <cstdint>
|
2022-04-07 14:28:04 +00:00
|
|
|
#include <lvgl/src/lv_core/lv_obj.h>
|
2020-03-14 15:33:47 +00:00
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
class BatteryIcon {
|
2021-04-24 09:00:45 +00:00
|
|
|
public:
|
2022-04-07 14:28:04 +00:00
|
|
|
void Create(lv_obj_t* parent);
|
|
|
|
|
|
|
|
void SetColor(lv_color_t);
|
|
|
|
void SetBatteryPercentage(uint8_t percentage);
|
|
|
|
lv_obj_t* GetObject();
|
|
|
|
|
2020-07-04 11:58:15 +00:00
|
|
|
static const char* GetUnknownIcon();
|
2021-04-18 17:28:14 +00:00
|
|
|
static const char* GetPlugIcon(bool isCharging);
|
2022-04-07 14:28:04 +00:00
|
|
|
private:
|
|
|
|
lv_obj_t* batteryImg;
|
|
|
|
lv_obj_t* batteryJuice;
|
2020-03-14 15:33:47 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2022-04-07 14:28:04 +00:00
|
|
|
}
|