Only display battery stats if a battery is present
@@ -579,6 +579,7 @@ void HudElements::vkbasalt(){
}
void HudElements::battery_percent(){
+ if (Battery_Stats.batt_count > 0) {
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_battery_percent]){
ImGui::TableNextRow(); ImGui::TableNextColumn();
ImGui::TextColored(HUDElements.colors.battery, "BATT");
@@ -586,7 +587,6 @@ void HudElements::battery_percent(){
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%.0f", Battery_Stats.current_percent);
ImGui::SameLine(0,1.0f);
ImGui::Text("%%");
-
}
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_battery_percent] && HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_battery_power]){
@@ -617,6 +617,7 @@ void HudElements::battery_percent(){
}
}
}
+}
void HudElements::graphs(){
