Originally Posted by SDPhantom
InterfaceOptionsLargerNamePlate_OnLoad() just sets up those functions to run when you click on the button. :setFunc() gets called by InterfaceOptionsPanel_CheckButton_Update() through InterfaceOptionsPanel_CheckButton_OnClick(). This is also called from InterfaceOptionsPanel_CancelControl() under certain circumstances.
The easiest method would be to nuke :setFunc(). I would also advise disabling the button if this is to be in a published addon.
Lua Code:
InterfaceOptionsNamesPanelUnitNameplatesMakeLarger.setFunc=nop;-- Overwrite with Blizzard-provided NoOp function InterfaceOptionsNamesPanelUnitNameplatesMakeLarger.value="0";-- Set our own value to unchecked (see custom :GetValue()) BlizzardOptionsPanel_CheckButton_Disable(InterfaceOptionsNamesPanelUnitNameplatesMakeLarger);-- Disable button
|
Thank you! That resolved it.
The addon is just for private use and just working with CVars n stuff, just to make sure that every single character has the same settings etc.