From d84c85609a8c1dc9fb8cbb83cabc53bd9efc0420 Mon Sep 17 00:00:00 2001 From: FlightlessMango Date: Sat, 11 Mar 2023 19:55:03 +0100 Subject: [PATCH] overlay: position: bottom center --- src/overlay.cpp | 4 ++++ src/overlay_params.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/overlay.cpp b/src/overlay.cpp index fe0e9b1..f9c4ed6 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -357,6 +357,10 @@ void position_layer(struct swapchain_stats& data, const struct overlay_params& p data.main_window_pos = ImVec2((width / 2) - (window_size.x / 2), margin + params.offset_y); ImGui::SetNextWindowPos(data.main_window_pos, ImGuiCond_Always); break; + case LAYER_POSITION_BOTTOM_CENTER: + data.main_window_pos = ImVec2((width / 2) - (window_size.x / 2), height - window_size.y - margin + params.offset_y); + ImGui::SetNextWindowPos(data.main_window_pos, ImGuiCond_Always); + break; case LAYER_POSITION_COUNT: break; } diff --git a/src/overlay_params.h b/src/overlay_params.h index da32af5..21608a0 100644 --- a/src/overlay_params.h +++ b/src/overlay_params.h @@ -169,6 +169,7 @@ enum overlay_param_position { LAYER_POSITION_MIDDLE_LEFT, LAYER_POSITION_MIDDLE_RIGHT, LAYER_POSITION_BOTTOM_LEFT, + LAYER_POSITION_BOTTOM_CENTER, LAYER_POSITION_BOTTOM_RIGHT, // Count must always be the last entry LAYER_POSITION_COUNT,