Add Wi-Fi signal indicator

This commit is contained in:
Pk11 2022-08-20 16:34:31 -05:00
commit ba63a53bbf
10 changed files with 22 additions and 0 deletions

View file

@ -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.
*/

View file

@ -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();

View file

@ -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. */