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