overlay: position: bottom center

This commit is contained in:
FlightlessMango 2023-03-11 19:55:03 +01:00
parent 175493c89c
commit d84c85609a
2 changed files with 5 additions and 0 deletions

View File

@ -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;
}

View File

@ -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,