Add Wi-Fi signal indicator
This commit is contained in:
parent
2b14b58dcf
commit
ba63a53bbf
10 changed files with 22 additions and 0 deletions
|
|
@ -11,6 +11,10 @@ sprites/battery/battery_4.png
|
|||
sprites/battery/battery_blink.png
|
||||
sprites/battery/battery_charge.png
|
||||
sprites/battery/battery_charge_full.png
|
||||
sprites/wifi/wifi_0.png
|
||||
sprites/wifi/wifi_1.png
|
||||
sprites/wifi/wifi_2.png
|
||||
sprites/wifi/wifi_3.png
|
||||
sprites/cancel.png
|
||||
sprites/checked.png
|
||||
sprites/delete.png
|
||||
|
|
|
|||
BIN
assets/gfx/sprites/wifi/wifi_0.png
Normal file
BIN
assets/gfx/sprites/wifi/wifi_0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 467 B |
BIN
assets/gfx/sprites/wifi/wifi_1.png
Normal file
BIN
assets/gfx/sprites/wifi/wifi_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 254 B |
BIN
assets/gfx/sprites/wifi/wifi_2.png
Normal file
BIN
assets/gfx/sprites/wifi/wifi_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 381 B |
BIN
assets/gfx/sprites/wifi/wifi_3.png
Normal file
BIN
assets/gfx/sprites/wifi/wifi_3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 535 B |
BIN
assets/gfx/sprites/wifi/wifi_off.png
Normal file
BIN
assets/gfx/sprites/wifi/wifi_off.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 488 B |
|
|
@ -51,6 +51,7 @@ namespace GFX {
|
|||
void DrawTime();
|
||||
void DrawBattery();
|
||||
void HandleBattery();
|
||||
void DrawWifi();
|
||||
void DrawIcon(const int Idx, int X, int Y, uint32_t Color = UIThemes->SideBarIconColor(), float BlendPower = 1.0f, float ScaleX = 1, float ScaleY = 1);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,21 @@ void GFX::HandleBattery() {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Draws the Wi-Fi signal icon
|
||||
*/
|
||||
void GFX::DrawWifi() {
|
||||
constexpr int wifiIcons[] = {
|
||||
sprites_wifi_0_idx,
|
||||
sprites_wifi_1_idx,
|
||||
sprites_wifi_2_idx,
|
||||
sprites_wifi_3_idx
|
||||
};
|
||||
|
||||
u8 level = osGetWifiStrength();
|
||||
GFX::DrawIcon(wifiIcons[level], 330, 0, UIThemes->TextColor());
|
||||
}
|
||||
|
||||
/*
|
||||
Draws the sidebar icons blended with the SideBarIconColor.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ void StoreUtils::DrawDownList(const std::vector<std::string> &entries, bool fetc
|
|||
|
||||
GFX::DrawTime();
|
||||
GFX::DrawBattery();
|
||||
GFX::DrawWifi();
|
||||
Animation::QueueEntryDone();
|
||||
|
||||
GFX::DrawBottom();
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ void MainScreen::Draw(void) const {
|
|||
config->list() ? StoreUtils::DrawList() : StoreUtils::DrawGrid();
|
||||
GFX::DrawTime();
|
||||
GFX::DrawBattery();
|
||||
GFX::DrawWifi();
|
||||
Animation::QueueEntryDone();
|
||||
|
||||
/* Download-ception. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue