WoWInterface SVN VendorMaster

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 14 to Rev 15
    Reverse comparison

Rev 14 → Rev 15

VendorMaster/VendorMaster.lua
13,6 → 13,7
repair = false,
repairGuild = false,
details = true,
showSummary = true,
saveList = {},
buyList = {},
sellList = {},
80,6 → 81,21
set = function() db.details = not db.details end,
order = 6,
},
summary = {
name = "Show summary",
desc = "If checked, VendorMaster will display in chat your increase/decrease in gold when closing the merchant window.",
type = "toggle",
get = function() return db.showSummary end,
set = function()
db.showSummary = not db.showSummary
if db.showSummary then
VendorMaster:RegisterEvent("MERCHANT_CLOSED")
else
VendorMaster:UnregisterEvent("MERCHANT_CLOSED")
end
end,
order = 6.5,
},
reminder = {
name = "Show reminder",
desc = "If checked, the reminder message will be shown at login.",
146,7 → 162,12
desc = "Select an item from the list to edit your shopping list.",
type = "select",
values = function()
buyList = {}
--buyList = {}
if buyList then
wipe(buyList)
else
buyList = {}
end
for k,v in pairs(db.buyList) do
tinsert(buyList, k)
end
259,7 → 280,12
desc = "Select an item from the list to edit your save list.",
type = "select",
values = function()
saveList = {}
--saveList = {}
if saveList then
wipe(saveList)
else
saveList = {}
end
for k,v in pairs(db.saveList) do
tinsert(saveList, k)
end
358,7 → 384,12
desc = "Select an item from the list to edit your sell list.",
type = "select",
values = function()
sellList = {}
--sellList = {}
if sellList then
wipe(sellList)
else
sellList = {}
end
for k,v in pairs(db.sellList) do
tinsert(sellList, k)
end
471,7 → 502,7
end
end
if cost > 0 and db.details then
print("|cffe6cc80VendorMaster:|r Items purchased for a total of: "..GetCoinTextureString(cost))
print("|cffe6cc80VendorMaster:|r Items purchased for a total of:", GetCoinTextureString(cost))
end
end
 
528,7 → 559,7
end
end
if profit > 0 and db.details then
print("|cffe6cc80VendorMaster:|r All items sold for a profit of: "..GetCoinTextureString(profit))
print("|cffe6cc80VendorMaster:|r All items sold for a profit of:", GetCoinTextureString(profit))
end
end
 
556,13 → 587,20
 
VendorMaster:UnregisterEvent("PLAYER_LOGIN")
VendorMaster:RegisterEvent("MERCHANT_SHOW")
if db.showSummary then
VendorMaster:RegisterEvent("MERCHANT_CLOSED")
end
VendorMaster:SetScript("OnShow", IDfinderWindow)
PlayerLogin = nil
end
 
VendorMaster:RegisterEvent("PLAYER_LOGIN")
local merchantWindowOpen = false
local startingGold, goldDiff, diffColor
VendorMaster:SetScript("OnEvent", function(self,event)
if event == "MERCHANT_SHOW" then
merchantWindowOpen = true
startingGold = GetMoney()
if db.sell then
SellGrays()
end
572,6 → 610,18
if db.buy then
BuyStuff()
end
elseif event == "MERCHANT_CLOSED" then
if merchantWindowOpen and db.showSummary then --this event fires twice for some reason
goldDiff = GetMoney() - startingGold
if goldDiff < 0 then
diffColor = "|cffff000b"
goldDiff = goldDiff * -1
else
diffColor = "|cff1de000"
end
print("|cffe6cc80VendorMaster:|r Total difference of", diffColor, GetCoinTextureString(goldDiff))
end
merchantWindowOpen = false
else
PlayerLogin()
end
VendorMaster/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
1,4 → 1,4
--[[ $Id: CallbackHandler-1.0.lua 965 2010-08-09 00:47:52Z mikk $ ]]
--[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 6
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
 
65,9 → 65,7
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
 
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName, OnUsed, OnUnused)
-- TODO: Remove this after beta has gone out
assert(not OnUsed and not OnUnused, "ACE-80: OnUsed/OnUnused are deprecated. Callbacks are now done to registry.OnUsed and registry.OnUnused")
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
 
RegisterName = RegisterName or "RegisterCallback"
UnregisterName = UnregisterName or "UnregisterCallback"
VendorMaster/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 924 2010-05-13 15:12:20Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 33
-- @release $Id: AceGUI-3.0.lua 1102 2013-10-25 14:15:23Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 34
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
 
if not AceGUI then return end -- No upgrade needed
673,8 → 673,16
end
end)
 
local layoutrecursionblock = nil
local function safelayoutcall(object, func, ...)
layoutrecursionblock = true
object[func](object, ...)
layoutrecursionblock = nil
end
 
AceGUI:RegisterLayout("Flow",
function(content, children)
if layoutrecursionblock then return end
--used height so far
local height = 0
--width used in the current row
762,7 → 770,7
end
 
if child.width == "fill" then
child:SetWidth(width)
safelayoutcall(child, "SetWidth", width)
frame:SetPoint("RIGHT", content)
 
usedwidth = 0
776,7 → 784,7
rowoffset = child.alignoffset or (rowheight / 2)
rowstartoffset = rowoffset
elseif child.width == "relative" then
child:SetWidth(width * child.relWidth)
safelayoutcall(child, "SetWidth", width * child.relWidth)
 
if child.DoLayout then
child:DoLayout()
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
1,4 → 1,4
local Type, Version = "MultiLineEditBox", 27
local Type, Version = "MultiLineEditBox", 28
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
14,12 → 14,6
-- List them here for Mikk's FindGlobals script
-- GLOBALS: ACCEPT, ChatFontNormal
 
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
 
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
251,7 → 245,11
self.frame:SetScript("OnShow", OnShowFocus)
end
end,
 
 
["HighlightText"] = function(self, from, to)
self.editBox:HighlightText(from, to)
end,
 
["GetCursorPosition"] = function(self)
return self.editBox:GetCursorPosition()
end,
285,7 → 283,7
label:SetText(ACCEPT)
label:SetHeight(10)
 
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate")
button:SetPoint("BOTTOMLEFT", 0, 4)
button:SetHeight(22)
button:SetWidth(label:GetStringWidth() + 24)
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
2,7 → 2,7
Slider Widget
Graphical Slider, like, for Range values.
-------------------------------------------------------------------------------]]
local Type, Version = "Slider", 20
local Type, Version = "Slider", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
61,6 → 61,10
local self = frame.obj
if not frame.setup then
local newvalue = frame:GetValue()
if self.step and self.step > 0 then
local min_value = self.min or 0
newvalue = floor((newvalue - min_value) / self.step + 0.5) * self.step + min_value
end
if newvalue ~= self.value and not self.disabled then
self.value = newvalue
self:Fire("OnValueChanged", newvalue)
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
2,7 → 2,7
Keybinding Widget
Set Keybindings in the Config UI.
-------------------------------------------------------------------------------]]
local Type, Version = "Keybinding", 24
local Type, Version = "Keybinding", 25
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
17,12 → 17,6
-- List them here for Mikk's FindGlobals script
-- GLOBALS: NOT_BOUND
 
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
 
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
40,11 → 34,13
local self = frame.obj
if self.waitingForKey then
frame:EnableKeyboard(false)
frame:EnableMouseWheel(false)
self.msgframe:Hide()
frame:UnlockHighlight()
self.waitingForKey = nil
else
frame:EnableKeyboard(true)
frame:EnableMouseWheel(true)
self.msgframe:Show()
frame:LockHighlight()
self.waitingForKey = true
79,6 → 75,7
end
 
frame:EnableKeyboard(false)
frame:EnableMouseWheel(false)
self.msgframe:Hide()
frame:UnlockHighlight()
self.waitingForKey = nil
103,6 → 100,16
Keybinding_OnKeyDown(frame, button)
end
 
local function Keybinding_OnMouseWheel(frame, direction)
local button
if direction >= 0 then
button = "MOUSEWHEELUP"
else
button = "MOUSEWHEELDOWN"
end
Keybinding_OnKeyDown(frame, button)
end
 
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
115,6 → 122,7
self.msgframe:Hide()
self:SetDisabled(false)
self.button:EnableKeyboard(false)
self.button:EnableMouseWheel(false)
end,
 
-- ["OnRelease"] = nil,
180,15 → 188,17
local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
 
local frame = CreateFrame("Frame", nil, UIParent)
local button = CreateFrame("Button", name, frame, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate")
 
button:EnableMouse(true)
button:EnableMouseWheel(false)
button:RegisterForClicks("AnyDown")
button:SetScript("OnEnter", Control_OnEnter)
button:SetScript("OnLeave", Control_OnLeave)
button:SetScript("OnClick", Keybinding_OnClick)
button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
button:SetScript("OnMouseWheel", Keybinding_OnMouseWheel)
button:SetPoint("BOTTOMLEFT")
button:SetPoint("BOTTOMRIGHT")
button:SetHeight(24)
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-Icon.lua
9,7 → 9,7
local select, pairs, print = select, pairs, print
 
-- WoW APIs
local CreateFrame, UIParent, GetBuildInfo = CreateFrame, UIParent, GetBuildInfo
local CreateFrame, UIParent = CreateFrame, UIParent
 
--[[-----------------------------------------------------------------------------
Scripts
131,13 → 131,9
for method, func in pairs(methods) do
widget[method] = func
end
-- SetText is deprecated, but keep it around for a while. (say, to WoW 4.0)
if (select(4, GetBuildInfo()) < 40000) then
widget.SetText = widget.SetLabel
else
widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
end
 
widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
 
return AceGUI:RegisterAsWidget(widget)
end
 
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
2,7 → 2,7
BlizOptionsGroup Container
Simple container widget for the integration of AceGUI into the Blizzard Interface Options
-------------------------------------------------------------------------------]]
local Type, Version = "BlizOptionsGroup", 20
local Type, Version = "BlizOptionsGroup", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
36,10 → 36,14
frame.obj:Fire("cancel")
end
 
local function defaults(frame)
frame.obj:Fire("defaults")
local function default(frame)
frame.obj:Fire("default")
end
 
local function refresh(frame)
frame.obj:Fire("refresh")
end
 
--[[-----------------------------------------------------------------------------
Methods
-------------------------------------------------------------------------------]]
101,7 → 105,8
-- support functions for the Blizzard Interface Options
frame.okay = okay
frame.cancel = cancel
frame.defaults = defaults
frame.default = default
frame.refresh = refresh
 
frame:SetScript("OnHide", OnHide)
frame:SetScript("OnShow", OnShow)
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
2,7 → 2,7
InlineGroup Container
Simple container widget that creates a visible "box" with an optional title.
-------------------------------------------------------------------------------]]
local Type, Version = "InlineGroup", 20
local Type, Version = "InlineGroup", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
19,6 → 19,7
["OnAcquire"] = function(self)
self:SetWidth(300)
self:SetHeight(100)
self:SetTitle("")
end,
 
-- ["OnRelease"] = nil,
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 1029 2011-06-10 23:10:58Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1116 2014-10-12 08:15:46Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
356,17 → 356,19
 
do
local widgetType = "Dropdown"
local widgetVersion = 25
local widgetVersion = 30
 
--[[ Static data ]]--
 
--[[ UI event handler ]]--
 
local function Control_OnEnter(this)
this.obj.button:LockHighlight()
this.obj:Fire("OnEnter")
end
 
local function Control_OnLeave(this)
this.obj.button:UnlockHighlight()
this.obj:Fire("OnLeave")
end
 
386,7 → 388,7
AceGUI:ClearFocus()
else
self.open = true
self.pullout:SetWidth(self.frame:GetWidth())
self.pullout:SetWidth(self.pulloutWidth or self.frame:GetWidth())
self.pullout:Open("TOPLEFT", self.frame, "BOTTOMLEFT", 0, self.label:IsShown() and -2 or 0)
AceGUI:SetFocus(self)
end
403,6 → 405,7
end
 
self.open = true
self:Fire("OnOpened")
end
 
local function OnPulloutClose(this)
461,6 → 464,7
self:SetHeight(44)
self:SetWidth(200)
self:SetLabel()
self:SetPulloutWidth(nil)
end
 
-- exported, AceGUI callback
490,9 → 494,11
if disabled then
self.text:SetTextColor(0.5,0.5,0.5)
self.button:Disable()
self.button_cover:Disable()
self.label:SetTextColor(0.5,0.5,0.5)
else
self.button:Enable()
self.button_cover:Enable()
self.label:SetTextColor(1,.82,0)
self.text:SetTextColor(1,1,1)
end
515,9 → 521,9
if text and text ~= "" then
self.label:SetText(text)
self.label:Show()
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-18)
self:SetHeight(44)
self.alignoffset = 30
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-14)
self:SetHeight(40)
self.alignoffset = 26
else
self.label:SetText("")
self.label:Hide()
635,6 → 641,10
return self.multiselect
end
 
local function SetPulloutWidth(self, width)
self.pulloutWidth = width
end
 
--[[ Constructor ]]--
 
local function Constructor()
666,8 → 676,9
self.GetMultiselect = GetMultiselect
self.SetItemValue = SetItemValue
self.SetItemDisabled = SetItemDisabled
self.SetPulloutWidth = SetPulloutWidth
 
self.alignoffset = 30
self.alignoffset = 26
 
frame:SetScript("OnHide",Dropdown_OnHide)
 
694,6 → 705,15
button:SetScript("OnLeave",Control_OnLeave)
button:SetScript("OnClick",Dropdown_TogglePullout)
 
local button_cover = CreateFrame("BUTTON",nil,self.frame)
self.button_cover = button_cover
button_cover.obj = self
button_cover:SetPoint("TOPLEFT",self.frame,"BOTTOMLEFT",0,25)
button_cover:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
button_cover:SetScript("OnEnter",Control_OnEnter)
button_cover:SetScript("OnLeave",Control_OnLeave)
button_cover:SetScript("OnClick",Dropdown_TogglePullout)
 
local text = _G[dropdown:GetName() .. "Text"]
self.text = text
text.obj = self
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 24
local Type, Version = "EditBox", 26
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
90,6 → 90,11
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
elseif type == "macro" then
local name = GetMacroInfo(id)
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
end
HideButton(self)
AceGUI:ClearFocus()
195,6 → 200,10
if not self.frame:IsShown() then
self.frame:SetScript("OnShow", Frame_OnShowFocus)
end
end,
 
["HighlightText"] = function(self, from, to)
self.editbox:HighlightText(from, to)
end
}
 
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua
2,10 → 2,12
ScrollFrame Container
Plain container that scrolls its content and doesn't grow in height.
-------------------------------------------------------------------------------]]
local Type, Version = "ScrollFrame", 23
local Type, Version = "ScrollFrame", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
local IsLegion = select(4, GetBuildInfo()) >= 70000
 
-- Lua APIs
local pairs, assert, type = pairs, assert, type
local min, max, floor, abs = math.min, math.max, math.floor, math.abs
176,7 → 178,11
 
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
scrollbg:SetAllPoints(scrollbar)
scrollbg:SetTexture(0, 0, 0, 0.4)
if IsLegion then
scrollbg:SetColorTexture(0, 0, 0, 0.4)
else
scrollbg:SetTexture(0, 0, 0, 0.4)
end
 
--Container Support
local content = CreateFrame("Frame", nil, scrollframe)
VendorMaster/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", 34
local Type, Version = "TreeGroup", 40
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
local IsLegion = select(4, GetBuildInfo()) >= 70000
 
-- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
local math_min, math_max, floor = math.min, math.max, floor
212,7 → 214,7
if self.enabletooltips then
GameTooltip:SetOwner(frame, "ANCHOR_NONE")
GameTooltip:SetPoint("LEFT",frame,"RIGHT")
GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, 1)
GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
 
GameTooltip:Show()
end
231,7 → 233,7
if frame.obj.noupdate then return end
local self = frame.obj
local status = self.status or self.localstatus
status.scrollvalue = value
status.scrollvalue = floor(value + 0.5)
self:RefreshTree()
AceGUI:ClearFocus()
end
295,6 → 297,7
["OnAcquire"] = function(self)
self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
self:EnableButtonTooltips(true)
self.frame:SetScript("OnUpdate", FirstFrameUpdate)
end,
 
["OnRelease"] = function(self)
335,6 → 338,8
button.toggle.button = button
button.toggle:SetScript("OnClick",Expand_OnClick)
 
button.text:SetHeight(14) -- Prevents text wrapping
 
return button
end,
 
667,8 → 672,13
 
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
scrollbg:SetAllPoints(scrollbar)
scrollbg:SetTexture(0,0,0,0.4)
 
if IsLegion then
scrollbg:SetColorTexture(0,0,0,0.4)
else
scrollbg:SetTexture(0,0,0,0.4)
end
 
local border = CreateFrame("Frame",nil,frame)
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
border:SetPoint("BOTTOMRIGHT")
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
2,7 → 2,7
Button Widget
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "Button", 22
local Type, Version = "Button", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
13,12 → 13,6
local _G = _G
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
 
local wowMoP
do
local _, _, _, interface = GetBuildInfo()
wowMoP = (interface >= 50000)
end
 
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
45,6 → 39,7
self:SetHeight(24)
self:SetWidth(200)
self:SetDisabled(false)
self:SetAutoWidth(false)
self:SetText()
end,
 
52,7 → 47,17
 
["SetText"] = function(self, text)
self.text:SetText(text)
if self.autoWidth then
self:SetWidth(self.text:GetStringWidth() + 30)
end
end,
 
["SetAutoWidth"] = function(self, autoWidth)
self.autoWidth = autoWidth
if self.autoWidth then
self:SetWidth(self.text:GetStringWidth() + 30)
end
end,
 
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
69,7 → 74,7
-------------------------------------------------------------------------------]]
local function Constructor()
local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
local frame = CreateFrame("Button", name, UIParent, wowMoP and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate")
frame:Hide()
 
frame:EnableMouse(true)
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
1,7 → 1,9
--[[ $Id: AceGUIWidget-DropDown-Items.lua 996 2010-12-01 18:34:17Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1137 2016-05-15 10:57:36Z nevcairiel $ ]]--
 
local AceGUI = LibStub("AceGUI-3.0")
 
local IsLegion = select(4, GetBuildInfo()) >= 70000
 
-- Lua APIs
local select, assert = select, assert
 
440,7 → 442,7
-- A single line to separate items
do
local widgetType = "Dropdown-Item-Separator"
local widgetVersion = 1
local widgetVersion = 2
 
-- exported, override
local function SetDisabled(self, disabled)
455,7 → 457,11
 
local line = self.frame:CreateTexture(nil, "OVERLAY")
line:SetHeight(1)
line:SetTexture(.5, .5, .5)
if IsLegion then
line:SetColorTexture(.5, .5, .5)
else
line:SetTexture(.5, .5, .5)
end
line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
 
VendorMaster/libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
1,10 → 1,12
--[[-----------------------------------------------------------------------------
ColorPicker Widget
-------------------------------------------------------------------------------]]
local Type, Version = "ColorPicker", 20
local Type, Version = "ColorPicker", 23
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
local IsLegion = select(4, GetBuildInfo()) >= 70000
 
-- Lua APIs
local pairs = pairs
 
51,6 → 53,8
local self = frame.obj
if not self.disabled then
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
ColorPickerFrame:SetClampedToScreen(true)
 
ColorPickerFrame.func = function()
local r, g, b = ColorPickerFrame:GetColorRGB()
144,7 → 148,11
local texture = frame:CreateTexture(nil, "BACKGROUND")
texture:SetWidth(16)
texture:SetHeight(16)
texture:SetTexture(1, 1, 1)
if IsLegion then
texture:SetColorTexture(1, 1, 1)
else
texture:SetTexture(1, 1, 1)
end
texture:SetPoint("CENTER", colorSwatch)
texture:Show()
 
VendorMaster/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 1045 2011-12-09 17:58:40Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 14
-- @release $Id: AceConfigRegistry-3.0.lua 1139 2016-07-03 07:43:51Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 16
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigRegistry then return end
57,6 → 57,7
local ismethodtable={["table"]=true,["string"]=true,["function"]=true, _="methodname, funcref or table"}
local optstring={["nil"]=true,["string"]=true, _="string"}
local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"}
local optstringnumberfunc={["nil"]=true,["string"]=true,["number"]=true,["function"]=true, _="string, number or funcref"}
local optnumber={["nil"]=true,["number"]=true, _="number"}
local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"}
local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true}, _="methodname, funcref or false"}
82,7 → 83,7
dialogHidden=optmethodbool,
dropdownHidden=optmethodbool,
cmdHidden=optmethodbool,
icon=optstringfunc,
icon=optstringnumberfunc,
iconCoords=optmethodtable,
handler=opttable,
get=optmethodfalse,
95,7 → 96,7
local typedkeys={
header={},
description={
image=optstringfunc,
image=optstringnumberfunc,
imageCoords=optmethodtable,
imageHeight=optnumber,
imageWidth=optnumber,
112,7 → 113,7
childGroups=optstring,
},
execute={
image=optstringfunc,
image=optstringnumberfunc,
imageCoords=optmethodtable,
imageHeight=optnumber,
imageWidth=optnumber,
127,7 → 128,7
},
toggle={
tristate=optbool,
image=optstringfunc,
image=optstringnumberfunc,
imageCoords=optmethodtable,
},
tristate={
288,7 → 289,8
-- @param appName The application name as given to `:RegisterOptionsTable()`
-- @param options The options table, OR a function reference that generates it on demand. \\
-- See the top of the page for info on arguments passed to such functions.
function AceConfigRegistry:RegisterOptionsTable(appName, options)
-- @param skipValidation Skip options table validation (primarily useful for extremely huge options, with a noticeable slowdown)
function AceConfigRegistry:RegisterOptionsTable(appName, options, skipValidation)
if type(options)=="table" then
if options.type~="group" then -- quick sanity checker
error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - missing type='group' member in root group", 2)
296,7 → 298,7
AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
errlvl=(errlvl or 0)+1
validateGetterArgs(uiType, uiName, errlvl)
if not AceConfigRegistry.validated[uiType][appName] then
if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl) -- upgradable
AceConfigRegistry.validated[uiType][appName] = true
end
307,7 → 309,7
errlvl=(errlvl or 0)+1
validateGetterArgs(uiType, uiName, errlvl)
local tab = assert(options(uiType, uiName, appName))
if not AceConfigRegistry.validated[uiType][appName] then
if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
AceConfigRegistry:ValidateOptionsTable(tab, appName, errlvl) -- upgradable
AceConfigRegistry.validated[uiType][appName] = true
end
VendorMaster/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 1049 2012-04-02 13:22:10Z mikk $
-- @release $Id: AceConfigDialog-3.0.lua 1139 2016-07-03 07:43:51Z nevcairiel $
 
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 57
local MAJOR, MINOR = "AceConfigDialog-3.0", 61
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
542,16 → 542,16
 
if descStyle and descStyle ~= "tooltip" then return end
 
GameTooltip:SetText(name, 1, .82, 0, 1)
GameTooltip:SetText(name, 1, .82, 0, true)
 
if opt.type == "multiselect" then
GameTooltip:AddLine(user.text,0.5, 0.5, 0.8, 1)
GameTooltip:AddLine(user.text, 0.5, 0.5, 0.8, true)
end
if type(desc) == "string" then
GameTooltip:AddLine(desc, 1, 1, 1, 1)
GameTooltip:AddLine(desc, 1, 1, 1, true)
end
if type(usage) == "string" then
GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, 1)
GameTooltip:AddLine("Usage: "..usage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, true)
end
 
GameTooltip:Show()
580,7 → 580,7
t.text = message
t.button1 = ACCEPT
t.button2 = CANCEL
t.preferredIndex = 3
t.preferredIndex = STATICPOPUP_NUMDIALOGS
local dialog, oldstrata
t.OnAccept = function()
safecall(func, unpack(t))
1092,7 → 1092,7
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
 
if type(image) == "string" then
if type(image) == "string" or type(image) == "number" then
control = gui:Create("Icon")
if not width then
width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
1154,7 → 1154,7
local image = GetOptionsMemberValue("image", v, options, path, appName)
local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName)
 
if type(image) == "string" then
if type(image) == "string" or type(image) == "number" then
if type(imageCoords) == "table" then
control:SetImage(image, unpack(imageCoords))
else
1354,7 → 1354,7
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
 
if type(image) == "string" then
if type(image) == "string" or type(image) == "number" then
if not width then
width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
end
1448,10 → 1448,10
GameTooltip:SetPoint("LEFT",button,"RIGHT")
end
 
GameTooltip:SetText(name, 1, .82, 0, 1)
GameTooltip:SetText(name, 1, .82, 0, true)
 
if type(desc) == "string" then
GameTooltip:AddLine(desc, 1, 1, 1, 1)
GameTooltip:AddLine(desc, 1, 1, 1, true)
end
 
GameTooltip:Show()
1817,6 → 1817,14
tinsert(path, (select(n, ...)))
end
 
local option = options
if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then
for i = 1, #path do
option = options.args[path[i]]
end
name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName))
end
 
--if a container is given feed into that
if container then
f = container
VendorMaster/VendorMaster.toc
1,7 → 1,7
## Interface: 50001
## Interface: 70100
## Title: VendorMaster
## Author: Seerah
## Version: 1.2.5
## Version: 1.3
## Notes: Shopping list, auto-repair, auto-vendors gray items.
## SavedVariablesPerCharacter: VendorMasterDB
## OptionalDeps: Ace3