Scale 2D coordinates to backbuffer resolution. (#124)

* Starting with backbuffer scaling refactor.

* CSD & primitive 2Ds refactored.

* More refactoring.

* Fix primitive 2D, and on screen 3D items.

* Fix right side offset scaling.

* Fix Inspire letterbox.

* Fix offset scaling in world map.

* Fix custom menus.

* Remove debugging code.
This commit is contained in:
Skyth (Asilkan)
2025-01-18 23:56:47 +03:00
committed by GitHub
parent 1cf12fa97f
commit 40a8bf557b
10 changed files with 189 additions and 211 deletions

View File

@@ -229,8 +229,8 @@ void ButtonGuide::Draw()
auto drawList = ImGui::GetForegroundDrawList();
auto& res = ImGui::GetIO().DisplaySize;
ImVec2 regionMin = { Scale(g_aspectRatioOffsetX + g_sideMargins), Scale(g_aspectRatioOffsetY * 2.0f + 720.0f - 102.0f) };
ImVec2 regionMax = { Scale(g_aspectRatioOffsetX + 1280.0f - g_sideMargins), Scale(g_aspectRatioOffsetY * 2.0f + 720.0f) };
ImVec2 regionMin = { g_aspectRatioOffsetX + Scale(g_sideMargins), g_aspectRatioOffsetY * 2.0f + Scale(720.0f - 102.0f) };
ImVec2 regionMax = { g_aspectRatioOffsetX + Scale(1280.0f - g_sideMargins), g_aspectRatioOffsetY * 2.0f + Scale(720.0f) };
auto textMarginX = Scale(57);
auto textMarginY = Scale(8);