View Single Post
03-16-22, 02:08 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
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:
  1. InterfaceOptionsNamesPanelUnitNameplatesMakeLarger.setFunc=nop;--   Overwrite with Blizzard-provided NoOp function
  2. InterfaceOptionsNamesPanelUnitNameplatesMakeLarger.value="0";--     Set our own value to unchecked (see custom :GetValue())
  3. BlizzardOptionsPanel_CheckButton_Disable(InterfaceOptionsNamesPanelUnitNameplatesMakeLarger);-- Disable button
__________________
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)
  Reply With Quote