/
## Interface: 20400 |
## Interface: 30000 |
## Title: Broker [ItemRack] |
## Author: Tristanian |
## Notes: Minimalistic LDB plugin for the ItemRack addon. |
## X-Embeds: Ace3 |
## X-Category: Miscellaneous |
## SavedVariables: Broker_ItemRackConfig |
## Version: 1.3 |
## Version: 1.4 |
embeds.xml |
LibDataBroker-1.1.lua |
L["Left-Click to change outfit."] = true |
L["Right-Click to open configuration."] = true |
L["Shift-Left Click to toggle ItemRack menu orientation."] = true |
L["Alt-Right Click to enable/disable ItemRack events."] = true |
L["ItemRack events:"] = true |
L["Current menu orientation:"] = true |
L["ON"] = "ON" |
L["OFF"] = "OFF" |
L["VERTICAL"] = "VERTICAL" |
L["HORIZONTAL"] = "HORIZONTAL" |
if event == "VARIABLES_LOADED" then |
if not Broker_ItemRackConfig then |
-- initialize default configuration |
Broker_ItemRackConfig = { |
Broker_ItemRackConfig = { |
MenuOrientation = "VERTICAL" |
} |
end |
if not Broker_ItemRackConfig.EnableEvents then |
Broker_ItemRackConfig.EnableEvents = ItemRackUser.EnableEvents or "ON" |
end |
end |
if ((event == "UNIT_INVENTORY_CHANGED") and (arg1 == "player")) or event == "PLAYER_ENTERING_WORLD" then |
else |
dataobj.icon = "Interface\\Addons\\Broker_ItemRack\\Broker_ItemRack"; |
end |
end |
local function GetTipAnchor(frame) |
GameTooltip:AddLine(HIGHLIGHT_FONT_COLOR_CODE.."Broker ItemRack"..FONT_COLOR_CODE_CLOSE) |
GameTooltip:AddLine(L["Left-Click to change outfit."]) |
GameTooltip:AddLine(L["Right-Click to open configuration."]) |
GameTooltip:AddLine(L["Alt-Right Click to enable/disable ItemRack events."]) |
GameTooltip:AddLine(L["Shift-Left Click to toggle ItemRack menu orientation."]) |
GameTooltip:AddLine(L["Right-Click to open configuration."]) |
GameTooltip:AddLine(" ") |
GameTooltip:AddLine(GREEN_FONT_COLOR_CODE..L["ItemRack events:"]..FONT_COLOR_CODE_CLOSE.." "..NORMAL_FONT_COLOR_CODE..L[Broker_ItemRackConfig.EnableEvents]..FONT_COLOR_CODE_CLOSE) |
GameTooltip:AddLine(GREEN_FONT_COLOR_CODE..L["Current menu orientation:"]..FONT_COLOR_CODE_CLOSE.." "..NORMAL_FONT_COLOR_CODE..L[Broker_ItemRackConfig.MenuOrientation]..FONT_COLOR_CODE_CLOSE) |
GameTooltip:Show() |
dataobj.OnEnter(self) |
return |
end |
if (button == "RightButton") and IsAltKeyDown() then |
-- ensure that our savedvar will always have the correct value |
ItemRack.ToggleEvents() |
if ItemRackUser and ItemRackUser.EnableEvents then |
Broker_ItemRackConfig.EnableEvents = ItemRackUser.EnableEvents |
end |
return |
end |
GameTooltip:Hide() |
end |
ItemRack.ToggleOptions(1); |
end |
end |
end |