mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 03:06:01 +00:00
character: durability % per inventory slot
Adds a Fizzle-style durability label to each character pane slot. Renders at the bottom of the slot icon as "N%" colored by the existing DURABILITY_THRESHOLD_COLORS table (red < orange < yellow < invasion < green), or hidden when the item has no durability stat (necks, rings, trinkets) or the slot is empty. api/api.lua: new pfUI.api.CreateFontString(f, key, layer, size, flags, font) helper following the CreateBackdrop pattern — idempotent get-or-create that attaches the FontString to the parent frame as the named field. Defaults to pfUI.font_default at C.global.font_size with OUTLINE on the OVERLAY layer. skins/blizzard/character.lua: scoreText migrated from the inline "if not frame.scoreText then ..." block to the new helper as a working example; new durabilityText created the same way at BOTTOM/size 10. Durability render added to RefreshCharacterSlot — runs on every PaperDollItemSlotButton_Update so equip/unequip/repair/damage all refresh automatically. api/config.lua + modules/gui.lua: new C.character.inventory.durability toggle (default "1"). GUI lives under a new top-level "Character" tab → "Inventory" sub-tab, leaving room for future "Reputation" / "Skills" sub-tabs at the same level.
This commit is contained in:
@@ -2393,6 +2393,10 @@ pfUI:RegisterModule("gui", function ()
|
||||
end)
|
||||
end
|
||||
|
||||
CreateGUIEntry(T["Character"], T["Inventory"], function()
|
||||
CreateConfig(nil, T["Show Durability"], C.character.inventory, "durability", "checkbox")
|
||||
end)
|
||||
|
||||
CreateGUIEntry(T["Bags & Bank"], nil, function()
|
||||
CreateConfig(nil, T["Disable Item Quality Color For \"Common\" Items"], C.appearance.bags, "borderlimit", "checkbox")
|
||||
CreateConfig(nil, T["Enable Item Quality Color For Equipment Only"], C.appearance.bags, "borderonlygear", "checkbox")
|
||||
|
||||
Reference in New Issue
Block a user