Quantcast
WoWInterface - View Single Post - Setting a CVar doesn't work when including it in an addon
View Single Post
10-19-20, 06:36 AM   #7
Kenjub
A Deviate Faerie Dragon
Join Date: Jul 2018
Posts: 15
Originally Posted by sezz View Post
Looks like you can set those cvars in the config somewhere (I don't use KUI nameplates, just had a quick look at the code):

SetCVar('nameplateSelfTopInset',core.profile.cvar_self_clamp_top) is called "Self clamp top"
SetCVar('nameplateSelfAlpha',core.profile.cvar_self_alpha) is called "Self alpha"

The personal resource bar is just a nameplate, most nameplate cvars apply to it aswell, doesn't matter if you disable personal resource bar modifications in KUI nameplates.
I actually tried disabling KUI to see if it's related to KUI and it isn't, so your solution doesn't seem viable

Originally Posted by Tim View Post
Code:
local EventFrame = CreateFrame("Frame")
EventFrame:RegisterEvent("VARIABLES_LOADED")
EventFrame:SetScript("OnEvent", function(_, event)

   SetCVar ("nameplateSelfTopInset", .55)
   SetCVar("nameplateSelfAlpha", 1)

end)
Thanks for taking the effort but it doesn't seem to work any other ideas you might have?
  Reply With Quote