Quantcast
WoWInterface - View Single Post - Would it be possible to get value of element during table construction?
View Single Post
08-01-16, 02:44 AM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,924
Why not have it default to height if iconSize is absent (nil)?
You can then use a fallback assignment like the following:
Code:
local height = G["castbar"]["player"]["height"];
local size = G["castbar"]["player"]["iconSize"] or height;
castbar:SetHeight(height);
icon:SetSize(size,size);
__________________
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)

Last edited by SDPhantom : 08-01-16 at 02:47 AM.
  Reply With Quote