is there away to script a SET function for nameplates
Hello people.
I am working on some modifications to the default Nameplates.
I am using Set veriables to change the scale at this moment.
i usualy play with the small sized blizzard nameplates but i want to have the option to use the large nameplates without having to change the SetCVar("nameplateGlobalScale when i tick the "Use large name plates in the game interface.
is there a way to script so that i dont have "Large nameplates ticked" i use one Set config and if i have it ticked the addon wil then force another set function and if so how would i code that?
Here is what i am using so far..
-- Nameplate rezice
local Frame = CreateFrame("Frame")
Frame:RegisterEvent("PLAYER_LOGIN")
Frame:SetScript("OnEvent", function(...)
SetCVar("nameplateMaxDistance", 45)
SetCVar("nameplateMaxScale", 1.0)
SetCVar("nameplateMinScale", 0.9)
SetCVar("nameplateLargerScale", 1.1)
SetCVar("nameplateGlobalScale", 1.4)
SetCVar("nameplateSelfTopInset",0.62)
SetCVar("nameplateSelfBottomInset",0.32)
end)
-- Hide Realmname in nameplates
hooksecurefunc("CompactUnitFrame_UpdateName", function(frame)
if ShouldShowName(frame) then
if frame.optionTable.colorNameBySelection then
frame.name:SetText(GetUnitName(frame.unit))
end
end
end)
Thanks in advanced /J
|