WoWInterface SVN LovelyLoot

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 9 to Rev 10
    Reverse comparison

Rev 9 → Rev 10

trunk/LovelyLoot/LovelyLoot.toc
1,7 → 1,7
## Interface: 40300
## Interface: 50001
## Title: LovelyLoot
## Author: Seerah
## Version: 1.1.1
## Version: 2.0a
## Notes: Making the loot frames more lovely to look at and work with.
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, rActionButtonStyler, ButtonFacade
## SavedVariables: LovelyLootDB
trunk/LovelyLoot/libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
2,7 → 2,7
ScrollFrame Container
Plain container that scrolls its content and doesn't grow in height.
-------------------------------------------------------------------------------]]
local Type, Version = "ScrollFrame", 21
local Type, Version = "ScrollFrame", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
42,6 → 42,7
local methods = {
["OnAcquire"] = function(self)
self:SetScroll(0)
self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate)
end,
 
["OnRelease"] = function(self)
trunk/LovelyLoot/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
2,7 → 2,7
Button Widget
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "Button", 21
local Type, Version = "Button", 22
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
13,6 → 13,12
local _G = _G
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
 
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
 
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
63,7 → 69,7
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate2")
local frame = CreateFrame("Button", name, UIParent, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
frame:Hide()
 
frame:EnableMouse(true)
trunk/LovelyLoot/libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
2,7 → 2,7
Label Widget
Displays text and optionally an icon.
-------------------------------------------------------------------------------]]
local Type, Version = "Label", 21
local Type, Version = "Label", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
43,7 → 43,11
else
-- image on the left
image:SetPoint("TOPLEFT")
label:SetPoint("TOPLEFT", image, "TOPRIGHT", 4, 0)
if image:GetHeight() > label:GetHeight() then
label:SetPoint("LEFT", image, "RIGHT", 4, 0)
else
label:SetPoint("TOPLEFT", image, "TOPRIGHT", 4, 0)
end
label:SetWidth(width - imagewidth - 4)
height = max(image:GetHeight(), label:GetHeight())
end
trunk/LovelyLoot/libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
1,4 → 1,4
local Type, Version = "MultiLineEditBox", 25
local Type, Version = "MultiLineEditBox", 27
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
14,9 → 14,32
-- List them here for Mikk's FindGlobals script
-- GLOBALS: ACCEPT, ChatFontNormal
 
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
 
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
 
if not AceGUIMultiLineEditBoxInsertLink then
-- upgradeable hook
hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIMultiLineEditBoxInsertLink(...) end)
end
 
function _G.AceGUIMultiLineEditBoxInsertLink(text)
for i = 1, AceGUI:GetWidgetCount(Type) do
local editbox = _G[("MultiLineEditBox%uEdit"):format(i)]
if editbox and editbox:IsVisible() and editbox:HasFocus() then
editbox:Insert(text)
return true
end
end
end
 
 
local function Layout(self)
self:SetHeight(self.numlines * 14 + (self.disablebutton and 19 or 41) + self.labelHeight)
 
262,7 → 285,7
label:SetText(ACCEPT)
label:SetHeight(10)
 
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate2")
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
button:SetPoint("BOTTOMLEFT", 0, 4)
button:SetHeight(22)
button:SetWidth(label:GetStringWidth() + 24)
301,7 → 324,7
scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
 
local editBox = CreateFrame("EditBox", nil, scrollFrame)
local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame)
editBox:SetAllPoints()
editBox:SetFontObject(ChatFontNormal)
editBox:SetMultiLine(true)
trunk/LovelyLoot/libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
2,7 → 2,7
TabGroup Container
Container that uses tabs on top to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TabGroup", 34
local Type, Version = "TabGroup", 35
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
23,13 → 23,6
local rowwidths = {}
local rowends = {}
 
-- Determine if we're on WoW 4.0.6 or not.
local wow_406
do
local _,wow_build = GetBuildInfo()
wow_406 = tonumber(wow_build) >= 13596
end
 
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
46,11 → 39,7
local function Tab_SetText(frame, text)
frame:_SetText(text)
local width = frame.obj.frame.width or frame.obj.frame:GetWidth() or 0
if wow_406 then
PanelTemplates_TabResize(frame, 0, nil, nil, width, frame:GetFontString():GetStringWidth())
else
PanelTemplates_TabResize(frame, 0, nil, width)
end
PanelTemplates_TabResize(frame, 0, nil, nil, width, frame:GetFontString():GetStringWidth())
end
 
local function Tab_SetSelected(frame, selected)
267,11 → 256,7
end
 
for i = starttab, endtab do
if wow_406 then
PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width, tabs[i]:GetFontString():GetStringWidth())
else
PanelTemplates_TabResize(tabs[i], padding + 4, nil, width)
end
PanelTemplates_TabResize(tabs[i], padding + 4, nil, nil, width, tabs[i]:GetFontString():GetStringWidth())
end
starttab = endtab + 1
end
trunk/LovelyLoot/libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
2,7 → 2,7
Keybinding Widget
Set Keybindings in the Config UI.
-------------------------------------------------------------------------------]]
local Type, Version = "Keybinding", 22
local Type, Version = "Keybinding", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
17,6 → 17,12
-- List them here for Mikk's FindGlobals script
-- GLOBALS: NOT_BOUND
 
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
 
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
174,7 → 180,7
local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
 
local frame = CreateFrame("Frame", nil, UIParent)
local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate2")
local button = CreateFrame("Button", name, frame, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
 
button:EnableMouse(true)
button:RegisterForClicks("AnyDown")
204,6 → 210,7
msgframe:SetBackdropColor(0,0,0)
msgframe:SetFrameStrata("FULLSCREEN_DIALOG")
msgframe:SetFrameLevel(1000)
msgframe:SetToplevel(true)
 
local msg = msgframe:CreateFontString(nil, "OVERLAY", "GameFontNormal")
msg:SetText("Press a key to bind, ESC to clear the binding or click the button again to cancel.")
trunk/LovelyLoot/libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
Checkbox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "CheckBox", 21
local Type, Version = "CheckBox", 22
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
102,6 → 102,9
self.frame:Disable()
self.text:SetTextColor(0.5, 0.5, 0.5)
SetDesaturation(self.check, true)
if self.desc then
self.desc:SetTextColor(0.5, 0.5, 0.5)
end
else
self.frame:Enable()
self.text:SetTextColor(1, 1, 1)
110,6 → 113,9
else
SetDesaturation(self.check, false)
end
if self.desc then
self.desc:SetTextColor(1, 1, 1)
end
end
end,
 
trunk/LovelyLoot/libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
Frame Container
-------------------------------------------------------------------------------]]
local Type, Version = "Frame", 23
local Type, Version = "Frame", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
83,6 → 83,7
self:SetStatusText()
self:ApplyStatus()
self:Show()
self:EnableResize(true)
end,
 
["OnRelease"] = function(self)
trunk/LovelyLoot/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
1,6 → 1,6
--[[
--[[
Name: LibSharedMedia-3.0
Revision: $Revision: 62 $
Revision: $Revision: 74 $
Author: Elkano (elkano@gmx.de)
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
9,7 → 9,7
License: LGPL v2.1
]]
 
local MAJOR, MINOR = "LibSharedMedia-3.0", 100001 -- increase manualy on changes
local MAJOR, MINOR = "LibSharedMedia-3.0", 5000402 -- 5.0.4 v2 / increase manually on changes
local lib = LibStub:NewLibrary(MAJOR, MINOR)
 
if not lib then return end
59,6 → 59,7
-- populate lib with default Blizzard data
-- BACKGROUND
if not lib.MediaTable.background then lib.MediaTable.background = {} end
lib.MediaTable.background["None"] = [[]]
lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]]
lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
71,20 → 72,45
lib.MediaTable.background["Blizzard Tabard Background"] = [[Interface\TabardFrame\TabardFrameBackground]]
lib.MediaTable.background["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Background]]
lib.MediaTable.background["Solid"] = [[Interface\Buttons\WHITE8X8]]
lib.DefaultMedia.background = "None"
 
-- BORDER
if not lib.MediaTable.border then lib.MediaTable.border = {} end
lib.MediaTable.border["None"] = [[Interface\None]]
lib.MediaTable.border["None"] = [[]]
lib.MediaTable.border["Blizzard Achievement Wood"] = [[Interface\AchievementFrame\UI-Achievement-WoodBorder]]
lib.MediaTable.border["Blizzard Chat Bubble"] = [[Interface\Tooltips\ChatBubble-Backdrop]]
lib.MediaTable.border["Blizzard Dialog"] = [[Interface\DialogFrame\UI-DialogBox-Border]]
lib.MediaTable.border["Blizzard Dialog Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Border]]
lib.MediaTable.border["Blizzard Party"] = [[Interface\CHARACTERFRAME\UI-Party-Border]]
lib.MediaTable.border["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Border]]
lib.DefaultMedia.border = "None"
 
-- FONT
if not lib.MediaTable.font then lib.MediaTable.font = {} end
local SML_MT_font = lib.MediaTable.font
--[[
file name latin koKR ruRU zhCN zhTW
2002.ttf 2002 X X X - -
2002B.ttf 2002 Bold X X X - -
ARHei.ttf AR CrystalzcuheiGBK Demibold X - X X X
ARIALN.TTF Arial Narrow X - X - -
ARKai_C.ttf AR ZhongkaiGBK Medium (Combat) X - X X X
ARKai_T.ttf AR ZhongkaiGBK Medium X - X X X
bHEI00M.ttf AR Heiti2 Medium B5 - - - - X
bHEI01B.ttf AR Heiti2 Bold B5 - - - - X
bKAI00M.ttf AR Kaiti Medium B5 - - - - X
bLEI00D.ttf AR Leisu Demi B5 - - - - X
FRIZQT__.TTF Friz Quadrata TT X - - - -
FRIZQT___CYR.TTF FrizQuadrataCTT - - X - -
K_Damage.TTF YDIWingsM - X X - -
K_Pagetext.TTF MoK X X X - -
MORPHEUS.TTF Morpheus X - - - -
MORPHEUS_CYR.TTF Morpheus X - X - -
NIM_____.ttf Nimrod MT X - X - -
SKURRI.TTF Skurri X - - - -
SKURRI_CYR.TTF Skurri X - X - -
]]
 
if locale == "koKR" then
LOCALE_MASK = lib.LOCALE_BIT_koKR
--
98,9 → 124,9
elseif locale == "zhCN" then
LOCALE_MASK = lib.LOCALE_BIT_zhCN
--
SML_MT_font["伤害数字"] = [[Fonts\ZYKai_C.ttf]]
SML_MT_font["默认"] = [[Fonts\ZYKai_T.ttf]]
SML_MT_font["聊天"] = [[Fonts\ZYHei.ttf]]
SML_MT_font["伤害数字"] = [[Fonts\ARKai_C.ttf]]
SML_MT_font["默认"] = [[Fonts\ARKai_T.ttf]]
SML_MT_font["聊天"] = [[Fonts\ARHei.ttf]]
--
lib.DefaultMedia["font"] = "默认" -- someone from zhCN please adjust if needed
--
117,11 → 143,17
elseif locale == "ruRU" then
LOCALE_MASK = lib.LOCALE_BIT_ruRU
--
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]]
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]]
SML_MT_font["2002"] = [[Fonts\2002.TTF]]
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT___CYR.TTF]]
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
--
lib.DefaultMedia.font = "Friz Quadrata TT"
--
129,10 → 161,17
LOCALE_MASK = lib.LOCALE_BIT_western
locale_is_western = true
--
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]]
SML_MT_font["2002"] = [[Fonts\2002.TTF]]
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
--
lib.DefaultMedia.font = "Friz Quadrata TT"
--
142,6 → 181,7
if not lib.MediaTable.statusbar then lib.MediaTable.statusbar = {} end
lib.MediaTable.statusbar["Blizzard"] = [[Interface\TargetingFrame\UI-StatusBar]]
lib.MediaTable.statusbar["Blizzard Character Skills Bar"] = [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]]
lib.MediaTable.statusbar["Blizzard Raid Bar"] = [[Interface\RaidFrame\Raid-Bar-Hp-Fill]]
lib.DefaultMedia.statusbar = "Blizzard"
 
-- SOUND
186,8 → 226,7
local mtt = mediaTable[mediatype]
local overridekey = overrideMedia[mediatype]
local result = mtt and ((overridekey and mtt[overridekey] or mtt[key]) or (not noDefault and defaultMedia[mediatype] and mtt[defaultMedia[mediatype]])) or nil
 
return result
return result ~= "" and result or nil
end
 
function lib:IsValid(mediatype, key)
trunk/LovelyLoot/libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
1,7 → 1,7
--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
-- @class file
-- @name AceConfigCmd-3.0
-- @release $Id: AceConfigCmd-3.0.lua 904 2009-12-13 11:56:37Z nevcairiel $
-- @release $Id: AceConfigCmd-3.0.lua 1045 2011-12-09 17:58:40Z nevcairiel $
 
--[[
AceConfigCmd-3.0
15,7 → 15,7
-- TODO: plugin args
 
 
local MAJOR, MINOR = "AceConfigCmd-3.0", 12
local MAJOR, MINOR = "AceConfigCmd-3.0", 13
local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigCmd then return end
642,7 → 642,14
 
local r, g, b, a
 
if tab.hasAlpha then
local hasAlpha = tab.hasAlpha
if type(hasAlpha) == "function" or type(hasAlpha) == "string" then
info.hasAlpha = hasAlpha
hasAlpha = callmethod(info, inputpos, tab, 'hasAlpha')
info.hasAlpha = nil
end
 
if hasAlpha then
if str:len() == 8 and str:find("^%x*$") then
--parse a hex string
r,g,b,a = tonumber(str:sub(1, 2), 16) / 255, tonumber(str:sub(3, 4), 16) / 255, tonumber(str:sub(5, 6), 16) / 255, tonumber(str:sub(7, 8), 16) / 255
trunk/LovelyLoot/libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
8,8 → 8,8
-- :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 998 2010-12-01 18:39:53Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 13
-- @release $Id: AceConfigRegistry-3.0.lua 1045 2011-12-09 17:58:40Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 14
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigRegistry then return end
162,7 → 162,7
dropdownControl=optstring,
},
color={
hasAlpha=optbool,
hasAlpha=optmethodbool,
},
keybinding={
-- TODO
trunk/LovelyLoot/libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1,10 → 1,10
--- 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 998 2010-12-01 18:39:53Z nevcairiel $
-- @release $Id: AceConfigDialog-3.0.lua 1049 2012-04-02 13:22:10Z mikk $
 
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 54
local MAJOR, MINOR = "AceConfigDialog-3.0", 57
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
21,10 → 21,10
local reg = LibStub("AceConfigRegistry-3.0")
 
-- Lua APIs
local tconcat, tinsert, tsort, tremove = table.concat, table.insert, table.sort, table.remove
local tconcat, tinsert, tsort, tremove, tsort = table.concat, table.insert, table.sort, table.remove, table.sort
local strmatch, format = string.match, string.format
local assert, loadstring, error = assert, loadstring, error
local pairs, next, select, type, unpack, wipe = pairs, next, select, type, unpack, wipe
local pairs, next, select, type, unpack, wipe, ipairs = pairs, next, select, type, unpack, wipe, ipairs
local rawset, tostring, tonumber = rawset, tostring, tonumber
local math_min, math_max, math_floor = math.min, math.max, math.floor
 
580,6 → 580,7
t.text = message
t.button1 = ACCEPT
t.button2 = CANCEL
t.preferredIndex = 3
local dialog, oldstrata
t.OnAccept = function()
safecall(func, unpack(t))
1184,8 → 1185,14
control.width = "fill"
 
control:PauseLayout()
local optionValue = GetOptionsMemberValue("get",v, options, path, appName, value)
local optionValue = GetOptionsMemberValue("get",v, options, path, appName)
local t = {}
for value, text in pairs(values) do
t[#t+1]=value
end
tsort(t)
for k, value in ipairs(t) do
local text = values[value]
local radio = gui:Create("CheckBox")
radio:SetLabel(text)
radio:SetUserData("value", value)
1315,7 → 1322,7
elseif v.type == "color" then
control = gui:Create("ColorPicker")
control:SetLabel(name)
control:SetHasAlpha(v.hasAlpha)
control:SetHasAlpha(GetOptionsMemberValue("hasAlpha",v, options, path, appName))
control:SetColor(GetOptionsMemberValue("get",v, options, path, appName))
control:SetCallback("OnValueChanged",ActivateControl)
control:SetCallback("OnValueConfirmed",ActivateControl)
trunk/LovelyLoot/lloot.lua
1,10 → 1,10
--starting over from scratch! LL 2.0
local LL = CreateFrame("Frame")
local llmodel = CreateFrame("PlayerModel", nil, LootFrame)
local LootFrame = LootFrame
local emptyFunc = function() end
local LSM = LibStub("LibSharedMedia-3.0")
local widgetLists = AceGUIWidgetLSMlists
local frames = {LootFrame, GroupLootFrame1, GroupLootFrame2, GroupLootFrame3, GroupLootFrame4}
local frames = {LootFrame}
local LootFrame = LootFrame
local SkinFrames, db, colorR, colorG, colorB
 
local defaultValues = {
41,19 → 41,6
end,
order = .4,
},
glfUnlocked = {
name = "Unlock GroupLootFrames",
desc = "If checked, the first (bottom) GroupLootFrame is unlocked and you can drag it on your screen. The rest will follow suit. (NOTE: The unless using another addon to move them, the achievement popups are anchored to the group loot frames as well.)",
type = "toggle",
get = function() return db.glfUnlocked end,
set = function()
db.glfUnlocked = not db.glfUnlocked
GroupLootFrame1:SetMovable(db.glfUnlocked)
GroupLootFrame1:EnableMouse(db.glfUnlocked)
GroupLootFrame1:SetUserPlaced(db.glfUnlocked)
end,
order = .5,
},
spacer1 = {
name = " ",
type = "description",
94,7 → 81,7
db.bgColor.b = b
db.bgColor.a = a
for k,v in pairs(frames) do
SkinFrames(v, true)
SkinFrames(v)
end
end,
order = 2,
128,7 → 115,7
db.borderColor.b = b
db.borderColor.a = a
for k,v in pairs(frames) do
SkinFrames(v, true)
SkinFrames(v)
end
end,
order = 4,
165,52 → 152,6
end,
order = 6,
},
sbar = {
name = "Timer bar texture",
desc = "Texture to use for the timer bar on the group loot frames.",
type = "select",
dialogControl = "LSM30_Statusbar",
values = widgetLists.statusbar,
get = function()
return db.sbar
end,
set = function(self, sbar)
db.sbar = sbar
for k,v in pairs(frames) do
SkinFrames(v, true)
end
end,
order = 7,
},
sbarcolor = {
name = "Timer bar color",
desc = "The color of the timer bar for the group loot frames.",
type = "color",
hasAlpha = false,
get = function() return db.sbarColor.r, db.sbarColor.g, db.sbarColor.b end,
set = function(_,r,g,b)
db.sbarColor.r = r
db.sbarColor.g = g
db.sbarColor.b = b
for k,v in pairs(frames) do
SkinFrames(v, true)
end
end,
order = 8,
},
hideDragon = {
name = "Hide Elite Dragon",
desc = "Hides the dragon on group loot frames when looting from an elite npc.",
type = "toggle",
get = function() return db.hideDragon end,
set = function()
db.hideDragon = not db.hideDragon
for k,v in pairs(frames) do
SkinFrames(v, true)
end
end,
order = 8.5,
},
spacer4 = {
name = " ",
type = "description",
267,52 → 208,55
}
 
 
--generic bg/border changing
function SkinFrames(frame, config)
--print("skinned: "..frame:GetName())
--frame:SetBackdrop({
frame.OLDSetBackdrop(frame, {
function SkinFrames(frame)
frame:SetBackdrop({
bgFile = LSM:Fetch("background", db.bg),
edgeFile = LSM:Fetch("border", db.border),
--tile = true,
--tileSize = 8,
edgeSize = db.borderWidth,
insets = {left=db.inset,right=db.inset,top=db.inset,bottom=db.inset}
})
--if config then --this code only needs run if called by the options window or at startup
frame:SetBackdropColor(db.bgColor.r, db.bgColor.g, db.bgColor.b, db.bgColor.a)
frame:SetBackdropBorderColor(db.borderColor.r, db.borderColor.g, db.borderColor.b, db.borderColor.a)
if frame ~= LootFrame then
_G[frame:GetName().."Timer"]:SetStatusBarTexture(LSM:Fetch("statusbar", db.sbar))
_G[frame:GetName().."Timer"]:SetStatusBarColor(db.sbarColor.r, db.sbarColor.g, db.sbarColor.b, db.sbarColor.a)
if db.hideDragon then
_G[frame:GetName().."Decoration"]:SetTexture()
else
_G[frame:GetName().."Decoration"]:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Gold-Dragon")
end
end
--end
frame:SetBackdropColor(db.bgColor.r, db.bgColor.g, db.bgColor.b, db.bgColor.a)
frame:SetBackdropBorderColor(db.borderColor.r, db.borderColor.g, db.borderColor.b, db.borderColor.a)
 
end
 
--The regular loot frame--
local function LootFrameEdits()
local portrait, bg, title, prevtext, nextext = LootFrame:GetRegions()
local bg, titlebg, portrait, portraitframe, trcorner, tlcorner, top,
unknowntitle, topstreak, blcorner, brcorner, bottom, left, right, btncornerL,
btncornerR, btnbottom, portraitoverlay, title, prevtext, nextext = LootFrame:GetRegions()
 
--hide extras
bg:Hide()
titlebg:Hide()
portrait:Hide()
portraitframe:Hide()
trcorner:Hide()
tlcorner:Hide()
top:Hide()
topstreak:Hide()
blcorner:Hide()
brcorner:Hide()
bottom:Hide()
left:Hide()
right:Hide()
portraitoverlay:Hide()
btncornerL:Hide()
btncornerR:Hide()
btnbottom:Hide()
LootFrameInset:Hide()
 
--rearrange stuff
LootFrameUpButton:ClearAllPoints()
LootFrameUpButton:SetPoint("BOTTOMLEFT", 15, 16)
LootFrameUpButton:SetPoint("BOTTOMLEFT", 12, 12)
LootFrameDownButton:ClearAllPoints()
LootFrameDownButton:SetPoint("BOTTOMLEFT", 133, 16)
LootFrameDownButton:SetPoint("BOTTOMRIGHT", -12, 12)
prevtext:ClearAllPoints()
prevtext:SetPoint("BOTTOMLEFT", 47, 27)
prevtext:SetPoint("LEFT", LootFrameUpButton, "RIGHT", 3, 0)
nextext:ClearAllPoints()
nextext:SetPoint("BOTTOMRIGHT", LootFrame, "BOTTOMLEFT", 132, 27)
LootCloseButton:ClearAllPoints()
LootCloseButton:SetPoint("TOPRIGHT", -2, 0)
nextext:SetPoint("RIGHT", LootFrameDownButton, "LEFT", -3, 0)
LootFrameCloseButton:ClearAllPoints()
LootFrameCloseButton:SetPoint("TOPRIGHT", -2, 0)
title:ClearAllPoints()
title:SetPoint("TOP", 0, -10)
LootButton1:ClearAllPoints()
323,22 → 267,19
end
 
--resize actual loot frame
LootFrame:SetWidth(179)
LootFrame:SetSize(179,250)
LootFrame:SetHitRectInsets(0,0,0,0)
 
--keep it from being moved by the UI
--we can still drag it, but now it'll stay put
--it even gets saved in layout-local.txt for us!
UIPanelWindows["LootFrame"] = nil
--LootFrame.ClearAllPoints = emptyFunc
--LootFrame.SetPoint = emptyFunc
--lock/unlock it
 
--make it movable
LootFrame:EnableMouse(db.lfUnlocked)
LootFrame:SetUserPlaced(true)
LootFrame:RegisterForDrag("LeftButton")
LootFrame:SetScript("OnDragStart", function() LootFrame:StartMoving() end)
LootFrame:SetScript("OnDragStop", function() LootFrame:StopMovingOrSizing() end)
 
--keep it from being moved by frames in the UI
UIPanelWindows["LootFrame"] = nil
 
--give loot frame a backdrop instead of using the bg texture
--SkinFrames(LootFrame, true)
 
--setup model
llmodel:SetPoint("TOPLEFT", 15, -30)
llmodel:SetPoint("TOPRIGHT", -15, -30)
352,7 → 293,7
})
llmodel:SetBackdropColor(.2,.2,.2,.5)
 
--skin icons
--skin icons with rABS
if IsAddOnLoaded("rActionButtonStyler") then
colorR,colorG,colorB = ActionButton1NormalTexture:GetVertexColor()
for i = 1, 4 do
372,82 → 313,6
end
end
 
--group loot frames
local function GroupLootFrames()
--move frames
local GroupLootFrame1 = GroupLootFrame1
GroupLootFrame1:SetScript("OnMouseDown", function(self)
self:StartMoving()
end)
GroupLootFrame1:SetScript("OnMouseUp", function(self)
self:StopMovingOrSizing()
db.rollAnchor.anch1, _, db.rollAnchor.anch2, db.rollAnchor.xpos, db.rollAnchor.ypos = self:GetPoint()
end)
GroupLootFrame1:ClearAllPoints()
GroupLootFrame1:SetPoint(db.rollAnchor.anch1, UIParent, db.rollAnchor.anch2, db.rollAnchor.xpos, db.rollAnchor.ypos)
--lock/unlock
GroupLootFrame1:SetMovable(db.glfUnlocked)
GroupLootFrame1:EnableMouse(db.glfUnlocked)
GroupLootFrame1:SetUserPlaced(db.glfUnlocked)
 
--skinning frames needs to be done on each show to override
--default UI's changing the bg/border
--using the event is too early
--hooksecurefunc("GroupLootFrame_OnShow", function(frame) print("frame: "..frame:GetName()) SkinFrames(frame) end)
--local OLDGroupLootFrame_OnShow = GroupLootFrame_OnShow
--GroupLootFrame_OnShow = function(self)
--OLDGroupLootFrame_OnShow(self)
--SkinFrames(self)
--end
 
--rearrange stuff
local frame
for i = 1,4 do
frame = _G["GroupLootFrame"..i]
frame:SetWidth(335)
frame:SetHeight(67)
frame = frame:GetName()
_G[frame.."Corner"]:Hide()
_G[frame.."PassButton"]:ClearAllPoints()
_G[frame.."PassButton"]:SetPoint("TOPRIGHT", -20, -10)
_G[frame.."DisenchantButton"]:ClearAllPoints()
_G[frame.."DisenchantButton"]:SetPoint("TOPRIGHT", -55, -14)
_G[frame.."DisenchantButton"]:SetHeight(26)
_G[frame.."DisenchantButton"]:SetWidth(26)
_G[frame.."GreedButton"]:ClearAllPoints()
_G[frame.."GreedButton"]:SetPoint("RIGHT", _G[frame.."DisenchantButton"], "LEFT", -7, -3)
_G[frame.."GreedButton"]:SetHeight(26)
_G[frame.."GreedButton"]:SetWidth(26)
_G[frame.."RollButton"]:ClearAllPoints()
_G[frame.."RollButton"]:SetPoint("RIGHT", _G[frame.."GreedButton"], "LEFT", -7, 1)
_G[frame.."RollButton"]:SetHeight(26)
_G[frame.."RollButton"]:SetWidth(26)
--local sbarborder, sbar = GroupLootFrame1Timer:GetRegions()
_G[frame.."Timer"]:ClearAllPoints()
_G[frame.."Timer"]:SetPoint("BOTTOMRIGHT", -15, 15)
_G[frame.."Timer"]:SetWidth(147)
_G[frame.."SlotTexture"]:Hide()
_G[frame.."Decoration"]:SetHeight(96)
_G[frame.."Decoration"]:SetWidth(96)
_G[frame.."Decoration"]:ClearAllPoints()
_G[frame.."Decoration"]:SetPoint("TOPLEFT", -25, 13)
 
--skin icons
if IsAddOnLoaded("rActionButtonStyler") then
_G[frame.."IconFrame"]:SetNormalTexture("Interface\\AddOns\\rActionButtonStyler\\media\\gloss")
local iconborder = _G[frame.."IconFrame"]:GetNormalTexture()
iconborder:SetVertexColor(colorR,colorG,colorB)
iconborder.SetVertexColor = emptyFunc
_G[frame.."IconFrame"]:SetPushedTexture("Interface\\AddOns\\rActionButtonStyler\\media\\pushed")
_G[frame.."IconFrame"]:SetHighlightTexture("Interface\\AddOns\\rActionButtonStyler\\media\\hover")
else
_G[frame.."IconFrame"]:SetNormalTexture("")
--_G[frame.."IconFrame"]:SetPushedTexture("")
_G[frame.."IconFrameIcon"]:SetTexCoord(.1,.9,.1,.9)
end
end
end
 
local function SetUpDB()
if LovelyLootPCDB.charSpec then
--set defaults if new charSpec DB
482,18 → 347,11
SLASH_LOVELYLOOT2 = "/ll"
 
LootFrameEdits()
GroupLootFrames()
for k,v in pairs(frames) do
v.OLDSetBackdrop = v.SetBackdrop
v.SetBackdrop = emptyFunc
SkinFrames(v, true)
end
SkinFrames(LootFrame)
 
--cleanup
LL:UnregisterEvent("PLAYER_ENTERING_WORLD")
Initialize = nil
LootFrameEdits = nil
GroupLootFrames = nil
end
 
LL:RegisterEvent("PLAYER_ENTERING_WORLD")
506,9 → 364,11
else
llmodel:ClearModel()
llmodel:SetModel("PARTICLES\\Lootfx.m2")
--llmodel:SetCamera(1)
end
else
Initialize()
end
end)
\ No newline at end of file + end) + + +
trunk/LovelyLoot Property changes : Added: svn:ignore + lloot - Old.lua