WoW:API GetBindingText

From AddOn Studio
Revision as of 19:12, 27 November 2005 by WoWWiki>Aalnydara (details for GetBindingText)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
GetBindingText

Returns the (localized?) string value for the given key and prefix. Essentially a glorified getglobal() function.


Arguments
(String key, String prefix)
key
The name of the key (e.g. UP, SHIFT-PAGEDOWN)
prefix
The prefix of the variable name you're looking for. Usually "KEY_" or "BINDING_NAME_".

Returns
value
value
(string) The (localized?) value of the global variable composed of the prefix and key name you specified. For example, "UP" and "KEY_" would return the value of the global variable KEY_UP which is "Up Arrow" in the english locale. If the global variable doesn't exist for the combination specified, it appears to just return the key name you specified.

Example
val = GetBindingText("UP", "KEY_");
-- val is "Up Arrow"

Template:WoW API