Thread Tools Display Modes
10-30-22, 06:07 PM   #1
weltensturm
A Defias Bandit
 
weltensturm's Avatar
Join Date: Oct 2022
Posts: 2
Moving castbar spreads taint once player enters Edit Mode

I am writing an addon that tries to incorporate the cast bar into the player frame, and I would like to use the existing blizzard castbar instead of rolling my own. The problem appears when I try to SetPoint it.

It works well enough, but once the player enters Edit Mode, Taint spreads like crazy and at some point after I can't even press spells anymore. I suppose this happens if you SetPoint any of the user editable frames. Resizing works fine, though. Scaling probably not, but scaling children works fine.

I could work around this by just moving the children instead of the top frame, but the castbar is a StatusBar and moving the health texture directly wouldn't work because that would break its functionality.

Is there any way to move it without angering Edit Mode? I would also only move it when it's set to be attached to the player frame.

Here's what it looks like when it works:

  Reply With Quote
10-31-22, 05:43 AM   #2
weltensturm
A Defias Bandit
 
weltensturm's Avatar
Join Date: Oct 2022
Posts: 2
Oh well I figured it out, you just have to reset it to default and tell the edit mode manager that no changes are pending when edit mode opens:

Code:
hooksecurefunc(EditModeManagerFrame, 'EnterEditMode', function()
    PlayerCastingBarFrame:ResetToDefaultPosition()
    EditModeManagerFrame:SetHasActiveChanges(false);
end)
Edit:

It's also necessary to call these on PLAYER_ENTERING_WORLD

Last edited by weltensturm : 10-31-22 at 04:22 PM.
  Reply With Quote
10-31-22, 10:04 AM   #3
hasnogaems
A Flamescale Wyrmkin
 
hasnogaems's Avatar
Join Date: Apr 2016
Posts: 109
Cool looking, nice design.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Moving castbar spreads taint once player enters Edit Mode


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off