WoWInterface SVN BrokerRaidSave

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 26 to Rev 27
    Reverse comparison

Rev 26 → Rev 27

trunk/Broker_RaidSave/locale/locale-deDE.lua
7,7 → 7,7
--L["Show text for no saved instances"] = true
--L["Show the plugin text instead of number, when the character has no saved instances."] = true
L["Short text"] = "Kurzer Text"
--L["Only show the number of saved instances, in the format [Active]:[Expired]."] = true
--L["Only show the number of saved instances, in the format [Group]:[Raid]:[Expired]."] = true
L["Instance Information"] = "Instanzinformation"
L["Show instance IDs"] = "Zeige Instanzen IDs"
L["Show or hide the numeric instance IDs."] = "Zeige oder Verberge die numerischen Instanzen IDs."
64,5 → 64,15
-- 1.8 strings
--L["Hide expired instances from plugin text"] = true
--L["Don't display instances with expired ID's on the plugin text."] = true
--L["Active: "] = true
--L["Expired: "] = true
\ No newline at end of file +L["Expired: "] = "Abgelaufen: " + +-- 2.0 strings +--L["|cffeda55fLeft Click|r |cff19ff19on instance name to toggle ID extension."] = true +--L["|cffeda55fShift+Left Click|r |cff19ff19to paste instance info into chat."] = true +--L["|cff0090ffBlue|r |cff19ff19colored instance names, indicate|r |cff0090ffextended|r |cff19ff19IDs.|r"] = true +--L["Hide hint text"] = true +--L["Hides the tooltip information/hint text."] = true +--L["Enable scrolling"] = true +--L["Activates and displays a scrolling slider bar, for the tooltip."] = true +--L["Tooltip Maximum Height"] = true +--L["Sets the tooltip maximum height, after which it will be scrollable."] = true \ No newline at end of file
trunk/Broker_RaidSave/locale/locale-koKR.lua
4,10 → 4,10
L["(Updating...)"] = "(업데이트중...)"
L["Minimalistic LDB plugin that allows tracking of raid IDs across characters."] = "LDB창에 캐릭터별 귀속 던전 정보를 표시합니다."
L["General Options"] = "일반 설정"
--L["Show text for no saved instances"] = true
--L["Show the plugin text instead of number, when the character has no saved instances."] = true
L["Show text for no saved instances"] = "귀속된 던전 없음에 대한 문구 표시"
L["Show the plugin text instead of number, when the character has no saved instances."] = "귀속된 던전이 없는 캐릭터라면, 숫자 대신 플러그인 문구를 표시합니다."
L["Short text"] = "약식 표시"
--L["Only show the number of saved instances, in the format [Active]:[Expired]."] = true
--L["Only show the number of saved instances, in the format [Group]:[Raid]:[Expired]."] = true
L["Instance Information"] = "던전 정보"
L["Show instance IDs"] = "던전 ID 표시"
L["Show or hide the numeric instance IDs."] = "귀속된 던전 ID를 표시 또는 숨깁니다."
56,13 → 56,23
 
-- 1.7 strings
L["Expired"] = "만료됨"
--L["Hide expired instances from tooltip"] = true
L["Hide expired instances from tooltip"] = "툴팁에서 만료된 던전 숨김"
L["Don't display instances with expired ID's on the tooltip."] = "툴팁에 만료된 ID와 함께 던전을 표시하지 않습니다."
L["|cffeda55fLeft Click|r |cff19ff19on plugin to toggle Blizzard's Raid Information frame."] = "|cffeda55f좌-클릭|r |cff19ff19플러그인에 대한 블리자드 공격대 정보 창 표시/표시안함."
L["|cffeda55fRight Click|r |cff19ff19on plugin to open Configuration Menu."] = "|cffeda55f우-클릭|r |cff19ff19플러그인에 대한 설정 메뉴 열기."
 
-- 1.8 strings
--L["Hide expired instances from plugin text"] = true
--L["Don't display instances with expired ID's on the plugin text."] = true
--L["Active: "] = true
--L["Expired: "] = true
\ No newline at end of file +L["Hide expired instances from plugin text"] = "플러그인 문구에서 만료된 던전 숨김" +L["Don't display instances with expired ID's on the plugin text."] = "플러그인 문구 상 만료된 ID와 던전을 표시하지 않습니다." +L["Expired: "] = "만료: " + +-- 2.0 strings +--L["|cffeda55fLeft Click|r |cff19ff19on instance name to toggle ID extension."] = true +--L["|cffeda55fShift+Left Click|r |cff19ff19to paste instance info into chat."] = true +--L["|cff0090ffBlue|r |cff19ff19colored instance names, indicate|r |cff0090ffextended|r |cff19ff19IDs.|r"] = true +--L["Hide hint text"] = true +--L["Hides the tooltip information/hint text."] = true +--L["Enable scrolling"] = true +--L["Activates and displays a scrolling slider bar, for the tooltip."] = true +--L["Tooltip Maximum Height"] = true +--L["Sets the tooltip maximum height, after which it will be scrollable."] = true \ No newline at end of file
trunk/Broker_RaidSave/locale/locale-enUS.lua
6,7 → 6,7
L["Show text for no saved instances"] = true
L["Show the plugin text instead of number, when the character has no saved instances."] = true
L["Short text"] = true
L["Only show the number of saved instances, in the format [Active]:[Expired]."] = true
L["Only show the number of saved instances, in the format [Group]:[Raid]:[Expired]."] = true
L["Instance Information"] = true
L["Show instance IDs"] = true
L["Show or hide the numeric instance IDs."] = true
63,5 → 63,15
-- 1.8 strings
L["Hide expired instances from plugin text"] = true
L["Don't display instances with expired ID's on the plugin text."] = true
L["Active: "] = true
L["Expired: "] = true
\ No newline at end of file +L["Expired: "] = true + +-- 2.0 strings +L["|cffeda55fLeft Click|r |cff19ff19on instance name to toggle ID extension."] = true +L["|cffeda55fShift+Left Click|r |cff19ff19to paste instance info into chat."] = true +L["|cff0090ffBlue|r |cff19ff19colored instance names, indicate|r |cff0090ffextended|r |cff19ff19IDs.|r"] = true +L["Hide hint text"] = true +L["Hides the tooltip information/hint text."] = true +L["Enable scrolling"] = true +L["Activates and displays a scrolling slider bar, for the tooltip."] = true +L["Tooltip Maximum Height"] = true +L["Sets the tooltip maximum height, after which it will be scrollable."] = true \ No newline at end of file
trunk/Broker_RaidSave/locale/locale-zhTW.lua
7,7 → 7,7
--L["Show text for no saved instances"] = true
--L["Show the plugin text instead of number, when the character has no saved instances."] = true
L["Short text"] = "簡短文字"
--L["Only show the number of saved instances, in the format [Active]:[Expired]."] = true
--L["Only show the number of saved instances, in the format [Group]:[Raid]:[Expired]."] = true
L["Instance Information"] = "副本進度資訊"
L["Show instance IDs"] = "顯示副本進度ID"
L["Show or hide the numeric instance IDs."] = "顯示或隱藏副本進度的ID數字"
64,5 → 64,15
-- 1.8 strings
--L["Hide expired instances from plugin text"] = true
--L["Don't display instances with expired ID's on the plugin text."] = true
--L["Active: "] = true
--L["Expired: "] = true
\ No newline at end of file +--L["Expired: "] = true + +-- 2.0 strings +--L["|cffeda55fLeft Click|r |cff19ff19on instance name to toggle ID extension."] = true +--L["|cffeda55fShift+Left Click|r |cff19ff19to paste instance info into chat."] = true +--L["|cff0090ffBlue|r |cff19ff19colored instance names, indicate|r |cff0090ffextended|r |cff19ff19IDs.|r"] = true +--L["Hide hint text"] = true +--L["Hides the tooltip information/hint text."] = true +--L["Enable scrolling"] = true +--L["Activates and displays a scrolling slider bar, for the tooltip."] = true +--L["Tooltip Maximum Height"] = true +--L["Sets the tooltip maximum height, after which it will be scrollable."] = true \ No newline at end of file
trunk/Broker_RaidSave/Broker_RaidSave.lua
22,7 → 22,11
 
-- locals
local _G = getfenv(0)
local headings = {}
local tt = nil
local totaltime = 0
local returnarg = {}
 
-- Helper funcs
local function RemoveColorCode(label)
if not label then return end
43,6 → 47,48
return normalized
end
 
local function hidett(self, elapsed)
totaltime = totaltime + elapsed
if totaltime > 0.2 then
totaltime = 0
if tt and not MouseIsOver(tt) then
tt:SetScript("OnEnter", nil)
tt:SetScript("OnLeave", nil)
tooltip:Release(tt)
tt = nil
BRRaidSave:SetScript("OnUpdate", nil)
elseif not tt then
BRRaidSave:SetScript("OnUpdate", nil)
end
end
end
 
local function ClickHandlerFunc(cell, arg1, button)
-- Obligatory sanity checks
if not arg1 or type(arg1)~= "table" then return end
if not arg1[1] or not arg1[2] or not arg1[3] or not arg1[4] or arg1[5] == nil then return end
 
-- Handlers
if button == "LeftButton" and not IsShiftKeyDown() then
local iindex, instanceID, numofsaved = nil, nil, GetNumSavedInstances()
for i = 1, numofsaved do
instanceID = select(2, GetSavedInstanceInfo(i))
if instanceID == arg1[3] then iindex = i break end
end
if iindex and arg1[5] == false then
SetSavedInstanceExtend(iindex, true)
elseif iindex and arg1[5] == true then
SetSavedInstanceExtend(iindex, false)
end
RequestRaidInfo() -- trigger update
elseif button == "LeftButton" and IsShiftKeyDown() then
if ChatFrameEditBox:IsVisible() then
local reportlabel = L["Instance"]..": "..RemoveColorCode(arg1[1])..", "..L["Difficulty"]..": "..RemoveColorCode(arg1[2])..", "..L["ID"]..": "..RemoveColorCode(arg1[3])..", "..L["Expires"]..": "..RemoveColorCode(arg1[4])
ChatFrameEditBox:Insert(reportlabel)
end
end
end
 
-- Ace config table
local options = {
name = "Broker RaidSave",
78,18 → 124,26
shortText = {
type = 'toggle', width = "full",
name = L["Short text"],
desc = L["Only show the number of saved instances, in the format [Active]:[Expired]."],
desc = L["Only show the number of saved instances, in the format [Group]:[Raid]:[Expired]."],
order = 6,
get = function() return Broker_RaidSaveConfig.shorttext end,
set = function(_,v) Broker_RaidSaveConfig.shorttext = v
BRRaidSave:Update()
end,
},
},
hidehint = {
order = 7, type = "toggle", width = "full",
name = L["Hide hint text"],
desc = L["Hides the tooltip information/hint text."],
get = function() return Broker_RaidSaveConfig.HideHint end,
set = function(_,v) Broker_RaidSaveConfig.HideHint = v
end,
},
sortinstancesbyname = {
type = 'toggle',
name = L["Sort by name"],
desc = L["Sorts the instances on the tooltip, using the name of the instance as a reference."],
order = 7,
order = 8,
get = function() return Broker_RaidSaveConfig.sortbyinstancename end,
set = function(_,v)
Broker_RaidSaveConfig.sortbyinstancediff = false
97,7 → 151,7
end,
},
instancesnameorder = {
order = 8, type = "select",
order = 9, type = "select",
name = L["List Ordering"],
desc = L["Order style for the saved instances list."],
get = function() return Broker_RaidSaveConfig.instancenameorder end,
111,15 → 165,16
type = 'toggle',
name = L["Sort by difficulty"],
desc = L["Sorts the instances on the tooltip, using the instance difficulty as a reference."],
order = 9,
order = 10,
get = function() return Broker_RaidSaveConfig.sortbyinstancediff end,
set = function(_,v)
Broker_RaidSaveConfig.sortbyinstancename = false
Broker_RaidSaveConfig.sortbyinstancediff = v
end,
disabled = function() return not Broker_RaidSaveConfig.showdiff end,
},
instancesdifforder = {
order = 10, type = "select",
order = 11, type = "select",
name = L["List Ordering"],
desc = L["Order style for the saved instances list."],
get = function() return Broker_RaidSaveConfig.instancedifforder end,
129,19 → 184,39
["desc"] = L["Descending"]
},
},
showslider = {
order = 12, type = "toggle",
name = L["Enable scrolling"],
desc = L["Activates and displays a scrolling slider bar, for the tooltip."],
get = function() return Broker_RaidSaveConfig.ShowSlider end,
set = function(_,v) Broker_RaidSaveConfig.ShowSlider = v
end,
},
slidermaxheight = {
order = 13, type = "range",
name = L["Tooltip Maximum Height"],
desc = L["Sets the tooltip maximum height, after which it will be scrollable."],
min = 100, max = 2000, step = 5,
get = function() return Broker_RaidSaveConfig.SliderMaxHeight end,
set = function(_,v)
if v < 100 then v = 100 end
if v > 2000 then v = 2000 end
Broker_RaidSaveConfig.SliderMaxHeight = v end,
disabled = function() return not Broker_RaidSaveConfig.ShowSlider end,
},
nulloption2 = {
order = 11,
order = 14,
type = "description",
name = " ",
cmdHidden = true
},
instanceheader = {
order = 12,
order = 15,
type = "header",
name = L["Instance Information"],
},
nulloption3 = {
order = 13,
order = 16,
type = "description",
name = " ",
cmdHidden = true
150,7 → 225,7
type = 'toggle', width = "full",
name = L["Show instance IDs"],
desc = L["Show or hide the numeric instance IDs."],
order = 14,
order = 17,
get = function() return Broker_RaidSaveConfig.showid end,
set = function(_,v) Broker_RaidSaveConfig.showid = v
end,
159,22 → 234,26
type = 'toggle', width = "full",
name = L["Show instance difficulty mode"],
desc = L["Adds a new column, indicating the dungeon or raid difficulty for the specific instance name and ID."],
order = 15,
order = 18,
get = function() return Broker_RaidSaveConfig.showdiff end,
set = function(_,v) Broker_RaidSaveConfig.showdiff = v
set = function(_,v) Broker_RaidSaveConfig.showdiff = v
if not Broker_RaidSaveConfig.showdiff and Broker_RaidSaveConfig.sortbyinstancediff then -- if not showing difficulty and we are sorting by it, sort by instance name instead
Broker_RaidSaveConfig.sortbyinstancediff = false
Broker_RaidSaveConfig.sortbyinstancename = true
end
end,
},
showCooldown = {
type = 'toggle',
name = L["Show time remaining"],
desc = L["Display the time the instance ID is still valid."],
order = 16,
order = 19,
get = function() return Broker_RaidSaveConfig.showcooldown end,
set = function(_,v) Broker_RaidSaveConfig.showcooldown = v
set = function(_,v) Broker_RaidSaveConfig.showcooldown = v
end,
},
formatCooldown = {
order = 17, type = "select",
order = 20, type = "select",
name = L["Remaining time format"],
desc = L["Display style for the time until reset."],
get = function() return Broker_RaidSaveConfig.formatcooldown end,
187,18 → 266,18
},
},
nulloption4 = {
order = 18,
order = 21,
type = "description",
name = " ",
cmdHidden = true
},
instanceExpirationheader = {
order = 19,
order = 22,
type = "header",
name = L["Instance Expiration"],
},
nulloption5 = {
order = 20,
order = 23,
type = "description",
name = " ",
cmdHidden = true
207,7 → 286,7
type = 'toggle', width = "full",
name = L["Show instance expiration data"],
desc = L["Display the date/time the instance ID expires."],
order = 21,
order = 24,
get = function() return Broker_RaidSaveConfig.showreset end,
set = function(_,v) Broker_RaidSaveConfig.showreset = v
end,
216,7 → 295,7
type = 'toggle', width = "full",
name = L["Show day in week"],
desc = L["Display the name of the day of the week, for the instance expiration string."],
order = 22,
order = 25,
get = function() return Broker_RaidSaveConfig.formatdayw end,
set = function(_,v) Broker_RaidSaveConfig.formatdayw = v
end,
225,7 → 304,7
type = 'toggle', width = "full",
name = L["Hide expired instances from plugin text"],
desc = L["Don't display instances with expired ID's on the plugin text."],
order = 23,
order = 26,
get = function() return Broker_RaidSaveConfig.hideexpiredbutton end,
set = function(_,v) Broker_RaidSaveConfig.hideexpiredbutton = v
BRRaidSave:Update()
235,13 → 314,13
type = 'toggle', width = "full",
name = L["Hide expired instances from tooltip"],
desc = L["Don't display instances with expired ID's on the tooltip."],
order = 24,
order = 27,
get = function() return Broker_RaidSaveConfig.hideexpiredtip end,
set = function(_,v) Broker_RaidSaveConfig.hideexpiredtip = v
end,
},
formatDate = {
order = 25, type = "select",
order = 28, type = "select",
name = L["Expiry date format"],
desc = L["Display style for the date instance IDs expire."],
get = function() return Broker_RaidSaveConfig.formatdate end,
253,7 → 332,7
},
},
formatTime = {
order = 26, type = "select",
order = 29, type = "select",
name = L["Expiry time format"],
desc = L["Display style for the time instance IDs expire."],
get = function() return Broker_RaidSaveConfig.formattime end,
291,9 → 370,16
instancenameorder = "desc",
instancedifforder = "desc",
hideexpiredtip = false,
hideexpiredbutton = false
hideexpiredbutton = false,
SliderMaxHeight = 600,
ShowSlider = true,
HideHint = false
}
end
-- added config options for v2.0
if not Broker_RaidSaveConfig.HideHint then Broker_RaidSaveConfig.HideHint = false end
if not Broker_RaidSaveConfig.ShowSlider then Broker_RaidSaveConfig.ShowSlider = false end
if not Broker_RaidSaveConfig.SliderMaxHeight then Broker_RaidSaveConfig.SliderMaxHeight = 600 end
-- added config options for v1.7-v1.8
if not Broker_RaidSaveConfig.hideexpiredtip then Broker_RaidSaveConfig.hideexpiredtip = false end
if not Broker_RaidSaveConfig.hideexpiredbutton then Broker_RaidSaveConfig.hideexpiredbutton = false end
339,29 → 425,29
if Broker_RaidSaveConfig.hideexpiredbutton then instancenum = player.numactive else instancenum = player.numsaved end
if instancenum == 0 and Broker_RaidSaveConfig.textwhenzero then self.obj.text = L["No Instances"] return end
 
local labelactive = _G["NORMAL_FONT_COLOR_CODE"]..L["Active: "].."|r".._G["GREEN_FONT_COLOR_CODE"]..string.format("%d", player.numactive).."|r"
local labelgroup = _G["NORMAL_FONT_COLOR_CODE"].._G["GROUP"]..": ".."|r".."|cff68ccef"..string.format("%d", player.numgroup).."|r"
local labelraid = _G["NORMAL_FONT_COLOR_CODE"].." ".._G["RAID"]..": ".."|r".._G["GREEN_FONT_COLOR_CODE"]..string.format("%d", player.numraid).."|r"
local labelexpired = _G["NORMAL_FONT_COLOR_CODE"].." "..L["Expired: "].."|r".._G["RED_FONT_COLOR_CODE"]..string.format("%d", player.numsaved - player.numactive).."|r"
 
if Broker_RaidSaveConfig.shorttext then
if Broker_RaidSaveConfig.hideexpiredbutton then
self.obj.text = _G["GREEN_FONT_COLOR_CODE"]..string.format("%d", player.numactive).."|r"
self.obj.text = "|cff68ccef"..string.format("%d", player.numgroup).."|r".." : ".._G["GREEN_FONT_COLOR_CODE"]..string.format("%d", player.numraid).."|r"
else
self.obj.text = _G["GREEN_FONT_COLOR_CODE"]..string.format("%d", player.numactive).."|r".." : ".._G["RED_FONT_COLOR_CODE"]..string.format("%d", player.numsaved - player.numactive).."|r"
self.obj.text = "|cff68ccef"..string.format("%d", player.numgroup).."|r".." : ".._G["GREEN_FONT_COLOR_CODE"]..string.format("%d", player.numraid).."|r".." : ".._G["RED_FONT_COLOR_CODE"]..string.format("%d", player.numsaved - player.numactive).."|r"
end
else
if Broker_RaidSaveConfig.hideexpiredbutton then labelexpired = "" end
self.obj.text = labelactive..labelexpired
self.obj.text = labelgroup..labelraid..labelexpired
end
end
 
 
function BRRaidSave.obj.OnEnter(self)
local colnum = 1
local savedinstances, templine
local player = Broker_RaidSaveConfig.realm[GetRealmName()].char[GetUnitName("player")]
local headings = {}
local orientation = {"LEFT", "", "", "", "" }
local colnum = 1
local orientation = {}
headings = {}
headings[colnum] = _G["LIGHTYELLOW_FONT_COLOR_CODE"]..L["Instance"].."|r "
orientation[colnum] = "LEFT"
if Broker_RaidSaveConfig.showdiff then
colnum = colnum + 1
headings[colnum] = _G["LIGHTYELLOW_FONT_COLOR_CODE"]..L["Difficulty"].."|r "
383,13 → 469,26
orientation[colnum] = "CENTER"
end
 
local maxentries = #orientation
 
-- acquire frame
tt = tooltip:Acquire("Broker_RaidSave", colnum, unpack(orientation, 1, 5))
tt = tooltip:Acquire("Broker_RaidSave", colnum, unpack(orientation, 1, maxentries))
tt:EnableMouse(true)
tt:SetScript("OnEnter", function(self) BRRaidSave:SetScript("OnUpdate", nil) end)
tt:SetScript("OnLeave", function(self) BRRaidSave:SetScript("OnUpdate", hidett) end)
tt:SmartAnchorTo(self)
tt:Clear()
tt:SetScale(1)
tt:SetBackdropBorderColor(1, 1, 1, 1)
local colcount = tt:GetColumnCount()
BRRaidSave:Drawtooltip()
tt:Show()
end
 
function BRRaidSave:Drawtooltip()
local player = Broker_RaidSaveConfig.realm[GetRealmName()].char[GetUnitName("player")]
local savedinstances, templine
 
local colcount = tt:GetColumnCount()
tt:AddLine("")
tt:SetCell(1, 1, _G["HIGHLIGHT_FONT_COLOR_CODE"].."Broker RaidSave", nil, "CENTER", colcount)
 
397,14 → 496,18
for k, v in pairs(Broker_RaidSaveConfig.realm[GetRealmName()].char) do
if v.numsaved > 0 then
local displaytable = {}
local i
for i = 1, v.numsaved do
if Broker_RaidSaveConfig.hideexpiredtip and (v.instance[i].expires == 0 or v.instance[i].expires < time()) then
else
local colnum = 1
local display = {}
-- set namestring
local namestring = _G["NORMAL_FONT_COLOR_CODE"]..v.instance[i].name.."|r"
local namestring = ""
if v.instance[i].extended then
namestring = "|cff0090ff"..v.instance[i].name.."|r"
else
namestring = _G["NORMAL_FONT_COLOR_CODE"]..v.instance[i].name.."|r"
end
-- set idstring
local idstring = "|cff2ce390".."["..v.instance[i].id.."]".."|r"
-- set cooldown string
431,7 → 534,7
if v.instance[i].israid ~= nil then
instancediffstring = BRRaidSave:GetDungeonDifficultyText(v.instance[i].difficulty, v.instance[i].israid)
else
instancediffstring = "|cffa0933d".._G["UNKNOWN"].."|r".." "
instancediffstring = "|cffa0933d".._G["UNKNOWN"].."|r"
end
-- Desaturate label colors for expired instances
if v.instance[i].expires == 0 or v.instance[i].expires < time() then
445,7 → 548,7
display[1] = namestring.." "
if Broker_RaidSaveConfig.showdiff then
colnum = colnum + 1
display[colnum] = instancediffstring
display[colnum] = instancediffstring.." "
end
if Broker_RaidSaveConfig.showid then
colnum = colnum + 1
459,19 → 562,36
colnum = colnum + 1
display[colnum] = expirestring
end
-- construct return table for currently logged on character only and insert it, into the display table
-- Structure: returnarg = { <Instance Name>, <Diff>, <ID>, <Reset>, <Extended>}
-- Instance Name : color coded string
-- Diff : color coded string
-- ID : string
-- Reset : color coded string
-- Extended : boolean
if v.name == player.name then
returnarg = {} -- reusable table
returnarg[1] = namestring
returnarg[2] = instancediffstring
returnarg[3] = v.instance[i].id
returnarg[4] = expirestring
returnarg[5] = v.instance[i].extended
display[colnum + 1] = returnarg
end
table.insert(displaytable, display)
end
end
 
if #displaytable > 0 then
 
-- handle sorting
if Broker_RaidSaveConfig.sortbyinstancename then
if Broker_RaidSaveConfig.instancenameorder == "desc" then
table.sort(displaytable, function(a,b) return string.lower (a[1]) < string.lower(b[1]) end)
table.sort(displaytable, function(a,b) return string.lower (RemoveColorCode(a[1])) < string.lower(RemoveColorCode(b[1])) end)
else
table.sort(displaytable, function(a,b) return string.lower (a[1]) > string.lower(b[1]) end)
table.sort(displaytable, function(a,b) return string.lower (RemoveColorCode(a[1])) > string.lower(RemoveColorCode(b[1])) end)
end
elseif Broker_RaidSaveConfig.sortbyinstancediff then
elseif Broker_RaidSaveConfig.sortbyinstancediff and Broker_RaidSaveConfig.showdiff then
if Broker_RaidSaveConfig.instancedifforder == "desc" then
table.sort(displaytable, function(a,b) return string.lower(RemoveColorCode(a[2])) < string.lower(RemoveColorCode(b[2])) end)
else
487,10 → 607,13
tt:AddLine(BRRaidSave:ClassColorise(v.class, v.name))
end
tt:AddLine(unpack(headings,1,colcount))
 
local i
 
for i = 1, #displaytable do
tt:AddLine(unpack(displaytable[i],1,colcount))
templine = tt:AddLine(unpack(displaytable[i],1,colcount))
-- safeguard
if displaytable[i][colcount + 1] then
tt:SetCellScript(templine, 1, "OnMouseDown", ClickHandlerFunc , displaytable[i][colcount + 1])
end
end
end
end
503,26 → 626,37
end
 
-- Tooltip Hint
tt:AddLine(" ")
templine = tt:AddLine("")
tt:SetCell(templine, 1, L["|cffeda55fLeft Click|r |cff19ff19on plugin to toggle Blizzard's Raid Information frame."], nil, "LEFT", colcount)
templine = tt:AddLine("")
tt:SetCell(templine, 1, L["|cffeda55fRight Click|r |cff19ff19on plugin to open Configuration Menu."], nil, "LEFT", colcount)
if not Broker_RaidSaveConfig.HideHint then
tt:AddLine(" ")
templine = tt:AddLine("")
tt:SetCell(templine, 1, L["|cffeda55fLeft Click|r |cff19ff19on plugin to toggle Blizzard's Raid Information frame."], nil, "LEFT", colcount)
templine = tt:AddLine("")
tt:SetCell(templine, 1, L["|cffeda55fLeft Click|r |cff19ff19on instance name to toggle ID extension."], nil, "LEFT", colcount)
templine = tt:AddLine("")
tt:SetCell(templine, 1, L["|cffeda55fRight Click|r |cff19ff19on plugin to open Configuration Menu."], nil, "LEFT", colcount)
templine = tt:AddLine("")
tt:SetCell(templine, 1, L["|cffeda55fShift+Left Click|r |cff19ff19to paste instance info into chat."], nil, "LEFT", colcount)
templine = tt:AddLine("")
tt:SetCell(templine, 1, L["|cff0090ffBlue|r |cff19ff19colored instance names, indicate|r |cff0090ffextended|r |cff19ff19IDs.|r"], nil, "LEFT", colcount)
end
 
tt:Show()
 
if Broker_RaidSaveConfig.ShowSlider then
tt:UpdateScrolling(Broker_RaidSaveConfig.SliderMaxHeight)
end
 
end
 
function BRRaidSave.obj.OnLeave()
if tt then
tooltip:Release(tt)
tt = nil
if tt and tt:IsVisible() then
BRRaidSave:SetScript("OnUpdate", hidett)
end
end
 
 
function BRRaidSave.obj.OnClick(self, button)
if tt then
tt:SetScript("OnEnter", nil)
tt:SetScript("OnLeave", nil)
tooltip:Release(tt)
tt = nil
end
543,10 → 677,10
local par1, par2 = "", ""
if withpar then par1, par2 = "(", ")" end
local diffstr = "|cffffff9a"..par1.._G["UNKNOWN"]..par2.."|r"
if not setting then return diffstr.." " end
if not setting then return diffstr end
if isRaid then
-- raids
if not _G["RAID_DIFFICULTY"..tostring(setting)] then return diffstr.." " end
if not _G["RAID_DIFFICULTY"..tostring(setting)] then return diffstr end
-- remove () chars from difficulty
local tmpstr = string.gsub(_G["RAID_DIFFICULTY"..tostring(setting)], "%(", "")
tmpstr = string.gsub(tmpstr, "%)", "")
557,7 → 691,7
end
else
-- dungeons
if not _G["DUNGEON_DIFFICULTY"..tostring(setting)] then return diffstr.." " end
if not _G["DUNGEON_DIFFICULTY"..tostring(setting)] then return diffstr end
-- remove () chars from difficulty
local tmpstr = string.gsub(_G["DUNGEON_DIFFICULTY"..tostring(setting)], "%(", "")
tmpstr = string.gsub(tmpstr, "%)", "")
567,26 → 701,38
diffstr = _G["GREEN_FONT_COLOR_CODE"]..par1..tmpstr..par2.."|r"
end
end
return diffstr.." "
return diffstr
end
 
function BRRaidSave:Refresh()
local player = Broker_RaidSaveConfig.realm[GetRealmName()].char[GetUnitName("player")]
player.numsaved = GetNumSavedInstances()
player.numactive = 0
player.instance = { }
player.numactive, player.numgroup, player.numraid = 0, 0, 0
player.instance = {}
if player.numsaved == 0 then
else
local iname, iid, iexpires, idiff, ilocked, iextended, iidmostsig, iisraid, temp
for i = 1, player.numsaved do
iname, iid, iexpires, idiff, ilocked, iextended, iidmostsig, iisraid = GetSavedInstanceInfo(i)
if iexpires > 0 then iexpires = iexpires + time() player.numactive = player.numactive + 1 end
if iexpires > 0 then
iexpires = iexpires + time()
player.numactive = player.numactive + 1
if iisraid == true then
player.numraid = player.numraid + 1
elseif iisraid == false then
player.numgroup = player.numgroup + 1
end
end
-- insert data into table
temp = { name = iname, id = iid, idMostSig = iidmostsig, expires = iexpires, difficulty = idiff, locked = ilocked, extended = iextended, israid = iisraid }
table.insert(player.instance, temp)
end
end
self:Update()
if tt and tt:IsVisible() then -- update tooltip if it exists and is visible
tt:Clear()
BRRaidSave:Drawtooltip()
end
end
 
function BRRaidSave:GetDaysInMonth(year, month)
trunk/Broker_RaidSave/Broker_RaidSave.toc
6,7 → 6,7
## SavedVariables: Broker_RaidSaveConfig
## X-Embeds: Ace3, LibAbacus-3.0, LibQTip-1.0
## X-Category: Raid
## Version: 1.8
## Version: 2.0
## X-WoWI-ID: 11237
 
embeds.xml
trunk/Broker_RaidSave/libs/LibQTip-1.0/LibQTip-1.0.lua
68,9 → 68,9
------------------------------------------------------------------------------
-- Cache debugging.
------------------------------------------------------------------------------
--@debug@
--[===[@debug@
local usedTables, usedFrames, usedTooltips = 0, 0, 0
--@end-debug@
--@end-debug@]===]
 
------------------------------------------------------------------------------
-- Internal constants to tweak the layout
130,9 → 130,9
local function AcquireFrame(parent)
local frame = tremove(frameHeap) or CreateFrame("Frame")
frame:SetParent(parent)
--@debug@
--[===[@debug@
usedFrames = usedFrames + 1
--@end-debug@
--@end-debug@]===]
return frame
end
 
143,9 → 143,9
frame:SetBackdrop(nil)
ClearFrameScripts(frame)
tinsert(frameHeap, frame)
--@debug@
--[===[@debug@
usedFrames = usedFrames - 1
--@end-debug@
--@end-debug@]===]
end
 
------------------------------------------------------------------------------
283,9 → 283,9
tooltip.scrollChild = scrollChild
setmetatable(tooltip, tipMetatable)
end
--@debug@
--[===[@debug@
usedTooltips = usedTooltips + 1
--@end-debug@
--@end-debug@]===]
return tooltip
end
 
311,9 → 311,9
 
layoutCleaner.registry[tooltip] = nil
tinsert(tooltipHeap, tooltip)
--@debug@
--[===[@debug@
usedTooltips = usedTooltips - 1
--@end-debug@
--@end-debug@]===]
end
 
------------------------------------------------------------------------------
349,9 → 349,9
-- Returns a table
function AcquireTable()
local tbl = tremove(tableHeap) or {}
--@debug@
--[===[@debug@
usedTables = usedTables + 1
--@end-debug@
--@end-debug@]===]
return tbl
end
 
359,9 → 359,9
function ReleaseTable(table)
wipe(table)
tinsert(tableHeap, table)
--@debug@
--[===[@debug@
usedTables = usedTables - 1
--@end-debug@
--@end-debug@]===]
end
 
------------------------------------------------------------------------------
1026,7 → 1026,7
------------------------------------------------------------------------------
-- Debug slashcmds
------------------------------------------------------------------------------
--@debug@
--[===[@debug@
local print = print
local function PrintStats()
local tipCache = tostring(#tooltipHeap)
1049,4 → 1049,4
 
SLASH_LibQTip1 = "/qtip"
SlashCmdList["LibQTip"] = PrintStats
--@end-debug@
--@end-debug@]===]