View Single Post
07/28/22, 02:47 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,976
No there isn't, you need to make sure the text is updated before it is used at any control at the UI.
e.g. try to change the constant early before your EVENT_ADD_ON_LOADED.
But it may be that this still is too late as vanilla code lua files always get loaded before your addon files, including your addon files (e.g. via the txt manifest loaded language/Transaltion files) loaded before event_Add_on_loaded.

The text is just read from the constant and then passed to a label control e.g.. The label is not touched if you change the constant!
You need to update the label again via labelControl:SetText(GetString(SI_CONSTANT_HERE)) to make it show the updated text.

So I guess in the end you need to update the label controls at the compass manually via your addon, to show your new text.

Last edited by Baertram : 07/28/22 at 02:52 AM.
  Reply With Quote