Add window padding if hud_compact = 0

This commit is contained in:
Alessandro Toia 2022-12-11 15:02:03 -08:00
parent ddbb4f5be1
commit 5bf4091cdf

View File

@ -307,8 +307,13 @@ void overlay_new_frame(const struct overlay_params& params)
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(8,-3)); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(8,-3));
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, params.alpha); ImGui::PushStyleVar(ImGuiStyleVar_Alpha, params.alpha);
if (!params.enabled[OVERLAY_PARAM_ENABLED_hud_compact]){
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(5,5));
}
else {
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0,0)); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0,0));
} }
}
void overlay_end_frame() void overlay_end_frame()
{ {