Quantcast
nameplate classificationIndicator; - WoWInterface
Thread Tools Display Modes
09-07-21, 04:02 AM   #1
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
nameplate classificationIndicator;

Hello,

usually the elite/rare icon indicator will show up on the left side for the default blizzard nameplates.

I want it to show up to the right which is working fine but when I select the nameplate (scales up) then the icon will make a small jump at the wrong direction(left).

Found this part that does prevent the icon scaling but nothing related to it's position.

Heres what I've tried:

Code:
 hooksecurefunc("DefaultCompactNamePlateFrameSetupInternal", function(frame)
    frame.classificationIndicator:ClearAllPoints();
    frame.classificationIndicator:SetPoint("RIGHT", 100, 0)
end)
Blizzard Code here and here.

Example (default) here

Example issue with my code here.

As always I really appreciate any help

Last edited by rulezyx : 09-17-21 at 05:32 PM. Reason: links, screens
  Reply With Quote
09-17-21, 06:06 PM   #2
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Seems that not only the classification indicator but targetmarkers and similar symbols that are part of the nameplate textures are in correlation with the default anchor at the left side which will always move the icons to the left when the nameplate scales up/is selected.

I still couldn't find any solution for this issue yet.

Last edited by rulezyx : 09-17-21 at 06:11 PM. Reason: link
  Reply With Quote
09-18-21, 04:06 AM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,050
You're setting the right-side anchor to the right point on the nameplate, then applying an offset. When you scale up, naturally, the texture will start overlapping the nameplate again. What you need to do is set the left anchor of the texture instead to the right point on the nameplate.

I would also hook NamePlateDriverFrame at the point when it creates the unitframes. Less chance of affecting other parts of the UI.

Lua Code:
  1. hooksecurefunc(NamePlateDriverFrame,"AcquireUnitFrame",function(base)
  2.     if base:IsForbidden() then return; end--    Prevent modding forbidden frames (accessing these throws errors)
  3.  
  4.     local unitframe=base.UnitFrame;--   Set by original function
  5.     unitframe.ClassificationFrame:ClearAllPoints();
  6.     unitframe.ClassificationFrame:SetPoint("LEFT",unitframe.healthBar,"RIGHT");
  7. end);
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
09-18-21, 06:13 AM   #4
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Thank you so much for your code and the good explanation.

Code:
hooksecurefunc(NamePlateDriverFrame,"AcquireUnitFrame",function(base)
    if base:IsForbidden() then return; end--    Prevent modding forbidden frames (accessing these throws errors)
 
    local unitframe=base.UnitFrame;--   Set by original function
    unitframe.ClassificationFrame:ClearAllPoints();
    unitframe.ClassificationFrame:SetPoint("LEFT",unitframe.healthBar,"RIGHT");
    unitframe.RaidTargetFrame:ClearAllPoints();
    unitframe.RaidTargetFrame:SetPoint("LEFT",unitframe.healthBar,"RIGHT", 14, 0);
end);
Did the same thing with the targetmarkers and its working without any issues.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » nameplate classificationIndicator;

Thread Tools
Display Modes

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