Compare commits

..

1 Commits

Author SHA1 Message Date
sindoring 1285d15201 Сохранить кнопку выхода при входе через лаунчер
Штатная локализованная 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 выполняется перед слиянием.
2026-11-08 20:50:33 +04:00
5 changed files with 20 additions and 6 deletions
Generated
+1 -1
View File
@@ -4706,7 +4706,7 @@ checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff"
[[package]]
name = "moonwell"
version = "0.3.1"
version = "0.3.2"
dependencies = [
"benilla-app",
"benilla-assets",
+1 -1
View File
@@ -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"
+2 -1
View File
@@ -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
@@ -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
+13 -2
View File
@@ -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::<f64>("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::<f64>("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::<bool>("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::<f64>("return GlueDialogBackground:GetAlpha()")
.unwrap(),