Can't SetText for HotKey
I duplicated the slots (ActionButton) from the MainMenuBar by:
Code:
for i = 1, 12 do But when trying to assign text to the HotKey..: Code:
local hotkey = _G["DuplicateActionButton" .. i .. "HotKey"]; ..nothing happens, but the RANGE_INDICATOR disappears for some slots. I can only assign text in this way: Code:
local hotkey2 = duplicateActionButton:CreateFontString(nil, "OVERLAY", "GameFontNormal") But in this case, it will be a simple text with a fixed color without indicating the range. I'm in a bit of a stupor because in the game using the command /run DuplicateActionButton9.HotKey:SetText() - the text is changing, but only for those slots where there is a RANGE_INDICATOR. I've just started learning LUA and WoW API and I don't really have a lot of free time to get into it. If anyone could help me out, that would be great. P.S.: I've tried to be as concise as possible, but if there's anything else I need to provide, let me know. |
This is code I got from the official action button file and incorporated into my own button.
Lua Code:
This is the part of the official code I based it on. https://github.com/Gethe/wow-ui-sour...utton.lua#L453 Hopefully it will help see where you might be going wrong. Because my button isn't based on a Blizzard template ( it doesn't have to be a secure frame ) I had to set up the related Binding information such as a localized global string and a Bindings.xml file set up with the binding key chosen by the player. |
Quote:
|
All times are GMT -6. The time now is 12:32 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI