|
|
|
@ -578,20 +578,13 @@ void HudElements::vkbasalt(){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void HudElements::battery_percent(){
|
|
|
|
|
void HudElements::battery(){
|
|
|
|
|
if (Battery_Stats.batt_count > 0) {
|
|
|
|
|
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_battery_percent]){
|
|
|
|
|
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_battery]) {
|
|
|
|
|
ImGui::TableNextRow(); ImGui::TableNextColumn();
|
|
|
|
|
ImGui::TextColored(HUDElements.colors.battery, "BATT");
|
|
|
|
|
ImGui::TableNextColumn();
|
|
|
|
|
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]){
|
|
|
|
|
ImGui::TableNextColumn();
|
|
|
|
|
if (Battery_Stats.isCharging()) {
|
|
|
|
|
if (HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_battery_icon]) {
|
|
|
|
|
switch(int(Battery_Stats.current_percent)){
|
|
|
|
|
case 0 ... 33:
|
|
|
|
|
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%s", ICON_FK_BATTERY_QUARTER);
|
|
|
|
@ -599,16 +592,21 @@ void HudElements::battery_percent(){
|
|
|
|
|
case 34 ... 66:
|
|
|
|
|
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%s", ICON_FK_BATTERY_HALF);
|
|
|
|
|
break;
|
|
|
|
|
case 67 ... 99:
|
|
|
|
|
case 67 ... 97:
|
|
|
|
|
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%s", ICON_FK_BATTERY_THREE_QUARTERS);
|
|
|
|
|
break;
|
|
|
|
|
case 98 ... 100:
|
|
|
|
|
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%s", ICON_FK_BATTERY_FULL);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if(Battery_Stats.fullCharge() && !Battery_Stats.isCharging()) {
|
|
|
|
|
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%s", ICON_FK_BATTERY_FULL);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%.0f", Battery_Stats.current_percent);
|
|
|
|
|
ImGui::SameLine(0,1.0f);
|
|
|
|
|
ImGui::Text("%%");
|
|
|
|
|
}
|
|
|
|
|
if (!Battery_Stats.isCharging()) {
|
|
|
|
|
ImGui::TableNextColumn();
|
|
|
|
|
right_aligned_text(HUDElements.colors.text, HUDElements.ralign_width, "%.1f", Battery_Stats.current_watt);
|
|
|
|
|
ImGui::SameLine(0,1.0f);
|
|
|
|
|
ImGui::PushFont(HUDElements.sw_stats->font1);
|
|
|
|
@ -771,7 +769,7 @@ void HudElements::sort_elements(std::pair<std::string, std::string> option){
|
|
|
|
|
if (param == "vkbasalt") { ordered_functions.push_back({vkbasalt, value}); }
|
|
|
|
|
if (param == "exec") { ordered_functions.push_back({_exec, value});
|
|
|
|
|
exec_list.push_back({int(ordered_functions.size() - 1), value}); }
|
|
|
|
|
if (param == "battery_percent") {ordered_functions.push_back({battery_percent, value}); }
|
|
|
|
|
if (param == "battery") { ordered_functions.push_back({battery, value}); }
|
|
|
|
|
if (param == "graphs"){
|
|
|
|
|
if (!HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_graphs])
|
|
|
|
|
HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_graphs] = true;
|
|
|
|
|