FullscreenUI: Extend achievement overlays to screen margins
Fixes overlays getting caught in rounded corners on Android.
This commit is contained in:
parent
ab790ed54b
commit
c43533f8d8
|
@ -2237,12 +2237,13 @@ void Achievements::DrawGameOverlays()
|
|||
|
||||
const auto lock = GetLock();
|
||||
|
||||
const float margin = std::max(ImGuiManager::GetScreenMargin(), LayoutScale(10.0f));
|
||||
const float spacing = LayoutScale(10.0f);
|
||||
const float padding = LayoutScale(10.0f);
|
||||
const ImVec2 image_size =
|
||||
LayoutScale(ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT, ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT);
|
||||
const ImGuiIO& io = ImGui::GetIO();
|
||||
ImVec2 position = ImVec2(io.DisplaySize.x - padding, io.DisplaySize.y - padding);
|
||||
ImVec2 position = ImVec2(io.DisplaySize.x - margin, io.DisplaySize.y - margin);
|
||||
ImDrawList* dl = ImGui::GetBackgroundDrawList();
|
||||
|
||||
if (!s_state.active_challenge_indicators.empty())
|
||||
|
|
|
@ -514,12 +514,11 @@ void ImGuiFullscreen::EndLayout()
|
|||
|
||||
DrawFullscreenFooter();
|
||||
|
||||
const float notification_margin = LayoutScale(10.0f);
|
||||
const float margin = std::max(ImGuiManager::GetScreenMargin(), LayoutScale(10.0f));
|
||||
const float spacing = LayoutScale(10.0f);
|
||||
const float notification_vertical_pos = GetNotificationVerticalPosition();
|
||||
ImVec2 position(notification_margin,
|
||||
notification_vertical_pos * ImGui::GetIO().DisplaySize.y +
|
||||
((notification_vertical_pos >= 0.5f) ? -notification_margin : notification_margin));
|
||||
ImVec2 position(margin, notification_vertical_pos * ImGui::GetIO().DisplaySize.y +
|
||||
((notification_vertical_pos >= 0.5f) ? -margin : margin));
|
||||
DrawBackgroundProgressDialogs(position, spacing);
|
||||
DrawNotifications(position, spacing);
|
||||
DrawToast();
|
||||
|
|
Loading…
Reference in New Issue