mirror of
https://github.com/stenzek/duckstation.git
synced 2025-07-23 02:20:15 +00:00
FullscreenUI: Slight tidy-up to achievements login dialog
This commit is contained in:
parent
272aa4f933
commit
5c83bbe5c5
@ -5297,18 +5297,26 @@ void FullscreenUI::DrawAchievementsLoginWindow()
|
|||||||
QueueResetFocus(FocusResetType::PopupClosed);
|
QueueResetFocus(FocusResetType::PopupClosed);
|
||||||
};
|
};
|
||||||
|
|
||||||
ImGui::SetNextWindowSize(LayoutScale(700.0f, 0.0f));
|
ImGui::SetNextWindowSize(LayoutScale(750.0f, 0.0f));
|
||||||
ImGui::SetNextWindowPos(ImGui::GetIO().DisplaySize * 0.5f, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
ImGui::SetNextWindowPos(ImGui::GetIO().DisplaySize * 0.5f, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||||
|
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, LayoutScale(10.0f));
|
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, LayoutScale(20.0f, 20.0f));
|
|
||||||
ImGui::PushFont(UIStyle.LargeFont);
|
ImGui::PushFont(UIStyle.LargeFont);
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, LayoutScale(10.0f));
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,
|
||||||
|
LayoutScale(LAYOUT_MENU_BUTTON_X_PADDING, LAYOUT_MENU_BUTTON_Y_PADDING));
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, LayoutScale(20.0f, 20.0f));
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 0.0f);
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text, UIStyle.PrimaryTextColor);
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_TitleBg, UIStyle.PrimaryDarkColor);
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_TitleBgActive, UIStyle.PrimaryColor);
|
||||||
|
|
||||||
const char* popup_title = FSUI_CSTR("RetroAchievements Login");
|
const char* popup_title = FSUI_ICONSTR(ICON_FA_KEY, "RetroAchievements Login");
|
||||||
bool popup_closed = false;
|
bool popup_closed = false;
|
||||||
ImGui::OpenPopup(popup_title);
|
ImGui::OpenPopup(popup_title);
|
||||||
if (ImGui::BeginPopupModal(popup_title, nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize))
|
if (ImGui::BeginPopupModal(popup_title, nullptr, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize))
|
||||||
{
|
{
|
||||||
|
BeginMenuButtons();
|
||||||
|
|
||||||
ImGui::TextWrapped(
|
ImGui::TextWrapped(
|
||||||
FSUI_CSTR("Please enter your user name and password for retroachievements.org below. Your password will "
|
FSUI_CSTR("Please enter your user name and password for retroachievements.org below. Your password will "
|
||||||
"not be saved in DuckStation, an access token will be generated and used instead."));
|
"not be saved in DuckStation, an access token will be generated and used instead."));
|
||||||
@ -5330,8 +5338,6 @@ void FullscreenUI::DrawAchievementsLoginWindow()
|
|||||||
|
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
|
|
||||||
BeginMenuButtons();
|
|
||||||
|
|
||||||
const bool login_enabled = (std::strlen(username) > 0 && std::strlen(password) > 0 && !is_logging_in);
|
const bool login_enabled = (std::strlen(username) > 0 && std::strlen(password) > 0 && !is_logging_in);
|
||||||
|
|
||||||
if (ActiveButton(FSUI_ICONSTR(ICON_FA_KEY, "Login"), false, login_enabled))
|
if (ActiveButton(FSUI_ICONSTR(ICON_FA_KEY, "Login"), false, login_enabled))
|
||||||
@ -5379,8 +5385,9 @@ void FullscreenUI::DrawAchievementsLoginWindow()
|
|||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::PopStyleColor(3);
|
||||||
|
ImGui::PopStyleVar(4);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
ImGui::PopStyleVar(2);
|
|
||||||
|
|
||||||
if (popup_closed)
|
if (popup_closed)
|
||||||
actually_close_popup();
|
actually_close_popup();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user