Change Log:
2.0.1 (24-02-10)
+ Fixed a minor bug that may cause tainting.
2.0 (29-01-10)
+ Overhaul of the library to make things consistent and run more efficiently.
+ Fixed some tainting issues that may arise.
+ Added the following flags 'name' and 'shorthand'.
+ Removed the 'lockInCombat' and 'sideFrame' flags.
+ The mac shortcut will only be available for mac users now.
+ The messages printed by the library now specifying the library name.
Description:
A library that defines shortcuts for the game user interface.
Shortcuts
character (shorthand: char)
spellbook (shorthand: sb)
talents (shorthand: tal)
achievements (shorthand: achi)
calendar (shorthand: cal)
questlog (shorthand: ql)
social (shorthand: soc)
pvp
lfr
lfd
time
help
video (shorthand: vid)
sound (shorthand: snd)
interface (shorthand: ui)
mac
bindings (shorthand: binds)
macro
Usage
local Shortcuts = LibStub("LibShortcuts-2.0")
Shortcuts:RunShortcut("pvp")
Shortcut Attributes
Each shortcut in the table may contain the following attributes.
name - (string) The name of the frame the shortcut handles.
text - (string) A localized name of the shortcut.
func - (function) A function to execute when the shortcut is triggered.
shorthand - (string) A shorthand for the shortcut. (if one exists.)
The following example will print the localized name for the shortcut.
print(Shortcuts:GetShortcut("pvp").text)
Methods
RunShortcut(name) - Execute a shortcut.
Arguments.
name - (string) The name of the shortcut to execute.
GetShortcut(name) - Gets a table that contains the given shortcut.
Arguments.
name - (string) The name of the shortcut to retrieve.
Returns.
shortcut - (table) The shortcut.
NumOfShortcuts() - Gets the number of shortcuts available.
Returns.
num - (number) The number of shortcuts available.
IterateShortcuts() - Traverse through the shortcuts table.
Arguments.
mode - (string) The mode of which the function may operate to return th... |
|