mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-08 22:52:27 -04:00
Max17055 improvements (#2197)
* fixes * more fixes * more fixes * fix * more fixes * fix icon updates * fix init unk error * simplify * improve icon init * code format * Update ui_battinfo.cpp
This commit is contained in:
parent
19eb6b44d5
commit
2bedb5f09f
13 changed files with 112 additions and 63 deletions
|
@ -790,7 +790,7 @@ class BatteryTextField : public Widget {
|
|||
BatteryTextField(Rect parent_rect, uint8_t percent);
|
||||
void paint(Painter& painter) override;
|
||||
|
||||
void set_battery(uint8_t percentage, bool charge);
|
||||
void set_battery(uint8_t valid_mask, uint8_t percentage, bool charge);
|
||||
void set_text(std::string_view value);
|
||||
|
||||
bool on_key(KeyEvent key) override;
|
||||
|
@ -801,6 +801,7 @@ class BatteryTextField : public Widget {
|
|||
|
||||
private:
|
||||
uint8_t percent_{102};
|
||||
uint8_t valid_{0};
|
||||
bool charge_{false};
|
||||
|
||||
Style style{
|
||||
|
@ -816,7 +817,7 @@ class BatteryIcon : public Widget {
|
|||
|
||||
BatteryIcon(Rect parent_rect, uint8_t percent);
|
||||
void paint(Painter& painter) override;
|
||||
void set_battery(uint8_t percentage, bool charge);
|
||||
void set_battery(uint8_t valid_mask, uint8_t percentage, bool charge);
|
||||
|
||||
bool on_key(KeyEvent key) override;
|
||||
bool on_touch(TouchEvent event) override;
|
||||
|
@ -826,6 +827,7 @@ class BatteryIcon : public Widget {
|
|||
|
||||
private:
|
||||
uint8_t percent_{102};
|
||||
uint8_t valid_{0};
|
||||
bool charge_{false};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue