View Single Post
03-16-22, 11:23 AM   #3
muleyo
A Deviate Faerie Dragon
Join Date: Apr 2021
Posts: 12
Originally Posted by SDPhantom View Post
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
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.
  Reply With Quote