WoWInterface SVN StellarUF

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 134 to Rev 135
    Reverse comparison

Rev 134 → Rev 135

trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
381,7 → 381,7
 
local function Dropdown_TogglePullout(this)
local self = this.obj
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
if self.open then
self.open = nil
self.pullout:Close()
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 27
local Type, Version = "EditBox", 28
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
73,7 → 73,7
local value = frame:GetText()
local cancel = self:Fire("OnEnterPressed", value)
if not cancel then
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
HideButton(self)
end
end
81,23 → 81,21
local function EditBox_OnReceiveDrag(frame)
local self = frame.obj
local type, id, info = GetCursorInfo()
local name
if type == "item" then
self:SetText(info)
self:Fire("OnEnterPressed", info)
ClearCursor()
name = info
elseif type == "spell" then
local name = GetSpellInfo(id, info)
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
name = GetSpellInfo(id, info)
elseif type == "macro" then
local name = GetMacroInfo(id)
name = GetMacroInfo(id)
end
if name then
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
HideButton(self)
AceGUI:ClearFocus()
end
HideButton(self)
AceGUI:ClearFocus()
end
 
local function EditBox_OnTextChanged(frame)
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
32,7 → 32,7
end
 
local function closeOnClick(this)
PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
this.obj:Hide()
end
 
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
343,9 → 343,9
if self.disabled then return end
self.value = not self.value
if self.value then
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
else
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOff" or 857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
end
UpdateToggle(self)
self:Fire("OnValueChanged", self.value)
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
18,7 → 18,7
-------------------------------------------------------------------------------]]
local function Button_OnClick(frame, ...)
AceGUI:ClearFocus()
PlaySound(PlaySoundKitID and "igMainMenuOption" or 852) -- SOUNDKIT.IG_MAINMENU_OPTION
PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION
frame.obj:Fire("OnClick", ...)
end
 
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2,10 → 2,12
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 40
local Type, Version = "TreeGroup", 41
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
local WoW80 = select(4, GetBuildInfo()) >= 80000
 
-- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
local math_min, math_max, floor = math.min, math.max, floor
162,7 → 164,7
local function FirstFrameUpdate(frame)
local self = frame.obj
frame:SetScript("OnUpdate", nil)
self:RefreshTree()
self:RefreshTree(nil, true)
end
 
local function BuildUniqueValue(...)
300,6 → 302,8
 
["OnRelease"] = function(self)
self.status = nil
self.tree = nil
self.frame:SetScript("OnUpdate", nil)
for k, v in pairs(self.localstatus) do
if k == "groups" then
for k2 in pairs(v) do
388,8 → 392,8
end
end,
 
["RefreshTree"] = function(self,scrollToSelection)
local buttons = self.buttons
["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate)
local buttons = self.buttons
local lines = self.lines
 
for i, v in ipairs(buttons) do
420,6 → 424,12
local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
if maxlines <= 0 then return end
 
-- workaround for lag spikes on WoW 8.0
if WoW80 and self.frame:GetParent() == UIParent and not fromOnUpdate then
self.frame:SetScript("OnUpdate", FirstFrameUpdate)
return
end
 
local first, last
 
scrollToSelection = status.scrollToSelection
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
108,7 → 108,7
end
 
if value then
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
self.slider:SetValue(value)
self:Fire("OnMouseUp", value)
end
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
63,7 → 63,7
-------------------------------------------------------------------------------]]
local function Tab_OnClick(frame)
if not (frame.selected or frame.disabled) then
PlaySound(PlaySoundKitID and "igCharacterInfoTab" or 841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB
PlaySound(841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB
frame.obj:SelectTab(frame.value)
end
end
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
Checkbox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "CheckBox", 23
local Type, Version = "CheckBox", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
26,7 → 26,7
self.text:SetPoint("LEFT", self.checkbg, "RIGHT")
self.text:SetPoint("RIGHT")
else
self.text:SetPoint("LEFT", self.image,"RIGHT", 1, 0)
self.text:SetPoint("LEFT", self.checkbg, "RIGHT", self.image:GetWidth() + 2, 0)
self.text:SetPoint("RIGHT")
end
end
60,9 → 60,9
self:ToggleChecked()
 
if self.checked then
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
else -- for both nil and false (tristate)
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOff" or 857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
end
 
self:Fire("OnValueChanged", self.checked)
203,6 → 203,7
desc:ClearAllPoints()
desc:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
desc:SetWidth(self.frame.width - 30)
desc:SetPoint("RIGHT", self.frame, "RIGHT", -30, 0)
desc:SetJustifyH("LEFT")
desc:SetJustifyV("TOP")
self.desc = desc
trunk/StufRaid_Options/libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
21,7 → 21,7
Scripts
-------------------------------------------------------------------------------]]
local function Button_OnClick(frame)
PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
frame.obj:Hide()
end
 
trunk/StufRaid_Options/libs/AceGUI-3.0/AceGUI-3.0.lua
24,8 → 24,8
-- f:AddChild(btn)
-- @class file
-- @name AceGUI-3.0
-- @release $Id: AceGUI-3.0.lua 1102 2013-10-25 14:15:23Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 34
-- @release $Id: AceGUI-3.0.lua 1177 2018-06-25 12:12:48Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 36
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
 
if not AceGUI then return end -- No upgrade needed
811,3 → 811,221
height = height + rowheight + 3
safecall(content.obj.LayoutFinished, content.obj, nil, height)
end)
 
-- Get alignment method and value. Possible alignment methods are a callback, a number, "start", "middle", "end", "fill" or "TOPLEFT", "BOTTOMRIGHT" etc.
local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child)
local fn = cellObj and (cellObj["align" .. dir] or cellObj.align)
or colObj and (colObj["align" .. dir] or colObj.align)
or tableObj["align" .. dir] or tableObj.align
or "CENTERLEFT"
local child, cell, val = child or 0, cell or 0, nil
 
if type(fn) == "string" then
fn = fn:lower()
fn = dir == "V" and (fn:sub(1, 3) == "top" and "start" or fn:sub(1, 6) == "bottom" and "end" or fn:sub(1, 6) == "center" and "middle")
or dir == "H" and (fn:sub(-4) == "left" and "start" or fn:sub(-5) == "right" and "end" or fn:sub(-6) == "center" and "middle")
or fn
val = (fn == "start" or fn == "fill") and 0 or fn == "end" and cell - child or (cell - child) / 2
elseif type(fn) == "function" then
val = fn(child or 0, cell, dir)
else
val = fn
end
 
return fn, max(0, min(val, cell))
end
 
-- Get width or height for multiple cells combined
local GetCellDimension = function (dir, laneDim, from, to, space)
local dim = 0
for cell=from,to do
dim = dim + (laneDim[cell] or 0)
end
return dim + max(0, to - from) * (space or 0)
end
 
--[[ Options
============
Container:
- columns ({col, col, ...}): Column settings. "col" can be a number (<= 0: content width, <1: rel. width, <10: weight, >=10: abs. width) or a table with column setting.
- space, spaceH, spaceV: Overall, horizontal and vertical spacing between cells.
- align, alignH, alignV: Overall, horizontal and vertical cell alignment. See GetCellAlign() for possible values.
Columns:
- width: Fixed column width (nil or <=0: content width, <1: rel. width, >=1: abs. width).
- min or 1: Min width for content based width
- max or 2: Max width for content based width
- weight: Flexible column width. The leftover width after accounting for fixed-width columns is distributed to weighted columns according to their weights.
- align, alignH, alignV: Overwrites the container setting for alignment.
Cell:
- colspan: Makes a cell span multiple columns.
- rowspan: Makes a cell span multiple rows.
- align, alignH, alignV: Overwrites the container and column setting for alignment.
]]
AceGUI:RegisterLayout("Table",
function (content, children)
local obj = content.obj
obj:PauseLayout()
 
local tableObj = obj:GetUserData("table")
local cols = tableObj.columns
local spaceH = tableObj.spaceH or tableObj.space or 0
local spaceV = tableObj.spaceV or tableObj.space or 0
local totalH = (content:GetWidth() or content.width or 0) - spaceH * (#cols - 1)
 
-- We need to reuse these because layout events can come in very frequently
local layoutCache = obj:GetUserData("layoutCache")
if not layoutCache then
layoutCache = {{}, {}, {}, {}, {}, {}}
obj:SetUserData("layoutCache", layoutCache)
end
local t, laneH, laneV, rowspans, rowStart, colStart = unpack(layoutCache)
 
-- Create the grid
local n, slotFound = 0
for i,child in ipairs(children) do
if child:IsShown() then
repeat
n = n + 1
local col = (n - 1) % #cols + 1
local row = ceil(n / #cols)
local rowspan = rowspans[col]
local cell = rowspan and rowspan.child or child
local cellObj = cell:GetUserData("cell")
slotFound = not rowspan
 
-- Rowspan
if not rowspan and cellObj and cellObj.rowspan then
rowspan = {child = child, from = row, to = row + cellObj.rowspan - 1}
rowspans[col] = rowspan
end
if rowspan and i == #children then
rowspan.to = row
end
 
-- Colspan
local colspan = max(0, min((cellObj and cellObj.colspan or 1) - 1, #cols - col))
n = n + colspan
 
-- Place the cell
if not rowspan or rowspan.to == row then
t[n] = cell
rowStart[cell] = rowspan and rowspan.from or row
colStart[cell] = col
 
if rowspan then
rowspans[col] = nil
end
end
until slotFound
end
end
 
local rows = ceil(n / #cols)
 
-- Determine fixed size cols and collect weights
local extantH, totalWeight = totalH, 0
for col,colObj in ipairs(cols) do
laneH[col] = 0
 
if type(colObj) == "number" then
colObj = {[colObj >= 1 and colObj < 10 and "weight" or "width"] = colObj}
cols[col] = colObj
end
 
if colObj.weight then
-- Weight
totalWeight = totalWeight + (colObj.weight or 1)
else
if not colObj.width or colObj.width <= 0 then
-- Content width
for row=1,rows do
local child = t[(row - 1) * #cols + col]
if child then
local f = child.frame
f:ClearAllPoints()
local childH = f:GetWidth() or 0
 
laneH[col] = max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
end
end
 
laneH[col] = max(colObj.min or colObj[1] or 0, min(laneH[col], colObj.max or colObj[2] or laneH[col]))
else
-- Rel./Abs. width
laneH[col] = colObj.width < 1 and colObj.width * totalH or colObj.width
end
extantH = max(0, extantH - laneH[col])
end
end
 
-- Determine sizes based on weight
local scale = totalWeight > 0 and extantH / totalWeight or 0
for col,colObj in pairs(cols) do
if colObj.weight then
laneH[col] = scale * colObj.weight
end
end
 
-- Arrange children
for row=1,rows do
local rowV = 0
 
-- Horizontal placement and sizing
for col=1,#cols do
local child = t[(row - 1) * #cols + col]
if child then
local colObj = cols[colStart[child]]
local cellObj = child:GetUserData("cell")
local offsetH = GetCellDimension("H", laneH, 1, colStart[child] - 1, spaceH) + (colStart[child] == 1 and 0 or spaceH)
local cellH = GetCellDimension("H", laneH, colStart[child], col, spaceH)
 
local f = child.frame
f:ClearAllPoints()
local childH = f:GetWidth() or 0
 
local alignFn, align = GetCellAlign("H", tableObj, colObj, cellObj, cellH, childH)
f:SetPoint("LEFT", content, offsetH + align, 0)
if child:IsFullWidth() or alignFn == "fill" or childH > cellH then
f:SetPoint("RIGHT", content, "LEFT", offsetH + align + cellH, 0)
end
 
if child.DoLayout then
child:DoLayout()
end
 
rowV = max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV))
end
end
 
laneV[row] = rowV
 
-- Vertical placement and sizing
for col=1,#cols do
local child = t[(row - 1) * #cols + col]
if child then
local colObj = cols[colStart[child]]
local cellObj = child:GetUserData("cell")
local offsetV = GetCellDimension("V", laneV, 1, rowStart[child] - 1, spaceV) + (rowStart[child] == 1 and 0 or spaceV)
local cellV = GetCellDimension("V", laneV, rowStart[child], row, spaceV)
 
local f = child.frame
local childV = f:GetHeight() or 0
 
local alignFn, align = GetCellAlign("V", tableObj, colObj, cellObj, cellV, childV)
if child:IsFullHeight() or alignFn == "fill" then
f:SetHeight(cellV)
end
f:SetPoint("TOP", content, 0, -(offsetV + align))
end
end
end
 
-- Calculate total height
local totalV = GetCellDimension("V", laneV, 1, #laneV, spaceV)
 
-- Cleanup
for _,v in pairs(layoutCache) do wipe(v) end
 
safecall(obj.LayoutFinished, obj, nil, totalV)
obj:ResumeLayout()
end)
trunk/StufRaid_Options/libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1,13 → 1,13
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
-- @class file
-- @name AceConfigDialog-3.0
-- @release $Id: AceConfigDialog-3.0.lua 1163 2017-08-14 14:04:39Z nevcairiel $
-- @release $Id: AceConfigDialog-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
 
local LibStub = LibStub
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")
 
local MAJOR, MINOR = "AceConfigDialog-3.0", 64
local MAJOR, MINOR = "AceConfigDialog-3.0", 66
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
740,7 → 740,7
else
validationErrorPopup(validated)
end
PlaySound(PlaySoundKitID and "igPlayerInviteDecline" or 882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || XXX _DECLINE is actually missing from the table
PlaySound(882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || _DECLINE is actually missing from the table
del(info)
return true
else
1034,6 → 1034,7
entry.value = k
entry.text = GetOptionsMemberValue("name", v, options, path, appName)
entry.icon = GetOptionsMemberValue("icon", v, options, path, appName)
entry.iconCoords = GetOptionsMemberValue("iconCoords", v, options, path, appName)
entry.disabled = CheckOptionDisabled(v, options, path, appName)
tinsert(tree,entry)
if recurse and (v.childGroups or "tree") == "tree" then
1226,6 → 1227,8
radio:SetWidth(width_multiplier * 2)
elseif width == "half" then
radio:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
radio:SetWidth(width_multiplier * width)
elseif width == "full" then
radio.width = "fill"
else
1288,6 → 1291,8
control:SetWidth(width_multiplier * 2)
elseif width == "half" then
control:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
control:SetWidth(width_multiplier * width)
elseif width == "full" then
control.width = "fill"
else
1324,6 → 1329,8
check:SetWidth(width_multiplier * 2)
elseif width == "half" then
check:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
control:SetWidth(width_multiplier * width)
elseif width == "full" then
check.width = "fill"
else
1405,6 → 1412,8
control:SetWidth(width_multiplier * 2)
elseif width == "half" then
control:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
control:SetWidth(width_multiplier * width)
elseif width == "full" then
control.width = "fill"
else
trunk/StufRaid_Options/libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
8,10 → 8,10
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id: AceConfigRegistry-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
-- @release $Id: AceConfigRegistry-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
local CallbackHandler = LibStub("CallbackHandler-1.0")
 
local MAJOR, MINOR = "AceConfigRegistry-3.0", 17
local MAJOR, MINOR = "AceConfigRegistry-3.0", 18
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigRegistry then return end
67,6 → 67,7
local opttable={["nil"]=true,["table"]=true, _="table"}
local optbool={["nil"]=true,["boolean"]=true, _="boolean"}
local optboolnumber={["nil"]=true,["boolean"]=true,["number"]=true, _="boolean or number"}
local optstringnumber={["nil"]=true,["string"]=true,["number"]=true, _="string or number"}
 
local basekeys={
type=isstring,
90,7 → 91,7
set=optmethodfalse,
func=optmethodfalse,
arg={["*"]=true},
width=optstring,
width=optstringnumber,
}
 
local typedkeys={
trunk/StufRaid_Options/StufRaid_Options.toc
1,4 → 1,4
## Interface: 70300
## Interface: 80000
## Title: Stuf Raid Options
## Author: TotalPackage
## Notes: Configuration Menu for StufRaid.
trunk/Stuf_Options/Stuf_Options.toc
1,4 → 1,4
## Interface: 70300
## Interface: 80000
## Title: Stuf_Options
## Author: TotalPackage
## Notes: Configuration Menu for Stuf.
trunk/Stuf_Options/libs/AceGUI-3.0/AceGUI-3.0.lua
24,8 → 24,8
-- f:AddChild(btn)
-- @class file
-- @name AceGUI-3.0
-- @release $Id: AceGUI-3.0.lua 1102 2013-10-25 14:15:23Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 34
-- @release $Id: AceGUI-3.0.lua 1177 2018-06-25 12:12:48Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 36
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
 
if not AceGUI then return end -- No upgrade needed
811,3 → 811,221
height = height + rowheight + 3
safecall(content.obj.LayoutFinished, content.obj, nil, height)
end)
 
-- Get alignment method and value. Possible alignment methods are a callback, a number, "start", "middle", "end", "fill" or "TOPLEFT", "BOTTOMRIGHT" etc.
local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child)
local fn = cellObj and (cellObj["align" .. dir] or cellObj.align)
or colObj and (colObj["align" .. dir] or colObj.align)
or tableObj["align" .. dir] or tableObj.align
or "CENTERLEFT"
local child, cell, val = child or 0, cell or 0, nil
 
if type(fn) == "string" then
fn = fn:lower()
fn = dir == "V" and (fn:sub(1, 3) == "top" and "start" or fn:sub(1, 6) == "bottom" and "end" or fn:sub(1, 6) == "center" and "middle")
or dir == "H" and (fn:sub(-4) == "left" and "start" or fn:sub(-5) == "right" and "end" or fn:sub(-6) == "center" and "middle")
or fn
val = (fn == "start" or fn == "fill") and 0 or fn == "end" and cell - child or (cell - child) / 2
elseif type(fn) == "function" then
val = fn(child or 0, cell, dir)
else
val = fn
end
 
return fn, max(0, min(val, cell))
end
 
-- Get width or height for multiple cells combined
local GetCellDimension = function (dir, laneDim, from, to, space)
local dim = 0
for cell=from,to do
dim = dim + (laneDim[cell] or 0)
end
return dim + max(0, to - from) * (space or 0)
end
 
--[[ Options
============
Container:
- columns ({col, col, ...}): Column settings. "col" can be a number (<= 0: content width, <1: rel. width, <10: weight, >=10: abs. width) or a table with column setting.
- space, spaceH, spaceV: Overall, horizontal and vertical spacing between cells.
- align, alignH, alignV: Overall, horizontal and vertical cell alignment. See GetCellAlign() for possible values.
Columns:
- width: Fixed column width (nil or <=0: content width, <1: rel. width, >=1: abs. width).
- min or 1: Min width for content based width
- max or 2: Max width for content based width
- weight: Flexible column width. The leftover width after accounting for fixed-width columns is distributed to weighted columns according to their weights.
- align, alignH, alignV: Overwrites the container setting for alignment.
Cell:
- colspan: Makes a cell span multiple columns.
- rowspan: Makes a cell span multiple rows.
- align, alignH, alignV: Overwrites the container and column setting for alignment.
]]
AceGUI:RegisterLayout("Table",
function (content, children)
local obj = content.obj
obj:PauseLayout()
 
local tableObj = obj:GetUserData("table")
local cols = tableObj.columns
local spaceH = tableObj.spaceH or tableObj.space or 0
local spaceV = tableObj.spaceV or tableObj.space or 0
local totalH = (content:GetWidth() or content.width or 0) - spaceH * (#cols - 1)
 
-- We need to reuse these because layout events can come in very frequently
local layoutCache = obj:GetUserData("layoutCache")
if not layoutCache then
layoutCache = {{}, {}, {}, {}, {}, {}}
obj:SetUserData("layoutCache", layoutCache)
end
local t, laneH, laneV, rowspans, rowStart, colStart = unpack(layoutCache)
 
-- Create the grid
local n, slotFound = 0
for i,child in ipairs(children) do
if child:IsShown() then
repeat
n = n + 1
local col = (n - 1) % #cols + 1
local row = ceil(n / #cols)
local rowspan = rowspans[col]
local cell = rowspan and rowspan.child or child
local cellObj = cell:GetUserData("cell")
slotFound = not rowspan
 
-- Rowspan
if not rowspan and cellObj and cellObj.rowspan then
rowspan = {child = child, from = row, to = row + cellObj.rowspan - 1}
rowspans[col] = rowspan
end
if rowspan and i == #children then
rowspan.to = row
end
 
-- Colspan
local colspan = max(0, min((cellObj and cellObj.colspan or 1) - 1, #cols - col))
n = n + colspan
 
-- Place the cell
if not rowspan or rowspan.to == row then
t[n] = cell
rowStart[cell] = rowspan and rowspan.from or row
colStart[cell] = col
 
if rowspan then
rowspans[col] = nil
end
end
until slotFound
end
end
 
local rows = ceil(n / #cols)
 
-- Determine fixed size cols and collect weights
local extantH, totalWeight = totalH, 0
for col,colObj in ipairs(cols) do
laneH[col] = 0
 
if type(colObj) == "number" then
colObj = {[colObj >= 1 and colObj < 10 and "weight" or "width"] = colObj}
cols[col] = colObj
end
 
if colObj.weight then
-- Weight
totalWeight = totalWeight + (colObj.weight or 1)
else
if not colObj.width or colObj.width <= 0 then
-- Content width
for row=1,rows do
local child = t[(row - 1) * #cols + col]
if child then
local f = child.frame
f:ClearAllPoints()
local childH = f:GetWidth() or 0
 
laneH[col] = max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
end
end
 
laneH[col] = max(colObj.min or colObj[1] or 0, min(laneH[col], colObj.max or colObj[2] or laneH[col]))
else
-- Rel./Abs. width
laneH[col] = colObj.width < 1 and colObj.width * totalH or colObj.width
end
extantH = max(0, extantH - laneH[col])
end
end
 
-- Determine sizes based on weight
local scale = totalWeight > 0 and extantH / totalWeight or 0
for col,colObj in pairs(cols) do
if colObj.weight then
laneH[col] = scale * colObj.weight
end
end
 
-- Arrange children
for row=1,rows do
local rowV = 0
 
-- Horizontal placement and sizing
for col=1,#cols do
local child = t[(row - 1) * #cols + col]
if child then
local colObj = cols[colStart[child]]
local cellObj = child:GetUserData("cell")
local offsetH = GetCellDimension("H", laneH, 1, colStart[child] - 1, spaceH) + (colStart[child] == 1 and 0 or spaceH)
local cellH = GetCellDimension("H", laneH, colStart[child], col, spaceH)
 
local f = child.frame
f:ClearAllPoints()
local childH = f:GetWidth() or 0
 
local alignFn, align = GetCellAlign("H", tableObj, colObj, cellObj, cellH, childH)
f:SetPoint("LEFT", content, offsetH + align, 0)
if child:IsFullWidth() or alignFn == "fill" or childH > cellH then
f:SetPoint("RIGHT", content, "LEFT", offsetH + align + cellH, 0)
end
 
if child.DoLayout then
child:DoLayout()
end
 
rowV = max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV))
end
end
 
laneV[row] = rowV
 
-- Vertical placement and sizing
for col=1,#cols do
local child = t[(row - 1) * #cols + col]
if child then
local colObj = cols[colStart[child]]
local cellObj = child:GetUserData("cell")
local offsetV = GetCellDimension("V", laneV, 1, rowStart[child] - 1, spaceV) + (rowStart[child] == 1 and 0 or spaceV)
local cellV = GetCellDimension("V", laneV, rowStart[child], row, spaceV)
 
local f = child.frame
local childV = f:GetHeight() or 0
 
local alignFn, align = GetCellAlign("V", tableObj, colObj, cellObj, cellV, childV)
if child:IsFullHeight() or alignFn == "fill" then
f:SetHeight(cellV)
end
f:SetPoint("TOP", content, 0, -(offsetV + align))
end
end
end
 
-- Calculate total height
local totalV = GetCellDimension("V", laneV, 1, #laneV, spaceV)
 
-- Cleanup
for _,v in pairs(layoutCache) do wipe(v) end
 
safecall(obj.LayoutFinished, obj, nil, totalV)
obj:ResumeLayout()
end)
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
108,7 → 108,7
end
 
if value then
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
self.slider:SetValue(value)
self:Fire("OnMouseUp", value)
end
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
63,7 → 63,7
-------------------------------------------------------------------------------]]
local function Tab_OnClick(frame)
if not (frame.selected or frame.disabled) then
PlaySound(PlaySoundKitID and "igCharacterInfoTab" or 841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB
PlaySound(841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB
frame.obj:SelectTab(frame.value)
end
end
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
Checkbox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "CheckBox", 23
local Type, Version = "CheckBox", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
26,7 → 26,7
self.text:SetPoint("LEFT", self.checkbg, "RIGHT")
self.text:SetPoint("RIGHT")
else
self.text:SetPoint("LEFT", self.image,"RIGHT", 1, 0)
self.text:SetPoint("LEFT", self.checkbg, "RIGHT", self.image:GetWidth() + 2, 0)
self.text:SetPoint("RIGHT")
end
end
60,9 → 60,9
self:ToggleChecked()
 
if self.checked then
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
else -- for both nil and false (tristate)
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOff" or 857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
end
 
self:Fire("OnValueChanged", self.checked)
203,6 → 203,7
desc:ClearAllPoints()
desc:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
desc:SetWidth(self.frame.width - 30)
desc:SetPoint("RIGHT", self.frame, "RIGHT", -30, 0)
desc:SetJustifyH("LEFT")
desc:SetJustifyV("TOP")
self.desc = desc
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
21,7 → 21,7
Scripts
-------------------------------------------------------------------------------]]
local function Button_OnClick(frame)
PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
frame.obj:Hide()
end
 
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
381,7 → 381,7
 
local function Dropdown_TogglePullout(this)
local self = this.obj
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
if self.open then
self.open = nil
self.pullout:Close()
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 27
local Type, Version = "EditBox", 28
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
73,7 → 73,7
local value = frame:GetText()
local cancel = self:Fire("OnEnterPressed", value)
if not cancel then
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
HideButton(self)
end
end
81,23 → 81,21
local function EditBox_OnReceiveDrag(frame)
local self = frame.obj
local type, id, info = GetCursorInfo()
local name
if type == "item" then
self:SetText(info)
self:Fire("OnEnterPressed", info)
ClearCursor()
name = info
elseif type == "spell" then
local name = GetSpellInfo(id, info)
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
name = GetSpellInfo(id, info)
elseif type == "macro" then
local name = GetMacroInfo(id)
name = GetMacroInfo(id)
end
if name then
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
HideButton(self)
AceGUI:ClearFocus()
end
HideButton(self)
AceGUI:ClearFocus()
end
 
local function EditBox_OnTextChanged(frame)
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
32,7 → 32,7
end
 
local function closeOnClick(this)
PlaySound(PlaySoundKitID and "gsTitleOptionExit" or 799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT
this.obj:Hide()
end
 
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2,10 → 2,12
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 40
local Type, Version = "TreeGroup", 41
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
local WoW80 = select(4, GetBuildInfo()) >= 80000
 
-- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
local math_min, math_max, floor = math.min, math.max, floor
162,7 → 164,7
local function FirstFrameUpdate(frame)
local self = frame.obj
frame:SetScript("OnUpdate", nil)
self:RefreshTree()
self:RefreshTree(nil, true)
end
 
local function BuildUniqueValue(...)
300,6 → 302,8
 
["OnRelease"] = function(self)
self.status = nil
self.tree = nil
self.frame:SetScript("OnUpdate", nil)
for k, v in pairs(self.localstatus) do
if k == "groups" then
for k2 in pairs(v) do
388,8 → 392,8
end
end,
 
["RefreshTree"] = function(self,scrollToSelection)
local buttons = self.buttons
["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate)
local buttons = self.buttons
local lines = self.lines
 
for i, v in ipairs(buttons) do
420,6 → 424,12
local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
if maxlines <= 0 then return end
 
-- workaround for lag spikes on WoW 8.0
if WoW80 and self.frame:GetParent() == UIParent and not fromOnUpdate then
self.frame:SetScript("OnUpdate", FirstFrameUpdate)
return
end
 
local first, last
 
scrollToSelection = status.scrollToSelection
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
18,7 → 18,7
-------------------------------------------------------------------------------]]
local function Button_OnClick(frame, ...)
AceGUI:ClearFocus()
PlaySound(PlaySoundKitID and "igMainMenuOption" or 852) -- SOUNDKIT.IG_MAINMENU_OPTION
PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION
frame.obj:Fire("OnClick", ...)
end
 
trunk/Stuf_Options/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1161 2017-08-12 14:30:16Z funkydude $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
343,9 → 343,9
if self.disabled then return end
self.value = not self.value
if self.value then
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOn" or 856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
else
PlaySound(PlaySoundKitID and "igMainMenuOptionCheckBoxOff" or 857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF
end
UpdateToggle(self)
self:Fire("OnValueChanged", self.value)
trunk/Stuf_Options/libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1,13 → 1,13
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
-- @class file
-- @name AceConfigDialog-3.0
-- @release $Id: AceConfigDialog-3.0.lua 1163 2017-08-14 14:04:39Z nevcairiel $
-- @release $Id: AceConfigDialog-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
 
local LibStub = LibStub
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")
 
local MAJOR, MINOR = "AceConfigDialog-3.0", 64
local MAJOR, MINOR = "AceConfigDialog-3.0", 66
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
740,7 → 740,7
else
validationErrorPopup(validated)
end
PlaySound(PlaySoundKitID and "igPlayerInviteDecline" or 882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || XXX _DECLINE is actually missing from the table
PlaySound(882) -- SOUNDKIT.IG_PLAYER_INVITE_DECLINE || _DECLINE is actually missing from the table
del(info)
return true
else
1034,6 → 1034,7
entry.value = k
entry.text = GetOptionsMemberValue("name", v, options, path, appName)
entry.icon = GetOptionsMemberValue("icon", v, options, path, appName)
entry.iconCoords = GetOptionsMemberValue("iconCoords", v, options, path, appName)
entry.disabled = CheckOptionDisabled(v, options, path, appName)
tinsert(tree,entry)
if recurse and (v.childGroups or "tree") == "tree" then
1226,6 → 1227,8
radio:SetWidth(width_multiplier * 2)
elseif width == "half" then
radio:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
radio:SetWidth(width_multiplier * width)
elseif width == "full" then
radio.width = "fill"
else
1288,6 → 1291,8
control:SetWidth(width_multiplier * 2)
elseif width == "half" then
control:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
control:SetWidth(width_multiplier * width)
elseif width == "full" then
control.width = "fill"
else
1324,6 → 1329,8
check:SetWidth(width_multiplier * 2)
elseif width == "half" then
check:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
control:SetWidth(width_multiplier * width)
elseif width == "full" then
check.width = "fill"
else
1405,6 → 1412,8
control:SetWidth(width_multiplier * 2)
elseif width == "half" then
control:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
control:SetWidth(width_multiplier * width)
elseif width == "full" then
control.width = "fill"
else
trunk/Stuf_Options/libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
8,10 → 8,10
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id: AceConfigRegistry-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
-- @release $Id: AceConfigRegistry-3.0.lua 1169 2018-02-27 16:18:28Z nevcairiel $
local CallbackHandler = LibStub("CallbackHandler-1.0")
 
local MAJOR, MINOR = "AceConfigRegistry-3.0", 17
local MAJOR, MINOR = "AceConfigRegistry-3.0", 18
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigRegistry then return end
67,6 → 67,7
local opttable={["nil"]=true,["table"]=true, _="table"}
local optbool={["nil"]=true,["boolean"]=true, _="boolean"}
local optboolnumber={["nil"]=true,["boolean"]=true,["number"]=true, _="boolean or number"}
local optstringnumber={["nil"]=true,["string"]=true,["number"]=true, _="string or number"}
 
local basekeys={
type=isstring,
90,7 → 91,7
set=optmethodfalse,
func=optmethodfalse,
arg={["*"]=true},
width=optstring,
width=optstringnumber,
}
 
local typedkeys={
trunk/Stuf_Range/libs/LibRangeCheck-2.0.lua
1,6 → 1,6
--[[
Name: LibRangeCheck-2.0
Revision: $Revision: 170 $
Revision: $Revision: 190 $
Author(s): mitch0
Website: http://www.wowace.com/projects/librangecheck-2-0/
Description: A range checking library based on interact distances and spell ranges
10,7 → 10,7
 
--- LibRangeCheck-2.0 provides an easy way to check for ranges and get suitable range checking functions for specific ranges.\\
-- The checkers use spell and item range checks, or interact based checks for special units where those two cannot be used.\\
-- The lib handles the refreshing of checker lists in case talents / spells / glyphs change and in some special cases when equipment changes (for example some of the mage pvp gloves change the range of the Fire Blast spell), and also handles the caching of items used for item-based range checks.\\
-- The lib handles the refreshing of checker lists in case talents / spells change and in some special cases when equipment changes (for example some of the mage pvp gloves change the range of the Fire Blast spell), and also handles the caching of items used for item-based range checks.\\
-- A callback is provided for those interested in checker changes.
-- @usage
-- local rc = LibStub("LibRangeCheck-2.0")
41,7 → 41,7
-- @class file
-- @name LibRangeCheck-2.0
local MAJOR_VERSION = "LibRangeCheck-2.0"
local MINOR_VERSION = tonumber(("$Revision: 170 $"):match("%d+")) + 100000
local MINOR_VERSION = tonumber(("$Revision: 190 $"):match("%d+")) + 100000
 
local lib, oldminor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then
52,11 → 52,13
 
local UpdateDelay = .5
local ItemRequestTimeout = 10.0
local FriendColor = 'ff22ff22'
local HarmColor = 'ffff2222'
 
-- interact distance based checks. ranges are based on my own measurements (thanks for all the folks who helped me with this)
local DefaultInteractList = {
[3] = 8,
[2] = 9,
-- [2] = 9,
[4] = 28,
}
 
64,12 → 66,12
local InteractLists = {
["Tauren"] = {
[3] = 6,
[2] = 7,
-- [2] = 7,
[4] = 25,
},
["Scourge"] = {
[3] = 7,
[2] = 8,
-- [2] = 8,
[4] = 27,
},
}
82,10 → 84,8
local HarmSpells = {}
 
FriendSpells["DEATHKNIGHT"] = {
47541, -- ["Death Coil"], -- 40
}
HarmSpells["DEATHKNIGHT"] = {
47541, -- ["Death Coil"], -- 40
49576, -- ["Death Grip"], -- 30
}
 
182,12 → 182,26
-- Items [Special thanks to Maldivia for the nice list]
 
local FriendItems = {
[5] = {
[1] = {
90175, -- Gin-Ji Knife Set -- doesn't seem to work for pets (always returns nil)
},
[2] = {
37727, -- Ruby Acorn
},
[6] = {
[3] = {
42732, -- Everfrost Razor
},
[4] = {
129055, -- Shoe Shine Kit
},
[5] = {
8149, -- Voodoo Charm
136605, -- Solendra's Compassion
63427, -- Worgsaw
},
[7] = {
61323, -- Ruby Seeds
},
[8] = {
34368, -- Attuned Crystal Cores
33278, -- Burning Torch
231,6 → 245,9
[35] = {
18904, -- Zorbin's Ultra-Shrinker
},
[38] = {
140786, -- Ley Spider Eggs
},
[40] = {
34471, -- Vial of the Sunwell
},
240,6 → 257,9
[50] = {
116139, -- Haunting Memento
},
[55] = {
74637, -- Kiryn's Poison Vial
},
[60] = {
32825, -- Soul Cannon
37887, -- Seeds of Nature's Wrath
250,18 → 270,40
[80] = {
35278, -- Reinforced Net
},
[90] = {
133925, -- Fel Lash
},
[100] = {
41058, -- Hyldnir Harpoon
},
[150] = {
46954, -- Flaming Spears
},
[200] = {
75208, -- Rancher's Lariat
},
}
 
local HarmItems = {
[5] = {
[1] = {
},
[2] = {
37727, -- Ruby Acorn
},
[6] = {
[3] = {
42732, -- Everfrost Razor
},
[4] = {
129055, -- Shoe Shine Kit
},
[5] = {
8149, -- Voodoo Charm
136605, -- Solendra's Compassion
63427, -- Worgsaw
},
[7] = {
61323, -- Ruby Seeds
},
[8] = {
34368, -- Attuned Crystal Cores
33278, -- Burning Torch
289,6 → 331,9
24269, -- Heavy Netherweave Net
18904, -- Zorbin's Ultra-Shrinker
},
[38] = {
140786, -- Ley Spider Eggs
},
[40] = {
28767, -- The Decapitator
},
299,6 → 344,9
[50] = {
116139, -- Haunting Memento
},
[55] = {
74637, -- Kiryn's Poison Vial
},
[60] = {
32825, -- Soul Cannon
37887, -- Seeds of Nature's Wrath
309,9 → 357,18
[80] = {
35278, -- Reinforced Net
},
[90] = {
133925, -- Fel Lash
},
[100] = {
33119, -- Malister's Frost Wand
},
[150] = {
46954, -- Flaming Spears
},
[200] = {
75208, -- Rancher's Lariat
},
}
 
-- This could've been done by checking player race as well and creating tables for those, but it's easier like this
355,6 → 412,7
local GetTime = GetTime
local HandSlotId = GetInventorySlotInfo("HandsSlot")
local math_floor = math.floor
local UnitIsVisible = UnitIsVisible
 
-- temporary stuff
 
454,8 → 512,8
end
 
-- minRange should be nil if there's no minRange, not 0
local function addChecker(t, range, minRange, checker)
local rc = { ["range"] = range, ["minRange"] = minRange, ["checker"] = checker }
local function addChecker(t, range, minRange, checker, info)
local rc = { ["range"] = range, ["minRange"] = minRange, ["checker"] = checker, ["info"] = info }
for i = 1, #t do
local v = t[i]
if rc.range == v.range then return end
469,6 → 527,18
 
local function createCheckerList(spellList, itemList, interactList)
local res = {}
if itemList then
for range, items in pairs(itemList) do
for i = 1, #items do
local item = items[i]
if GetItemInfo(item) then
addChecker(res, range, nil, checkers_Item[item], "item:" .. item)
break
end
end
end
end
 
if spellList then
for i = 1, #spellList do
local sid = spellList[i]
485,29 → 555,17
range = MeleeRange
end
if minRange then
addChecker(res, range, minRange, checkers_SpellWithMin[spellIdx])
addChecker(res, range, minRange, checkers_SpellWithMin[spellIdx], "spell:" .. sid .. ":" .. tostring(name))
else
addChecker(res, range, minRange, checkers_Spell[spellIdx])
addChecker(res, range, minRange, checkers_Spell[spellIdx], "spell:" .. sid .. ":" .. tostring(name))
end
end
end
end
 
if itemList then
for range, items in pairs(itemList) do
for i = 1, #items do
local item = items[i]
if GetItemInfo(item) then
addChecker(res, range, nil, checkers_Item[item])
break
end
end
end
end
 
if interactList and not next(res) then
for index, range in pairs(interactList) do
addChecker(res, range, nil, checkers_Interact[index])
addChecker(res, range, nil, checkers_Interact[index], "interact:" .. index)
end
end
 
516,31 → 574,23
 
-- returns minRange, maxRange or nil
local function getRange(unit, checkerList)
local min, max = 0, nil
for i = 1, #checkerList do
local rc = checkerList[i]
if not max or max > rc.range then
if rc.minRange then
local inRange, inMinRange = rc.checker(unit)
if inMinRange then
max = rc.minRange
elseif inRange then
min, max = rc.minRange, rc.range
elseif min > rc.range then
return min, max
else
return rc.range, max
end
elseif rc.checker(unit) then
max = rc.range
elseif min > rc.range then
return min, max
else
return rc.range, max
end
local lo, hi = 1, #checkerList
while lo <= hi do
local mid = math_floor((lo + hi) / 2)
local rc = checkerList[mid]
if rc.checker(unit) then
lo = mid + 1
else
hi = mid - 1
end
end
return min, max
if lo > #checkerList then
return 0, checkerList[#checkerList].range
elseif lo <= 1 then
return checkerList[1].range, nil
else
return checkerList[lo].range, checkerList[lo - 1].range
end
end
 
local function updateCheckers(origList, newList)
640,7 → 690,6
 
-- << Public API
 
 
 
--- The callback name that is fired when checkers are changed.
-- @field
659,9 → 708,9
 
-- returns the range estimate as a string
-- deprecated, use :getRange(unit) instead and build your own strings
-- (checkVisible is not used any more, kept for compatibility only)
-- @param checkVisible if set to true, then a UnitIsVisible check is made, and **nil** is returned if the unit is not visible
function lib:getRangeAsString(unit, checkVisible, showOutOfRange)
local minRange, maxRange = self:getRange(unit)
local minRange, maxRange = self:getRange(unit, checkVisible)
if not minRange then return nil end
if not maxRange then
return showOutOfRange and minRange .. " +" or nil
718,10 → 767,10
-- fall back to interact distance checks
if playerClass == "HUNTER" or playerRace == "Tauren" then
-- for hunters, use interact4 as it's safer
-- for Taurens interact4 is actually closer than 25yd and interact2 is closer than 8yd, so we can't use that
-- for Taurens interact4 is actually closer than 25yd and interact3 is closer than 8yd, so we can't use that
minRangeCheck = checkers_Interact[4]
else
minRangeCheck = checkers_Interact[2]
minRangeCheck = checkers_Interact[3]
end
end
 
853,15 → 902,20
 
--- Get a range estimate as **minRange**, **maxRange**.
-- @param unit the target unit to check range to.
-- @param checkVisible if set to true, then a UnitIsVisible check is made, and **nil** is returned if the unit is not visible
-- @return **minRange**, **maxRange** pair if a range estimate could be determined, **nil** otherwise. **maxRange** is **nil** if **unit** is further away than the highest possible range we can check.
-- Includes checks for unit validity and friendly/enemy status.
-- @usage
-- local rc = LibStub("LibRangeCheck-2.0")
-- local minRange, maxRange = rc:GetRange('target')
function lib:GetRange(unit)
-- local minRangeIfVisible, maxRangeIfVisible = rc:GetRange('target', true)
function lib:GetRange(unit, checkVisible)
if not UnitExists(unit) then
return nil
end
if checkVisible and not UnitIsVisible(unit) then
return nil
end
if UnitIsDeadOrGhost(unit) then
return getRange(unit, self.miscRC)
end
897,18 → 951,6
self:scheduleInit()
end
 
function lib:GLYPH_ADDED()
self:scheduleInit()
end
 
function lib:GLYPH_REMOVED()
self:scheduleInit()
end
 
function lib:GLYPH_UPDATED()
self:scheduleInit()
end
 
function lib:SPELLS_CHANGED()
self:scheduleInit()
end
995,7 → 1037,6
self.frame:Show()
end
 
 
 
-- << load-time initialization
 
1006,9 → 1047,6
frame:RegisterEvent("LEARNED_SPELL_IN_TAB")
frame:RegisterEvent("CHARACTER_POINTS_CHANGED")
frame:RegisterEvent("PLAYER_TALENT_UPDATE")
frame:RegisterEvent("GLYPH_ADDED")
frame:RegisterEvent("GLYPH_REMOVED")
frame:RegisterEvent("GLYPH_UPDATED")
frame:RegisterEvent("SPELLS_CHANGED")
local _, playerClass = UnitClass("player")
if playerClass == "MAGE" or playerClass == "SHAMAN" then
trunk/Stuf_Range/Stuf_Range.toc
1,4 → 1,4
## Interface: 70300
## Interface: 80000
## Title: Stuf_Range
## Author: TotalPackage
## Notes: Displays estimate distance using LibRangeCheck-2.0.
trunk/Stuf/text.lua
355,7 → 355,7
f:SetInsertMode("BOTTOM")
uf.refreshfuncs[name] = ClearCombatText
Stuf:AddEvent("UNIT_COMBAT", UpdateCombatText)
Stuf:AddEvent("UNIT_SPELLMISS", UpdateCombatText)
--Stuf:AddEvent("UNIT_SPELLMISS", UpdateCombatText)
else
f:Show()
end
trunk/Stuf/Stuf.toc
1,8 → 1,8
## Interface: 70300
## Interface: 80000
## Title: Stuf Unit Frames
## Author: TotalPackage
## Notes: Main unitframes replacement. Assembly optional.
## Version: 7.3.001
## Version: 8.0.001
 
## SavedVariables: StufDB
## SavedVariablesPerCharacter: StufCharDB
trunk/Stuf/aura.lua
452,7 → 452,7
if iswarlock then
if UnitCreatureFamily("pet") == "Felhunter" then
for i = 1, 40, 1 do
name, _, icon, count, atype = UnitDebuff(unit, i)
name, icon, count, atype = UnitDebuff(unit, i)
if not name or atype == "Magic" then
break
else
461,7 → 461,7
end
end
else
name, _, icon, count, atype = UnitDebuff(unit, 1, "RAID")
name, icon, count, atype = UnitDebuff(unit, 1, "RAID")
end
if name then
local dc = dbgaura[atype or "none"] or dbgaura.none
trunk/Stuf/libs/LibSharedMedia-3.0/LibSharedMedia-3.0/lib.xml
1,4 → 1,4
<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="LibSharedMedia-3.0.lua" />
</Ui>
\ No newline at end of file +
trunk/Stuf/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.toc
1,19 → 1,15
## Interface: 70100
## Interface: 80000
## LoadOnDemand: 1
## X-Curse-Packaged-Version: 7.1.0
## X-Curse-Project-Name: LibSharedMedia-3.0
## X-Curse-Project-ID: libsharedmedia-3-0
## X-Curse-Repository-ID: wow/libsharedmedia-3-0/mainline
 
## Title: Lib: SharedMedia-3.0
## Notes: Shared handling of media data (fonts, sounds, textures, ...) between addons.
## Author: Elkano
## Version: 3.0-97
## Version: 3.0-102
## X-Website: http://www.wowace.com/projects/libsharedmedia-3-0/
## X-Category: Library
 
## X-Revision: 97
## X-Date: 2016-10-25T23:54:36Z
## X-Revision: 102
## X-Date: 2018-07-17T19:25:42Z
 
LibStub\LibStub.lua
CallbackHandler-1.0\CallbackHandler-1.0.lua
trunk/StufRaid/libs/LibSharedMedia-3.0/LibSharedMedia-3.0/lib.xml
1,4 → 1,4
<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="LibSharedMedia-3.0.lua" />
</Ui>
\ No newline at end of file +
trunk/StufRaid/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.toc
1,19 → 1,15
## Interface: 70100
## Interface: 80000
## LoadOnDemand: 1
## X-Curse-Packaged-Version: 7.1.0
## X-Curse-Project-Name: LibSharedMedia-3.0
## X-Curse-Project-ID: libsharedmedia-3-0
## X-Curse-Repository-ID: wow/libsharedmedia-3-0/mainline
 
## Title: Lib: SharedMedia-3.0
## Notes: Shared handling of media data (fonts, sounds, textures, ...) between addons.
## Author: Elkano
## Version: 3.0-97
## Version: 3.0-102
## X-Website: http://www.wowace.com/projects/libsharedmedia-3-0/
## X-Category: Library
 
## X-Revision: 97
## X-Date: 2016-10-25T23:54:36Z
## X-Revision: 102
## X-Date: 2018-07-17T19:25:42Z
 
LibStub\LibStub.lua
CallbackHandler-1.0\CallbackHandler-1.0.lua
trunk/StufRaid/StufRaid.toc
1,8 → 1,8
## Interface: 70300
## Interface: 80000
## Title: Stuf Raid Frames
## Author: TotalPackage
## Notes: Raid unit frames. Assembly optional. (Does not require Stuf)
## Version: 7.3.001
## Version: 8.0.001
 
## SavedVariables: StufRaidDB
## SavedVariablesPerCharacter: StufRaidCharLayoutDB, StufRaidCharDB
trunk/StufRaid/core.lua
702,14 → 702,14
queueaura("Interface\\GossipFrame\\BinderGossipIcon.blp", 0, 0, nil, nil, "Vehicle")
end
for i = 1, 32, 1 do -- check for alerts from buffs
local bname, _, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i)
local bname, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i)
if not bname then break end
if balert[bname] then
queueaura(bicon, bcount, 0, bduration, bendtime, bname)
end
end
for i = 1, 40, 1 do -- check for alerts from debuffs
local dname, _, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i)
local dname, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i)
if not dname then break end
if dalert[dname] then
queueaura(dicon, dcount, dtype, dduration, dendtime, dname)
819,7 → 819,7
a.debuff_funcs = {
raid = function(u, count) -- what blizzard labels as curable debuffs
for i = 1, count, 1 do
local dname, _, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i, "RAID")
local dname, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i, "RAID")
if not dname then break end
if not dexclude[dname] then
queueaura(dicon, dcount, dtype, dduration, dendtime, dname)
827,7 → 827,7
end
if not dinclude then return end
for i = 1, 40, 1 do -- in addition to curable, include these also
local dname, _, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i)
local dname, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i)
if not dname then break end
if dinclude[dname] then
queueaura(dicon, dcount, dtype, dduration, dendtime, dname)
836,7 → 836,7
end,
all = function(u, count) -- all debuffs are shown, no filter of any kind is applied
for i = 1, count, 1 do
local dname, _, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i)
local dname, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i)
if not dname then break end
if not dexclude[dname] then
queueaura(dicon, dcount, dtype, dduration, dendtime, dname)
846,7 → 846,7
justinclude = function(u, count) -- only include debuffs that are found in the filter
if not dinclude then return end
for i = 1, 40, 1 do
local dname, _, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i)
local dname, dicon, dcount, dtype, dduration, dendtime = UnitDebuff(u, i)
if not dname then break end
if dinclude[dname] then
queueaura(dicon, dcount, dtype, dduration, dendtime, dname)
858,7 → 858,7
a.buff_funcs = {
raid = function(u, count) -- blizzard's castable buffs, both include and exclude filter is applied
for i = 1, count, 1 do
local bname, _, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i, "RAID")
local bname, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i, "RAID")
if not bname then break end
if not bexclude[bname] then
queueaura(bicon, bcount, 0, bduration, bendtime, bname)
866,7 → 866,7
end
if not binclude then return end
for i = 1, 32, 1 do -- in addition to castable, include these also
local bname, _, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i)
local bname, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i)
if not bname then break end
if binclude[bname] then
queueaura(bicon, bcount, 0, bduration, bendtime, bname)
875,7 → 875,7
end,
all = function(u, count) -- show all buffs, no filter of any kind is applied
for i = 1, count, 1 do
local bname, _, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i)
local bname, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i)
if not bname then break end
if not bexclude[bname] then
queueaura(bicon, bcount, 0, bduration, bendtime, bname)
885,7 → 885,7
mine = function(u, count) -- only show player buffs, exclude filter is applied
if not bexclude then return end
for i = 1, 32, 1 do
local bname, _, bicon, bcount, _, bduration, bendtime, bismine = UnitBuff(u, i)
local bname, bicon, bcount, _, bduration, bendtime, bismine = UnitBuff(u, i)
if not bname or not (bismine == "player" or bismine == "vehicle") then break end
if not bexclude[bname] then
queueaura(bicon, bcount, 0, bduration, bendtime, bname)
895,7 → 895,7
mineinclude = function(u, count) -- only show player buffs that are in the include filter
if not binclude then return end
for i = 1, 32, 1 do
local bname, _, bicon, bcount, _, bduration, bendtime, bismine = UnitBuff(u, i)
local bname, bicon, bcount, _, bduration, bendtime, bismine = UnitBuff(u, i)
if not bname or not (bismine == "player" or bismine == "vehicle") then break end
if binclude[bname] then
queueaura(bicon, bcount, 0, bduration, bendtime, bname)
905,7 → 905,7
justinclude = function(u, count)
if not binclude then return end
for i = 1, 32, 1 do
local bname, _, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i)
local bname, bicon, bcount, _, bduration, bendtime = UnitBuff(u, i)
if not bname then break end
if binclude[bname] then
queueaura(bicon, bcount, 0, bduration, bendtime, bname)