b1da47c3eb
Etape 3 - Maitre (Trainer.lua, nouveau) : liste de camelot (categories professions-recipe-header, lignes TrainerTextures), filtre, rang de metier lu dans les competences. - Maitre de vol (Taxi.lua, nouveau) : TaxiFrame de camelot 590 x 608, cadre bronze, images de vol 1463 / 1464 (positions reportees du carre 3.3.5), boutons et traits de camelot ; zones BC, Outreterre et Norfendre sur l'image de 3.3.5. - Etable (Stable.lua, nouveau) : scene de camelot, fond selon la specialisation, rangee de 5 centree. - Sertissage (Socketing.lua, nouveau) : decor et chasses de camelot. - Boites de dialogue (Dialogues.lua, nouveau) : StaticPopup1-4 aux contours de camelot (fond sombre, bordure en losanges, croix). - Gabarits : Gb.CadreSimple (repris de la banque de guilde), Gb.MenuFiltre. Etape 4 (metiers, disposition de camelot) - Fabrication (TradeSkill.lua, nouveau) : 673 x 594, liste en arbre, filtre, recherche, rang, fiche (carte du metier, resultat, reactifs), boutons ; noms mesures sur un texte a part (une ligne reutilisee coupait le nom suivant) ; eclat du rang rogne a la largeur du masque. - Micro-bouton Professions (BottomBar.lua) apres la feuille de personnage. - Livre des metiers (ProfessionsBook.lua, nouveau) : cartes de camelot, rangs, sorts securises, oubli ; plus de deux metiers principaux (zone a defilement, colonnes reduites) ; portrait cuit rond ; onglets lateraux (ensemble + metiers a fabrication, retrecis s'ils sont trop nombreux) ; fenetre deplacable (place commune livre / fabrication). - DropDown : liste du filtre des metiers elargie a ses entrees. - Art : feuilles et elements des metiers, icones d'onglets cuites (cuire_masque.py), portrait rond (cuire_portrait.py, nouveau). - Banc : essais des etapes 3 et 4 ; micro-menu a neuf boutons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
106 lines
4.2 KiB
Lua
106 lines
4.2 KiB
Lua
-- ForeverUI : les boites de confirmation du jeu (StaticPopup1 a 4), aux
|
|
-- contours de camelot (demande de l'utilisateur du 2026-09-28, a la
|
|
-- confirmation d'un remplacement de sertissage ; regle de l'atelier : tous
|
|
-- les dialogues a la DA de camelot).
|
|
--
|
|
-- RELEVE -- CAMELOT (blizzard_staticpopup_game/gamedialog.xml, gamedialog.lua
|
|
-- et mainline/gamedialog.lua) :
|
|
-- StaticPopupBaseTemplate cadre BG sur toute la boite : BG.Top =
|
|
-- GameDialogBackgroundTop (UI-DiamondDialogBox-
|
|
-- Border, variante c60, decoupe en neuf 32 / 32 /
|
|
-- 32 / 32) sur toute la boite ; BG.Bottom = UI-
|
|
-- DialogBox-Background-Dark (mosaique) de (7, -7)
|
|
-- a (-7, 7), sous la bordure
|
|
-- la croix UIPanelCloseButton a TOPRIGHT (-3, -3) :
|
|
-- RedButton-Exit / -exit-pressed, ou RedButton-
|
|
-- MiniCondense / -pressed pour une boite qui se
|
|
-- cache (SetCloseButtonToMinimize)
|
|
-- les boutons StaticPopupButtonTemplate, UI-DialogBox-Button-*
|
|
-- : les memes images qu'en 3.3.5
|
|
--
|
|
-- RELEVE -- 3.3.5 (FrameXML/StaticPopup.xml et .lua) : StaticPopupTemplate
|
|
-- 320 x 72, Backdrop UI-DialogBox-Background / UI-DialogBox-Border (marges
|
|
-- 11, 12, 12, 11) ; croix UIPanelCloseButton a (-3, -3), dont StaticPopup_Show
|
|
-- repose les images a chaque ouverture (UI-Panel-HideButton si
|
|
-- closeButtonIsHide, UI-Panel-MinimizeButton sinon).
|
|
--
|
|
-- CE QUI DIFFERE, ET POURQUOI.
|
|
-- * Seuls les contours changent : le Backdrop est retire, le fond sombre et
|
|
-- la bordure de camelot prennent sa place. La taille, la mise en page,
|
|
-- les textes et les boutons restent ceux du client, qui decide de tout.
|
|
-- * La croix est rhabillee APRES StaticPopup_Show, qui repose les siennes.
|
|
-- * Les quatre boites servent a toutes les confirmations du jeu : toutes
|
|
-- prennent ces contours.
|
|
|
|
local ForeverUI = ForeverUI or {}
|
|
_G.ForeverUI = ForeverUI
|
|
|
|
local Gb = ForeverUI.Gabarits
|
|
|
|
local D = {}
|
|
ForeverUI.Dialogues = D
|
|
|
|
local N = { fond = 7, croix = { -3, -3 }, boites = 4 }
|
|
|
|
-- l'image d'un etat de la croix, a la taille du bouton
|
|
local function etatCroix(b, poser, lire, atlas)
|
|
local e = ForeverUI.AtlasEntry(atlas)
|
|
if not e then return end
|
|
b[poser](b, e[1])
|
|
local t = b[lire](b)
|
|
t:SetTexCoord(e[2], e[3], e[4], e[5])
|
|
t:ClearAllPoints()
|
|
t:SetAllPoints(b)
|
|
end
|
|
|
|
-- la croix de camelot, selon la boite (apres StaticPopup_Show)
|
|
function D.Croix(f)
|
|
local b = _G[f:GetName() .. "CloseButton"]
|
|
if not b or not b:IsShown() then return end
|
|
local info = f.which and StaticPopupDialogs[f.which]
|
|
if info and info.closeButtonIsHide then
|
|
etatCroix(b, "SetNormalTexture", "GetNormalTexture", "redbutton-minicondense")
|
|
etatCroix(b, "SetPushedTexture", "GetPushedTexture", "redbutton-minicondense-pressed")
|
|
else
|
|
etatCroix(b, "SetNormalTexture", "GetNormalTexture", "redbutton-exit")
|
|
etatCroix(b, "SetPushedTexture", "GetPushedTexture", "redbutton-exit-pressed")
|
|
end
|
|
end
|
|
|
|
function D.Habiller(f)
|
|
if not f or f.foreverHabit then return end
|
|
f:SetBackdrop(nil)
|
|
-- BG.Bottom : le fond sombre, en mosaique, a 7 du bord
|
|
local fond = f:CreateTexture(nil, "BACKGROUND")
|
|
local e = ForeverUI.AtlasEntry("ui-dialogbox-background-dark")
|
|
fond:SetTexture(e[1], true)
|
|
if fond.SetHorizTile then
|
|
fond:SetHorizTile(true)
|
|
fond:SetVertTile(true)
|
|
end
|
|
fond:SetPoint("TOPLEFT", f, "TOPLEFT", N.fond, -N.fond)
|
|
fond:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -N.fond, N.fond)
|
|
-- BG.Top : la bordure, decoupee en neuf, sur toute la boite
|
|
local bord = Gb.AtlasEtire(f, "ui-diamonddialogbox-border", "BORDER")
|
|
bord.rect:SetAllPoints(f)
|
|
-- la croix : celle de camelot, a sa place
|
|
local croix = _G[f:GetName() .. "CloseButton"]
|
|
if croix then
|
|
Gb.Croix(croix, f)
|
|
croix:ClearAllPoints()
|
|
croix:SetPoint("TOPRIGHT", f, "TOPRIGHT", N.croix[1], N.croix[2])
|
|
end
|
|
f.foreverHabit = { fond = fond, bord = bord, croix = croix }
|
|
end
|
|
|
|
for i = 1, N.boites do
|
|
D.Habiller(_G["StaticPopup" .. i])
|
|
end
|
|
|
|
hooksecurefunc("StaticPopup_Show", function()
|
|
for i = 1, N.boites do
|
|
local f = _G["StaticPopup" .. i]
|
|
if f and f:IsShown() then D.Croix(f) end
|
|
end
|
|
end)
|