fc364f4693
A patch-F.MPQ source for benilla: the player's stock FrameXML.toc with one row appended, the chooser shown at the first world entry while the moonwellUIStyle CVar is unset, and an Interface Style rung in the game menu that reopens it. Forever UI is a stub that announces itself. Verified with benilla's addon harness (clean load, choose/finish/reopen flow), capture renders of the chooser and the game menu, and a live client: the forever style reloads the UI, persists across a restart and switches back to classic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.3 KiB
Lua
30 lines
1.3 KiB
Lua
-- The game menu's "Interface Style" rung, under Macros, which reopens the chooser. Added at
|
|
-- VARIABLES_LOADED, after benilla's layer has laid out GameMenuFrame, and kept clear of its
|
|
-- layout: it takes Macros' rung gap and Logout keeps the gap it had above it.
|
|
|
|
local function MoonWellUIGameMenu_AddRung()
|
|
if MoonWellUIGameMenuButtonStyle then
|
|
return
|
|
end
|
|
local button = CreateFrame("Button", "MoonWellUIGameMenuButtonStyle", GameMenuFrame,
|
|
"GameMenuButtonTemplate")
|
|
button:SetText(MOONWELLUI_TEXT.MENU_BUTTON)
|
|
local _, _, _, _, rungGap = GameMenuButtonMacros:GetPoint(1)
|
|
local _, _, _, logoutX, logoutGap = GameMenuButtonLogout:GetPoint(1)
|
|
button:SetPoint("TOP", GameMenuButtonMacros, "BOTTOM", 0, rungGap or -1)
|
|
GameMenuButtonLogout:ClearAllPoints()
|
|
GameMenuButtonLogout:SetPoint("TOP", button, "BOTTOM", logoutX or 0, logoutGap or -1)
|
|
GameMenuFrame:SetHeight(GameMenuFrame:GetHeight() + button:GetHeight() - (rungGap or -1))
|
|
button:SetScript("OnClick", function()
|
|
PlaySound("igMainMenuOption")
|
|
HideUIPanel(GameMenuFrame)
|
|
MoonWellUIChoice_Open()
|
|
end)
|
|
end
|
|
|
|
local MoonWellUIGameMenu_Loader = CreateFrame("Frame")
|
|
MoonWellUIGameMenu_Loader:RegisterEvent("VARIABLES_LOADED")
|
|
MoonWellUIGameMenu_Loader:SetScript("OnEvent", function()
|
|
MoonWellUIGameMenu_AddRung()
|
|
end)
|