Skip to content

Commit

Permalink
Notify: fix positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
emoose committed Dec 10, 2024
1 parent 6e34636 commit 8192766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/overlay/notifications.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ class Notifications

ImGui::SetNextWindowPos(ImVec2(startX, curY));

curY += windowSize.y + notificationSpacing;

std::string windowName = "Notification " + std::to_string(i);
ImGui::Begin(windowName.c_str(), nullptr, ImGuiWindowFlags_NoDecoration |
ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoInputs |
Expand All @@ -91,6 +89,8 @@ class Notifications

ImGui::SetWindowSize(windowSize);

curY += windowSize.y + notificationSpacing;

// Center text with padding
float paddingX = 10.0f, paddingY = 5.0f;
float offsetX = (windowSize.x - textSize.x) / 2.0f;
Expand Down

0 comments on commit 8192766

Please sign in to comment.