overlay: UI scaling option (#495)

## Link to GitHub Issue, if one exists
#477 

## Description of change
Add a new option for scaling the overlay.

Gitadora Arena will receive 250% by default.

Various overlay windows have been updated to scale properly, not perfect
but they are at least usable.
This commit is contained in:
bicarus
2026-01-02 21:54:25 -08:00
committed by GitHub
parent 7a1f46d1be
commit 6ffaa77f58
14 changed files with 112 additions and 34 deletions
+14 -6
View File
@@ -19,15 +19,15 @@ namespace overlay::windows {
case 0: {
this->toggle_button = games::OverlayButtons::ToggleVirtualKeypadP1;
this->init_pos = ImVec2(
26,
ImGui::GetIO().DisplaySize.y - 264);
overlay::apply_scaling(26),
ImGui::GetIO().DisplaySize.y - overlay::apply_scaling(264));
break;
}
case 1: {
this->toggle_button = games::OverlayButtons::ToggleVirtualKeypadP2;
this->init_pos = ImVec2(
ImGui::GetIO().DisplaySize.x - 220,
ImGui::GetIO().DisplaySize.y - 264);
ImGui::GetIO().DisplaySize.x - overlay::apply_scaling(220),
ImGui::GetIO().DisplaySize.y - overlay::apply_scaling(264));
break;
}
}
@@ -82,9 +82,17 @@ namespace overlay::windows {
// add selectable (fill last line)
if (i == std::size(BUTTONS) - 1) {
ImGui::Selectable(button.text, false, 0, ImVec2(112, 32));
ImGui::Selectable(
button.text,
false,
0,
overlay::apply_scaling_to_vector(ImVec2(112, 32)));
} else {
ImGui::Selectable(button.text, false, 0, ImVec2(32, 32));
ImGui::Selectable(
button.text,
false,
0,
overlay::apply_scaling_to_vector(ImVec2(32, 32)));
}
// mouse down handler