WoWInterface SVN Aloft

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/cataclysm/Aloft/AloftFu
    from Rev 1888 to Rev 1928
    Reverse comparison

Rev 1888 → Rev 1928

AloftFu.lua
21,6 → 21,7
return
end
if not LibStub:GetLibrary("LibFuBarPlugin-3.0", true) then DEFAULT_CHAT_FRAME:AddMessage("Aloft: no LibFuBarPlugin-3.0") return end
-- if not LibStub:GetLibrary("AceGUI-3.0", true) then return end
if not LibStub:GetLibrary("AceConfigDialog-3.0", true) then return end
if not LibStub:GetLibrary("AceDB-3.0", true) then return end
 
29,11 → 30,13
local AloftFu = Aloft:NewModule("Fu", Aloft, "AceEvent-3.0", "AceHook-3.0", "AceTimer-3.0", "LibFuBarPlugin-3.0")
AloftFu.dynamic = "AloftFu"
 
-- local AceGUI = LibStub("AceGUI-3.0")
local AceDialog = LibStub("AceConfigDialog-3.0")
local AceDB = LibStub("AceDB-3.0")
 
-- local dewdrop = AceLibrary:HasInstance("Dewdrop-2.0") and AceLibrary("Dewdrop-2.0")
 
-- local F = AceGUI:Create("Frame")
local N = L["Aloft"] .. "-" .. Aloft.version
 
-----------------------------------------------------------------------------
62,12 → 65,15
-- separate options database
self:SetFuBarOption("iconPath", "Interface\\Icons\\Spell_Frost_Wisp")
self:SetFuBarOption("tooltipType", "GameTooltip")
self:SetFuBarOption("configType", "AceConfigDialog-3.0")
self:SetFuBarOption("aceConfig30", N)
self:SetFuBarOption("configType", "None") -- configType needs to be "None", in order to get RightButtonUp semantices to work correctly with AceConfigDialog-3.0
self:SetFuBarOption("cannotDetachTooltip", true)
self:SetFuBarOption("hideWithoutStandby", true)
self:SetFuBarOption("hasNoColor", true)
 
-- these are not necessary, should be "None"
-- self:SetFuBarOption("configType", "AceConfigDialog-3.0")
-- self:SetFuBarOption("aceConfig30", N)
 
if self.db ~= Aloft.AloftDB:GetNamespace(self.namespace, true) then self.db = Aloft.AloftDB:RegisterNamespace(self.namespace, self.defaults) end
-- if not self.db then self.db = AceDB:New("AloftFuDB", nil, "Default") end
 
103,7 → 109,7
 
-----------------------------------------------------------------------------
 
-- TODO: this is not really generic... AceConfigDialog does not provide a way to determine if an application's dialog is open
-- TODO: this is kludgy... but AceConfigDialog does not provide a way to determine if an application's dialog is open; IceHUD does it exactly the same way (basically)
local function isDialogOpen(appName)
return AceDialog.OpenFrames[appName]
end
140,6 → 146,7
end
 
function AloftFu:OnFuBarClick(button)
-- ChatFrame7:AddMessage("AloftFu:OnFuBarClick(): " .. tostring(button))
if button == "LeftButton" and not IsControlKeyDown() and not IsAltKeyDown() then
if not IsShiftKeyDown() then
AceDialog:Close(N)
165,6 → 172,7
end
elseif button == "RightButton" and not IsShiftKeyDown() and not IsControlKeyDown() and not IsAltKeyDown() then
GameTooltip:Hide()
-- ChatFrame7:AddMessage("AloftFu:OnFuBarClick(): " .. tostring(N))
if isDialogOpen(N) then
AceDialog:Close(N)
else