mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 15:46:56 +00:00
Raid Pets and Optimized Chat Bubble Styling
commit f19d7402810637fc32460864104cb792ac5af863 Author: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed Jul 22 01:05:52 2026 -0500 remove comment commit 60f4968f06d19d42bdc6347f98ff4d5a34785e97 Author: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed Jul 22 01:05:06 2026 -0500 Bump ClassicAPI minimum version to 10705 Update the minimum required ClassicAPI version from 10704 (1.7.4) to 10705 (1.7.5). commit 088dba4c23f4aa7ce98b9ce9d75bc5892cd40520 Author: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed Jul 22 01:04:04 2026 -0500 Add raid-pet frames: an independent, roster-driven pet grid New "raidpet" unitframe type that shows raid members' pets (raidpet1..40) in their own movable block (pfRaidPetCluster), off by default. It's a flat pool of frames laid out by pfUI.uf.raid:LayoutPets straight from the raid roster -- cell N shows raidpet<N> -- so it's fully decoupled from how the raid grid arranges its own slots. Layout is independent of the raid grid: raidpet carries its own width/height plus a Layout section (raidlayout / raidpadding / raidfill), and its own Collapse Empty Slots toggle that packs only the pets that exist into the leading cells. The raid grid gets the same collapse option (sequential slot assignment in AddUnitToGroup instead of by subgroup). Collapsed pets re-pack on roster changes and on UNIT_PET so summons and dismisses track live without polling. Also: - unitframes: a "raidpet" branch in UpdateVisibility (hide when the pet is out of range or its raid<N> owner is gone), and fix cache_raid so the "pfRaid" prefix check doesn't misread pfRaidPet<n> frames (char 7 is non-numeric -> nil compare crash). - New "Owner Name" text option: on any pet frame (raidpet/partypet/pet) it shows the owner's class-colored name so you can tell whose pet it is. - unlock: a pfRaidPet drag cluster, a numeric-suffix guard so pfRaid no longer matches (and crashes on) pet frames, and RaidPet config mappings. - config/gui/translations for all of the above. commit 52f02c8963fe7ec90f36100ebe069c7807529301 Author: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon Jul 20 23:09:06 2026 -0500 Enumerate chat bubbles via ClassicAPI instead of scanning WorldFrame ClassicAPI's C_ChatBubbles.GetAllChatBubbles() walks the engine's own bubble list and returns the exact set of live bubble frames, with real GetRegions(), so the decoration idiom works unchanged. Replace the WorldFrame:GetChildren() sweep and drop the IsBubble heuristic (unnamed frame whose first region is the ChatBubble-Background texture) -- the API only ever hands back bubbles, so that guess is both redundant and more fragile than the engine list. Cheaper too: it iterates only live bubbles rather than every world child on each chat event.
This commit is contained in:
+2
-9
@@ -17,12 +17,6 @@ pfUI:RegisterModule("bubbles", function ()
|
||||
RunNextFrame(function() pfUI.bubbles:ScanBubbles() end)
|
||||
end)
|
||||
|
||||
function pfUI.bubbles:IsBubble(f)
|
||||
if f:GetName() then return end
|
||||
if not f:GetRegions() then return end
|
||||
return f:GetRegions().GetTexture and f:GetRegions():GetTexture() == "Interface\\Tooltips\\ChatBubble-Background"
|
||||
end
|
||||
|
||||
function pfUI.bubbles:ProcessBubble(f)
|
||||
f.text:Hide()
|
||||
f.text:SetFont(pfUI.font_default, tonumber(C.global.font_size) * UIParent:GetScale(), "OUTLINE")
|
||||
@@ -34,9 +28,8 @@ pfUI:RegisterModule("bubbles", function ()
|
||||
end
|
||||
|
||||
function pfUI.bubbles:ScanBubbles()
|
||||
local childs = { WorldFrame:GetChildren() }
|
||||
for _, f in pairs(childs) do
|
||||
if not f.frame and pfUI.bubbles:IsBubble(f) then
|
||||
for _, f in ipairs(C_ChatBubbles.GetAllChatBubbles()) do
|
||||
if not f.frame then
|
||||
local textures = {f:GetRegions()}
|
||||
for _, object in pairs(textures) do
|
||||
if object:GetObjectType() == "Texture" then
|
||||
|
||||
Reference in New Issue
Block a user