From 1285d1520175e5b0275df4bd0958e485aee8a0a1 Mon Sep 17 00:00:00 2001 From: sindoring Date: Sun, 8 Nov 2026 20:50:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D1=83=20=D0=B2?= =?UTF-8?q?=D1=8B=D1=85=D0=BE=D0=B4=D0=B0=20=D0=BF=D1=80=D0=B8=20=D0=B2?= =?UTF-8?q?=D1=85=D0=BE=D0=B4=D0=B5=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20?= =?UTF-8?q?=D0=BB=D0=B0=D1=83=D0=BD=D1=87=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Штатная локализованная AccountLoginExitButton остаётся видимой в автоматическом режиме и использует прежний обработчик QuitGame. Поля входа и остальные скрываемые элементы не возвращаются. Версия приложения MoonWell — 0.3.2; версия библиотек Benilla остаётся 0.3.1. Проверено на Windows: форматирование, Clippy, reference и regression-тест login_skin прошли. Dev-клиент с реальным GlueXML и без учётных данных показал кнопку рядом со спиннером; прямой вызов кнопки и клик через события окна завершили клиент с кодом 0 и записью login: QuitGame. Release-сборка без dev прошла. Полный scripts/gates.sh выполняется перед слиянием. --- Cargo.lock | 2 +- crates/moonwell/Cargo.toml | 2 +- crates/moonwell/README.md | 3 ++- crates/moonwell/src/login_scene/interface.lua | 4 +++- crates/moonwell/tests/login_skin.rs | 15 +++++++++++++-- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 021f9a750..08e266484 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4706,7 +4706,7 @@ checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" [[package]] name = "moonwell" -version = "0.3.1" +version = "0.3.2" dependencies = [ "benilla-app", "benilla-assets", diff --git a/crates/moonwell/Cargo.toml b/crates/moonwell/Cargo.toml index cae265940..1a5bdd91f 100644 --- a/crates/moonwell/Cargo.toml +++ b/crates/moonwell/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "moonwell" -version.workspace = true +version = "0.3.2" edition.workspace = true license.workspace = true description = "The MoonWell launcher: platform branding on top of benilla" diff --git a/crates/moonwell/README.md b/crates/moonwell/README.md index ee8277aaf..8a73d6fd3 100644 --- a/crates/moonwell/README.md +++ b/crates/moonwell/README.md @@ -183,7 +183,8 @@ between it and the framing crowns. All additions remain owned by the disposable Automatic launcher login (`WOW_USER` and `WOW_PASS`) uses `login_scene/interface.lua`: the stock account controls and branding are hidden; a twelve-dot spinner repeats the installed, -localized login status. Realm selection, automatic locale selection, PIN, queue and refusal +localized login status. The stock localized Exit button stays available, using its QuitGame handler. +Realm selection, automatic locale selection, PIN, queue and refusal dialogs retain their stock handlers. Manual login keeps its fields, with Blizzard branding hidden. `interface.rs::MINIMUM_SCENE_SECONDS=6` and `STAGE_SECONDS=0.85` pace the visible login stages; the optional `benilla_app::login_backdrop::LoginPresentation` holds successful glue transitions diff --git a/crates/moonwell/src/login_scene/interface.lua b/crates/moonwell/src/login_scene/interface.lua index b20d8d39d..544a300a7 100644 --- a/crates/moonwell/src/login_scene/interface.lua +++ b/crates/moonwell/src/login_scene/interface.lua @@ -53,10 +53,12 @@ function MoonWellLoginPaint(automatic, busy, seconds) if automatic and AccountLoginUI then for _, region in ipairs({AccountLoginUI:GetRegions()}) do region:Hide() end for _, child in ipairs({AccountLoginUI:GetChildren()}) do - if child ~= VirtualKeypadFrame then + if child ~= VirtualKeypadFrame and child ~= AccountLoginExitButton then child:Hide() end end + -- The stock exit keeps its localized label and QuitGame handler during launcher login. + if AccountLoginExitButton then AccountLoginExitButton:Show() end AccountLoginAccountEdit:ClearFocus() AccountLoginPasswordEdit:ClearFocus() end diff --git a/crates/moonwell/tests/login_skin.rs b/crates/moonwell/tests/login_skin.rs index 01a767999..022071dce 100644 --- a/crates/moonwell/tests/login_skin.rs +++ b/crates/moonwell/tests/login_skin.rs @@ -1,8 +1,8 @@ //! Exercise the actual launcher Lua with Benilla's Lua 5.0 host, without a GPU or credentials. -use benilla_ui::script::UiScript; +use benilla_ui::script::{GlueCall, UiScript}; #[test] fn skin_keeps_manual_login_realm_pin_and_errors_usable() { - let s = UiScript::new_glue().unwrap(); + let mut s = UiScript::new_glue().unwrap(); s.run(r#" local font=CreateFont('GlueFontNormalLarge'); font:SetFont('Fonts\\FRIZQT__.TTF',16) GlueParent=CreateFrame('Frame','GlueParent'); GlueParent:SetWidth(1024); GlueParent:SetHeight(768) @@ -11,6 +11,8 @@ fn skin_keeps_manual_login_realm_pin_and_errors_usable() { AccountLoginAccountEdit=CreateFrame('EditBox','AccountLoginAccountEdit',AccountLoginUI) LanguageDropDown=CreateFrame('Frame','LanguageDropDown',AccountLoginUI) AccountLoginPasswordEdit=CreateFrame('EditBox','AccountLoginPasswordEdit',AccountLoginUI) + AccountLoginExitButton=CreateFrame('Button','AccountLoginExitButton',AccountLoginUI) + AccountLoginExitButton:SetScript('OnClick',function() QuitGame() end) VirtualKeypadFrame=CreateFrame('Frame','VirtualKeypadFrame',AccountLoginUI); VirtualKeypadFrame:Hide() RealmList=CreateFrame('Frame','RealmList',GlueParent); RealmList:Hide() RealmWizard=CreateFrame('Frame','RealmWizard',GlueParent); RealmWizard:Hide() @@ -35,6 +37,12 @@ fn skin_keeps_manual_login_realm_pin_and_errors_usable() { assert!(s.frame_visible("MoonWellLoginStatus")); assert!(!s.frame_visible("AccountLoginAccountEdit")); assert!(!s.frame_visible("LanguageDropDown")); + assert!(s.frame_visible("AccountLoginExitButton")); + s.run("AccountLoginExitButton:Click()").unwrap(); + assert!(matches!( + s.take_glue_calls().as_slice(), + [GlueCall::QuitGame] + )); assert_eq!( s.eval::("return GlueDialogBackground:GetAlpha()") .unwrap(), @@ -44,6 +52,7 @@ fn skin_keeps_manual_login_realm_pin_and_errors_usable() { .unwrap(); assert!(!s.frame_visible("MoonWellLoginStatus")); assert!(s.frame_visible("RealmList")); + assert!(s.frame_visible("AccountLoginExitButton")); assert_eq!( s.eval::("return GlueDialogBackground:GetAlpha()") .unwrap(), @@ -53,12 +62,14 @@ fn skin_keeps_manual_login_realm_pin_and_errors_usable() { .unwrap(); assert!(!s.frame_visible("MoonWellLoginStatus")); assert!(s.frame_visible("VirtualKeypadFrame")); + assert!(s.frame_visible("AccountLoginExitButton")); assert!(s .eval::("return AccountLogin:IsKeyboardEnabled() == 1") .unwrap()); s.run("VirtualKeypadFrame:Hide(); MoonWellLoginPaint(true,false,4)") .unwrap(); assert!(!s.frame_visible("MoonWellLoginStatus")); + assert!(s.frame_visible("AccountLoginExitButton")); assert_eq!( s.eval::("return GlueDialogBackground:GetAlpha()") .unwrap(), -- 2.52.0