Quantcast
Help : Setpoint in frame - WoWInterface
Thread Tools Display Modes
06-05-20, 09:35 AM   #1
Simba
A Kobold Labourer
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 1
Help : Setpoint in frame

Hello,

I made a simple addon that shows some stats like crit and attack power on a transparent frame.

I'm making a settings window to select which stats to show. Where I'm having issues is to have the stats to show in order, without leaving gaps in between.

For example, my current stats are shown in this order :

AP
Crit
Hit

If I uncheck the Crit box, I have a gap between AP and Hit. How can I make it so that Hit fills the empty space ?

Thanks!
  Reply With Quote
06-05-20, 10:46 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,256
You need to reset the points after the box is checked/unchecked.

Something like:

Code:
CritFrame:Hide()
HitFrame:ClearAllPoints()
HitFrame:SetPoint("TOPLEFT", APFrame, "BOTTOMLEFT")
or
Code:
CritFrame:Show()
HitFrame:ClearAllPoints()
HitFrame:SetPoint("TOPLEFT", CritFrame, "BOTTOMLEFT")
Or you could just set the text of the fontstrings from top to bottom and set the last one(s) blank so you don't have to move anything.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 06-05-20 at 10:50 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help : Setpoint in frame

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