Thread: 3 Questions
View Single Post
07-26-13, 07:50 PM   #20
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
The reason for this behavior is that Blizzard updates the status texts when CVAR_UPDATE fires. This event does not (always?) fire when using SetCVar, unless you provide a third argument, typically your addon name. You could skip the
Code:
InterfaceOptionsStatusTextPanelDisplayDropDownButton:Click();
DropDownList1Button2:Click();
part and just use SetCVar calls instead:
Code:
SetCVar("statusTextDisplay", "whatever_value_you_need", "HP")
This will trigger TextStatusBar_OnEvent which will call TextStatusBar_UpdateTextString, which will call TextStatusBar_UpdateTextStringWithValues, which will trigger your hook and alter the display.
  Reply With Quote