Skip to content

Commit

Permalink
Renamed temporary window position variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenix3 committed Aug 27, 2024
1 parent 4d9fa8d commit 87e19fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/window/gui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ void Gui::DrawMenu() {
ImGui::Begin("Main - Deck", nullptr, windowFlags);
ImGui::PopStyleVar(3);

mWindowPosBeforeMenuBar = ImGui::GetWindowPos();
mTemporaryWindowPos = ImGui::GetWindowPos();

const ImGuiID dockId = ImGui::GetID("main_dock");

Expand Down Expand Up @@ -546,8 +546,8 @@ void Gui::StartFrame() {
ImGui::PopStyleColor();

ImVec2 mainPos = ImGui::GetWindowPos();
mainPos.x -= mWindowPosBeforeMenuBar.x;
mainPos.y -= mWindowPosBeforeMenuBar.y;
mainPos.x -= mTemporaryWindowPos.x;
mainPos.y -= mTemporaryWindowPos.y;
ImVec2 size = ImGui::GetContentRegionAvail();
gfx_current_dimensions.width = (uint32_t)(size.x * gfx_current_dimensions.internal_mul);
gfx_current_dimensions.height = (uint32_t)(size.y * gfx_current_dimensions.internal_mul);
Expand Down
2 changes: 1 addition & 1 deletion src/window/gui/Gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Gui {
std::unordered_map<std::string, GuiTextureMetadata> mGuiTextures;
std::map<std::string, std::shared_ptr<GuiWindow>> mGuiWindows;
bool mPadBtnTogglesMenu = false;
ImVec2 mWindowPosBeforeMenuBar;
ImVec2 mTemporaryWindowPos;
};
} // namespace Ship

Expand Down

0 comments on commit 87e19fc

Please sign in to comment.