WoWInterface SVN FuBar_ItemRackFu

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 1 to Rev 2
    Reverse comparison

Rev 1 → Rev 2

trunk/libs Property changes : Added: svn:externals + AceAddon-2.0 http://svn.wowace.com/wowace/trunk/Ace2/AceAddon-2.0/ AceLibrary http://svn.wowace.com/wowace/trunk/Ace2/AceLibrary/ AceOO-2.0 http://svn.wowace.com/wowace/trunk/Ace2/AceOO-2.0/ Dewdrop-2.0 http://svn.wowace.com/wowace/trunk/DewdropLib/Dewdrop-2.0/ FuBarPlugin-2.0 http://svn.wowace.com/wowace/trunk/FuBarPlugin-2.0/FuBarPlugin-2.0/
trunk/ItemRackFu.lua New file
0,0 → 1,112
ItemRackFu = AceLibrary("AceAddon-2.0"):new("FuBarPlugin-2.0")
local dewdrop = AceLibrary("Dewdrop-2.0")
local IR_UCS, helm, cloak, minimap, events = ItemRack.UpdateCurrentSet, ShowingHelm(), ShowingCloak()
 
ItemRackFu.version = GetAddOnMetadata("Fubar_ItemRackFu", "Version") .. " r" .. ("$Revision: 77659 $"):match("(%d+)")
ItemRackFu.hasIcon = true
ItemRackFu.hasNoColor = true
ItemRackFu.blizzardTooltip = true
ItemRackFu.cannotAttachToMinimap = true
ItemRackFu.cannotDetachTooltip = true
 
local function posthook(...)
ItemRackFu:UpdateText()
return ...
end
 
local function IRFU_UCS(...)
return posthook(IR_UCS(...))
end
 
function ItemRackFu:OnEnable()
if ItemRackSettings.ShowMinimap == "ON" then minimap = true end
if ItemRackUser.EnableEvents == "ON" then events = true end
ItemRack.UpdateCurrentSet = IRFU_UCS
self:Update()
end
 
function ItemRackFu:OnMenuRequest()
dewdrop:AddLine(
"text", "Show helm",
"func", function() helm = not helm ShowHelm(helm) end,
"checked", helm
)
dewdrop:AddLine(
"text", "Show cloak",
"func", function() cloak = not cloak ShowCloak(cloak) end,
"checked", cloak
)
dewdrop:AddLine()
dewdrop:AddLine(
"text", "Show minimap button",
"func", "ToggleMinimap",
"arg1", self,
"checked", minimap
)
dewdrop:AddLine(
"text", "Enable events",
"func", function() events = not events if events then ItemRack.ToggleEvents() else ItemRackUser.EnableEvents = "OFF" ItemRack.RegisterEvents() end end,
"checked", events
)
dewdrop:AddLine(
"text", "Edit sets",
"func", function() ItemRack.ToggleOptions(2) end
)
dewdrop:AddLine()
end
 
function ItemRackFu:ToggleMinimap()
if ItemRackSettings.ShowMinimap == "ON" then
minimap = not minimap
ItemRackSettings.ShowMinimap = "OFF"
ItemRackMinimapFrame:Hide()
else
minimap = not minimap
ItemRackSettings.ShowMinimap = "ON"
ItemRackMinimapFrame:Show()
end
end
 
function ItemRackFu:OnTooltipUpdate()
GameTooltip:AddLine("ItemRack")
GameTooltip:AddLine(" ")
GameTooltip:AddLine("|cffeda55fLeft-Click|r|cff33ff33: Select a set|r")
GameTooltip:AddLine("|cffeda55fAlt-Click|r|cff33ff33: Show hidden sets|r")
GameTooltip:AddLine("|cffeda55fShift-Click|r|cff33ff33: Unequip current set|r")
GameTooltip:AddLine("|cffeda55fRight-Click|r|cff33ff33: Show menu|r")
end
 
function ItemRackFu:OnTextUpdate()
local setname, texture = ItemRackUser.CurrentSet
if setname then
self:SetText(setname)
texture = ItemRackUser.Sets[ItemRackUser.CurrentSet].icon
else
self:SetText("ItemRack")
end
if texture then
self:SetIcon(texture)
else
self:SetIcon()
end
end
 
function ItemRackFu:OnClick()
if IsShiftKeyDown() then
if ItemRackUser.CurrentSet and ItemRackUser.Sets[ItemRackUser.CurrentSet] then
ItemRack.UnequipSet(ItemRackUser.CurrentSet)
return
end
end
if ItemRackMenuFrame:IsVisible() then
ItemRackMenuFrame:Hide()
else
local xpos,ypos = GetCursorPosition()
if ypos>400 then
ItemRack.DockWindows("TOPRIGHT",this,"BOTTOMRIGHT","VERTICAL")
else
ItemRack.DockWindows("BOTTOMRIGHT",this,"TOPRIGHT","VERTICAL")
end
ItemRack.BuildMenu(20)
end
end
\ No newline at end of file
trunk/FuBar_ItemRackFu.toc New file
0,0 → 1,17
## Interface: 20400
 
## Title: FuBar - ItemRack|cff00ff00Fu|r
## Notes: FuBar plugin for ItemRack v2.2+
 
## Version: 1.0
## Author: Gnarfoz
## X-Credits: Kyahx, Imaran
## X-Category: Inventory
 
## Dependencies: FuBar, ItemRack
## OptionalDeps: Ace2, DewdropLib, FuBarPlugin-2.0
## X-Embeds: Ace2, DewdropLib, FuBarPlugin-2.0
## LoadOnDemand: 1
 
embeds.xml
ItemRackFu.lua
\ No newline at end of file
trunk/embeds.xml New file
0,0 → 1,10
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
 
<Script file="libs\AceLibrary\AceLibrary.lua"/>
<Script file="libs\AceOO-2.0\AceOO-2.0.lua"/>
<Script file="libs\AceAddon-2.0\AceAddon-2.0.lua"/>
 
<Script file="libs\Dewdrop-2.0\Dewdrop-2.0.lua"/>
<Script file="libs\FuBarPlugin-2.0\FuBarPlugin-2.0.lua"/>
</Ui>
\ No newline at end of file
trunk/icon.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream