refactoring
This commit is contained in:
+1
-3
@@ -32,18 +32,16 @@ tables\listing.lua
|
||||
tables\auction_listing.lua
|
||||
tables\item_listing.lua
|
||||
|
||||
|
||||
tabs\search\core.lua
|
||||
tabs\search\frames.lua
|
||||
|
||||
tabs\post\core.xml
|
||||
tabs\post\core.lua
|
||||
tabs\post\frames.lua
|
||||
|
||||
tabs\auctions\core.xml
|
||||
tabs\auctions\core.lua
|
||||
tabs\auctions\frames.lua
|
||||
|
||||
tabs\bids\core.xml
|
||||
tabs\bids\core.lua
|
||||
tabs\bids\frames.lua
|
||||
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ function public.LOAD()
|
||||
m.event_frame:SetScript('OnEvent', m.on_event)
|
||||
end
|
||||
|
||||
function public.on_event()
|
||||
function private.on_event()
|
||||
for listener, _ in m.event_listeners do
|
||||
if event == listener.event and not listener.deleted then
|
||||
listener.action()
|
||||
@@ -18,7 +18,7 @@ function public.on_event()
|
||||
end
|
||||
end
|
||||
|
||||
function public.on_update()
|
||||
function private.on_update()
|
||||
m.event_listeners = Aux.util.set_filter(m.event_listeners, function(l) return not l.deleted end)
|
||||
local threads = {}
|
||||
for thread_id, thread in m.threads do
|
||||
|
||||
@@ -14,8 +14,8 @@ end
|
||||
private.tabs = {}
|
||||
function public.tab(index, name)
|
||||
local ret = { m.module(name) }
|
||||
ret[3].ACTIVE = function()
|
||||
return index == m.active_tab
|
||||
ret[2].ACTIVE = function()
|
||||
return m[name] == m.active_tab()
|
||||
end
|
||||
m.tabs[index] = m[name]
|
||||
return unpack(ret)
|
||||
@@ -37,7 +37,7 @@ do
|
||||
end
|
||||
|
||||
function public.on_load()
|
||||
public.version = '3.0.1'
|
||||
public.version = '3.0.2'
|
||||
public.blizzard_ui_shown = false
|
||||
public.bids_loaded = false
|
||||
public.current_owner_page = nil
|
||||
|
||||
@@ -37,7 +37,7 @@ function public.render(item_listing)
|
||||
end
|
||||
|
||||
function public.create(parent, on_click, on_enter, on_leave, selected)
|
||||
local name = (parent:GetName() or '')..'aux_item_list'
|
||||
local name = 'aux_item_list'
|
||||
|
||||
local id = 1
|
||||
while getglobal(name..id) do
|
||||
|
||||
@@ -11,16 +11,16 @@ function public.LOAD()
|
||||
end
|
||||
|
||||
function public.OPEN()
|
||||
AuxAuctionsFrame:Show()
|
||||
m.frame:Show()
|
||||
m.scan_auctions()
|
||||
end
|
||||
|
||||
function public.CLOSE()
|
||||
AuxAuctionsFrame:Hide()
|
||||
m.frame:Hide()
|
||||
end
|
||||
|
||||
function private.update_listing()
|
||||
if not AuxAuctionsFrame:IsVisible() then
|
||||
if not m:ACTIVE() then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -106,7 +106,7 @@ do
|
||||
)
|
||||
end
|
||||
|
||||
function public.on_update()
|
||||
function private.on_update()
|
||||
if state == IDLE or state == SEARCHING then
|
||||
m.cancel_button:Disable()
|
||||
end
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
|
||||
<Frame name="AuxAuctionsFrame" hidden="true" parent="AuxFrame" setAllPoints="true">
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
Aux.auctions_tab.on_update()
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
<Frames>
|
||||
<Frame name="$parentListing" inherits="AuxFrameBoxTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="AuxFrame"><Offset><AbsDimension x="0" y="-8"/></Offset></Anchor>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AuxFrameContent"></Anchor>
|
||||
<Anchor point="BOTTOMRIGHT" relativeTo="AuxFrameContent"></Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -1,5 +1,15 @@
|
||||
Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
private.listing = Aux.auction_listing.CreateAuctionResultsTable(AuxAuctionsFrameListing, Aux.auction_listing.auctions_config)
|
||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
m.frame:SetAllPoints()
|
||||
m.frame:SetScript('OnUpdate', m.on_update)
|
||||
m.frame:Hide()
|
||||
|
||||
m.frame.listing = CreateFrame('Frame', nil, m.frame, 'AuxFrameBoxTemplate')
|
||||
m.frame.listing:SetPoint('TOP', AuxFrame, 'TOP', 0, -8)
|
||||
m.frame.listing:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
||||
m.frame.listing:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
||||
|
||||
private.listing = Aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, Aux.auction_listing.auctions_config)
|
||||
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
||||
m.listing:Reset()
|
||||
m.listing:SetHandler('OnCellClick', function(cell, button)
|
||||
@@ -13,7 +23,7 @@ Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
|
||||
do
|
||||
local status_bar = Aux.gui.status_bar(AuxAuctionsFrame)
|
||||
local status_bar = Aux.gui.status_bar(m.frame)
|
||||
status_bar:SetWidth(265)
|
||||
status_bar:SetHeight(25)
|
||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
||||
@@ -22,7 +32,7 @@ Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
private.status_bar = status_bar
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(AuxAuctionsFrame, 16)
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -31,7 +41,7 @@ Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
private.cancel_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(AuxAuctionsFrame, 16)
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.cancel_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
|
||||
+4
-4
@@ -11,16 +11,16 @@ function public.LOAD()
|
||||
end
|
||||
|
||||
function public.OPEN()
|
||||
AuxBidsFrame:Show()
|
||||
m.frame:Show()
|
||||
m.scan_bids()
|
||||
end
|
||||
|
||||
function public.CLOSE()
|
||||
AuxBidsFrame:Hide()
|
||||
m.frame:Hide()
|
||||
end
|
||||
|
||||
function private.update_listing()
|
||||
if not AuxBidsFrame:IsVisible() then
|
||||
if not m:ACTIVE() then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -120,7 +120,7 @@ do
|
||||
)
|
||||
end
|
||||
|
||||
function public.on_update()
|
||||
function private.on_update()
|
||||
if state == IDLE or state == SEARCHING then
|
||||
m.buyout_button:Disable()
|
||||
m.bid_button:Disable()
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
|
||||
<Frame name="AuxBidsFrame" hidden="true" parent="AuxFrame" setAllPoints="true">
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
Aux.bids_tab.on_update()
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
<Frames>
|
||||
<Frame name="$parentListing" inherits="AuxFrameBoxTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="AuxFrame"><Offset><AbsDimension x="0" y="-8"/></Offset></Anchor>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AuxFrameContent"></Anchor>
|
||||
<Anchor point="BOTTOMRIGHT" relativeTo="AuxFrameContent"></Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Ui>
|
||||
+15
-5
@@ -1,5 +1,15 @@
|
||||
Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.listing = Aux.auction_listing.CreateAuctionResultsTable(AuxBidsFrameListing, Aux.auction_listing.bids_config)
|
||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
m.frame:SetAllPoints()
|
||||
m.frame:SetScript('OnUpdate', m.on_update)
|
||||
m.frame:Hide()
|
||||
|
||||
m.frame.listing = CreateFrame('Frame', nil, m.frame, 'AuxFrameBoxTemplate')
|
||||
m.frame.listing:SetPoint('TOP', AuxFrame, 'TOP', 0, -8)
|
||||
m.frame.listing:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
||||
m.frame.listing:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
||||
|
||||
private.listing = Aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, Aux.auction_listing.bids_config)
|
||||
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
||||
m.listing:Reset()
|
||||
m.listing:SetHandler('OnCellClick', function(cell, button)
|
||||
@@ -17,7 +27,7 @@ Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
|
||||
do
|
||||
local status_bar = Aux.gui.status_bar(AuxBidsFrame)
|
||||
local status_bar = Aux.gui.status_bar(m.frame)
|
||||
status_bar:SetWidth(265)
|
||||
status_bar:SetHeight(25)
|
||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
||||
@@ -26,7 +36,7 @@ Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.status_bar = status_bar
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(AuxBidsFrame, 16)
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -35,7 +45,7 @@ Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.bid_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(AuxBidsFrame, 16)
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.bid_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -44,7 +54,7 @@ Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.buyout_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(AuxBidsFrame, 16)
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.buyout_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
|
||||
+14
-14
@@ -18,7 +18,7 @@ function public.LOAD()
|
||||
end
|
||||
|
||||
function public.OPEN()
|
||||
AuxPostFrame:Show()
|
||||
m.frame:Show()
|
||||
|
||||
m.deposit:SetText('Deposit: '..Aux.money.to_string(0, nil, nil, nil, Aux.gui.inline_color({255, 254, 250, 1})))
|
||||
|
||||
@@ -32,7 +32,7 @@ end
|
||||
|
||||
function public.CLOSE()
|
||||
m.selected_item = nil
|
||||
AuxPostFrame:Hide()
|
||||
m.frame:Hide()
|
||||
end
|
||||
|
||||
function private.default_settings()
|
||||
@@ -87,7 +87,7 @@ function private.set_unit_buyout_price(amount)
|
||||
end
|
||||
|
||||
function private.update_inventory_listing()
|
||||
if not AuxPostFrame:IsVisible() then
|
||||
if not m.ACTIVE() then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -98,7 +98,7 @@ function private.update_inventory_listing()
|
||||
end
|
||||
|
||||
function private.update_auction_listing()
|
||||
if not AuxPostFrame:IsVisible() then
|
||||
if not m.ACTIVE() then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -276,10 +276,10 @@ function private.update_item_configuration()
|
||||
if not m.selected_item then
|
||||
m.refresh_button:Disable()
|
||||
|
||||
AuxPostParametersItemIconTexture:SetTexture(nil)
|
||||
AuxPostParametersItemCount:SetText()
|
||||
AuxPostParametersItemName:SetTextColor(unpack(Aux.gui.config.label_color.enabled))
|
||||
AuxPostParametersItemName:SetText('No item selected')
|
||||
AuxPostItemIconTexture:SetTexture(nil)
|
||||
AuxPostItemCount:SetText()
|
||||
AuxPostItemName:SetTextColor(unpack(Aux.gui.config.label_color.enabled))
|
||||
AuxPostItemName:SetText('No item selected')
|
||||
|
||||
m.unit_start_price:Hide()
|
||||
m.unit_buyout_price:Hide()
|
||||
@@ -299,14 +299,14 @@ function private.update_item_configuration()
|
||||
m.historical_value_button:Show()
|
||||
m.hide_checkbox:Show()
|
||||
|
||||
AuxPostParametersItemIconTexture:SetTexture(m.selected_item.texture)
|
||||
AuxPostParametersItemName:SetText('['..m.selected_item.name..']')
|
||||
AuxPostItemIconTexture:SetTexture(m.selected_item.texture)
|
||||
AuxPostItemName:SetText('['..m.selected_item.name..']')
|
||||
local color = ITEM_QUALITY_COLORS[m.selected_item.quality]
|
||||
AuxPostParametersItemName:SetTextColor(color.r, color.g, color.b)
|
||||
AuxPostItemName:SetTextColor(color.r, color.g, color.b)
|
||||
if m.selected_item.aux_quantity > 1 then
|
||||
AuxPostParametersItemCount:SetText(m.selected_item.aux_quantity)
|
||||
AuxPostItemCount:SetText(m.selected_item.aux_quantity)
|
||||
else
|
||||
AuxPostParametersItemCount:SetText()
|
||||
AuxPostItemCount:SetText()
|
||||
end
|
||||
|
||||
m.stack_size_slider.editbox:SetNumber(m.stack_size_slider:GetValue())
|
||||
@@ -543,7 +543,7 @@ function private.record_auction(key, aux_quantity, unit_blizzard_bid, unit_buyou
|
||||
return entry
|
||||
end
|
||||
|
||||
function public.on_update()
|
||||
function private.on_update()
|
||||
if m.refresh then
|
||||
m.refresh = false
|
||||
m.price_update()
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
|
||||
<Frame name="AuxPostFrame" parent="AuxFrame" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
|
||||
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
Aux.post_tab.on_update()
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
<Frames>
|
||||
<Frame name="$parentContent" inherits="AuxFrameBoxTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="AuxFrame"><Offset><AbsDimension x="0" y="-8"/></Offset></Anchor>
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="AuxFrameContent"></Anchor>
|
||||
<Anchor point="BOTTOMRIGHT" relativeTo="AuxFrameContent"></Anchor>
|
||||
</Anchors>
|
||||
<Frames>
|
||||
<Frame name="AuxPostInventory" inherits="AuxFrameBoxTemplate">
|
||||
<Size><AbsDimension x="212"/></Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="4" y="-4"/></Offset></Anchor>
|
||||
<Anchor point="BOTTOMLEFT"><Offset><AbsDimension x="4" y="4"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
<frame name="AuxPostParameters" inherits="AuxFrameBoxTemplate">
|
||||
<Size><AbsDimension y="177"/></Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxPostInventory"><Offset><AbsDimension x="8" y="0"/></Offset></Anchor>
|
||||
<Anchor point="TOPRIGHT"><Offset><AbsDimension x="-4" y="0"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
<frames>
|
||||
<Button name="$parentItem" inherits="AuxItemTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-10"/></Offset></Anchor></Anchors>
|
||||
</Button>
|
||||
</frames>
|
||||
</frame>
|
||||
<Frame name="AuxPostAuctions" inherits="AuxFrameBoxTemplate">
|
||||
<Size><AbsDimension y="217"/></Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" relativeTo="AuxPostInventory"><Offset><AbsDimension x="8" y="0"/></Offset></Anchor>
|
||||
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-4" y="0"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Ui>
|
||||
+49
-22
@@ -1,38 +1,65 @@
|
||||
Aux.post_tab.FRAMES(function(m, public, private)
|
||||
Aux.gui.vertical_line(AuxPostFrameContent, 219)
|
||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
m.frame:SetAllPoints()
|
||||
m.frame:SetScript('OnUpdate', m.on_update)
|
||||
m.frame:Hide()
|
||||
|
||||
AuxPostParametersItem:EnableMouse()
|
||||
AuxPostParametersItem:SetScript('OnReceiveDrag', function()
|
||||
m.frame.content = CreateFrame('Frame', nil, m.frame, 'AuxFrameBoxTemplate')
|
||||
m.frame.content:SetPoint('TOP', AuxFrame, 'TOP', 0, -8)
|
||||
m.frame.content:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
||||
m.frame.content:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
||||
|
||||
m.frame.inventory = CreateFrame('Frame', nil, m.frame.content, 'AuxFrameBoxTemplate')
|
||||
m.frame.inventory:SetWidth(212)
|
||||
m.frame.inventory:SetPoint('TOPLEFT', 4, -4)
|
||||
m.frame.inventory:SetPoint('BOTTOMLEFT', 4, 4)
|
||||
|
||||
m.frame.parameters = CreateFrame('Frame', nil, m.frame.content, 'AuxFrameBoxTemplate')
|
||||
m.frame.parameters:SetHeight(177)
|
||||
m.frame.parameters:SetPoint('TOPLEFT', m.frame.inventory, 'TOPRIGHT', 8, 0)
|
||||
m.frame.parameters:SetPoint('TOPRIGHT', -4, 0)
|
||||
|
||||
m.frame.parameters.item = CreateFrame('Button', 'AuxPostItem', m.frame.parameters, 'AuxItemTemplate')
|
||||
m.frame.parameters.item:SetPoint('TOPLEFT', 10, -10)
|
||||
|
||||
m.frame.auctions = CreateFrame('Frame', nil, m.frame.content, 'AuxFrameBoxTemplate')
|
||||
m.frame.auctions:SetHeight(217)
|
||||
m.frame.auctions:SetPoint('BOTTOMLEFT', m.frame.inventory, 'BOTTOMRIGHT', 8, 0)
|
||||
m.frame.auctions:SetPoint('BOTTOMRIGHT', -4, 0)
|
||||
|
||||
Aux.gui.vertical_line(m.frame.content, 219)
|
||||
m.frame.parameters.item:EnableMouse()
|
||||
m.frame.parameters.item:SetScript('OnReceiveDrag', function()
|
||||
local item_info = Aux.cursor_item()
|
||||
if item_info then
|
||||
m.select_item(item_info.item_key)
|
||||
end
|
||||
ClearCursor()
|
||||
end)
|
||||
AuxPostParametersItem:SetScript('OnClick', function()
|
||||
m.frame.parameters.item:SetScript('OnClick', function()
|
||||
local item_info = Aux.cursor_item()
|
||||
if item_info then
|
||||
m.select_item(item_info.item_key)
|
||||
end
|
||||
ClearCursor()
|
||||
end)
|
||||
local highlight = AuxPostParametersItem:CreateTexture()
|
||||
highlight:SetAllPoints(AuxPostParametersItem)
|
||||
local highlight = m.frame.parameters.item:CreateTexture()
|
||||
highlight:SetAllPoints(m.frame.parameters.item)
|
||||
highlight:Hide()
|
||||
highlight:SetTexture(1, .9, .9, .1)
|
||||
AuxPostParametersItem:SetScript('OnEnter', function()
|
||||
m.frame.parameters.item:SetScript('OnEnter', function()
|
||||
highlight:Show()
|
||||
if m.selected_item then
|
||||
Aux.info.set_tooltip(m.selected_item.itemstring, this, 'ANCHOR_RIGHT')
|
||||
end
|
||||
end)
|
||||
AuxPostParametersItem:SetScript('OnLeave', function()
|
||||
m.frame.parameters.item:SetScript('OnLeave', function()
|
||||
highlight:Hide()
|
||||
GameTooltip:Hide()
|
||||
end)
|
||||
|
||||
do
|
||||
local checkbox = CreateFrame('CheckButton', nil, AuxPostInventory, 'UICheckButtonTemplate')
|
||||
local checkbox = CreateFrame('CheckButton', nil, m.frame.inventory, 'UICheckButtonTemplate')
|
||||
checkbox:SetWidth(22)
|
||||
checkbox:SetHeight(22)
|
||||
checkbox:SetPoint('TOPLEFT', 45, -15)
|
||||
@@ -45,10 +72,10 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.show_hidden_checkbox = checkbox
|
||||
end
|
||||
|
||||
Aux.gui.horizontal_line(AuxPostInventory, -48)
|
||||
Aux.gui.horizontal_line(m.frame.inventory, -48)
|
||||
|
||||
private.item_listing = Aux.item_listing.create(
|
||||
AuxPostInventory,
|
||||
m.frame.inventory,
|
||||
function()
|
||||
if arg1 == 'LeftButton' then
|
||||
m.set_item(this.item_record)
|
||||
@@ -70,7 +97,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
end
|
||||
)
|
||||
|
||||
private.auction_listing = Aux.listing.CreateScrollingTable(AuxPostAuctions)
|
||||
private.auction_listing = Aux.listing.CreateScrollingTable(m.frame.auctions)
|
||||
m.auction_listing:SetColInfo({
|
||||
{ name='Auctions', width=.12, align='CENTER' },
|
||||
{ name='Left', width=.1, align='CENTER' },
|
||||
@@ -95,7 +122,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
|
||||
do
|
||||
local status_bar = Aux.gui.status_bar(AuxPostFrame)
|
||||
local status_bar = Aux.gui.status_bar(m.frame)
|
||||
status_bar:SetWidth(265)
|
||||
status_bar:SetHeight(25)
|
||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
||||
@@ -104,7 +131,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.status_bar = status_bar
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(AuxPostParameters, 16)
|
||||
local btn = Aux.gui.button(m.frame.parameters, 16)
|
||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -113,7 +140,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.post_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(AuxPostParameters, 16)
|
||||
local btn = Aux.gui.button(m.frame.parameters, 16)
|
||||
btn:SetPoint('TOPLEFT', m.post_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -126,7 +153,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.refresh_button = btn
|
||||
end
|
||||
do
|
||||
local slider = Aux.gui.slider(AuxPostParameters)
|
||||
local slider = Aux.gui.slider(m.frame.parameters)
|
||||
slider:SetValueStep(1)
|
||||
slider:SetPoint('TOPLEFT', 16, -75)
|
||||
slider:SetWidth(190)
|
||||
@@ -159,7 +186,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.stack_size_slider = slider
|
||||
end
|
||||
do
|
||||
local slider = Aux.gui.slider(AuxPostParameters)
|
||||
local slider = Aux.gui.slider(m.frame.parameters)
|
||||
slider:SetValueStep(1)
|
||||
slider:SetPoint('TOPLEFT', m.stack_size_slider, 'BOTTOMLEFT', 0, -30)
|
||||
slider:SetWidth(190)
|
||||
@@ -184,7 +211,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.stack_count_slider = slider
|
||||
end
|
||||
do
|
||||
local dropdown = Aux.gui.dropdown(AuxPostParameters)
|
||||
local dropdown = Aux.gui.dropdown(m.frame.parameters)
|
||||
dropdown:SetPoint('TOPLEFT', m.stack_count_slider, 'BOTTOMLEFT', 0, -19)
|
||||
dropdown:SetWidth(90)
|
||||
dropdown:SetHeight(10)
|
||||
@@ -201,7 +228,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.duration_dropdown = dropdown
|
||||
end
|
||||
do
|
||||
local checkbox = CreateFrame('CheckButton', nil, AuxPostParameters, 'UICheckButtonTemplate')
|
||||
local checkbox = CreateFrame('CheckButton', nil, m.frame.parameters, 'UICheckButtonTemplate')
|
||||
checkbox:SetWidth(22)
|
||||
checkbox:SetHeight(22)
|
||||
checkbox:SetPoint('TOPRIGHT', -85, -6)
|
||||
@@ -217,7 +244,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.hide_checkbox = checkbox
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(AuxPostParameters)
|
||||
local editbox = Aux.gui.editbox(m.frame.parameters)
|
||||
editbox:SetPoint('TOPRIGHT', -65, -66)
|
||||
editbox:SetJustifyH('RIGHT')
|
||||
editbox:SetWidth(150)
|
||||
@@ -263,7 +290,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.unit_start_price = editbox
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(AuxPostParameters)
|
||||
local editbox = Aux.gui.editbox(m.frame.parameters)
|
||||
editbox:SetPoint('TOPRIGHT', m.unit_start_price, 'BOTTOMRIGHT', 0, -18)
|
||||
editbox:SetJustifyH('RIGHT')
|
||||
editbox:SetWidth(150)
|
||||
@@ -307,7 +334,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.unit_buyout_price = editbox
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(AuxPostParameters, 16)
|
||||
local btn = Aux.gui.button(m.frame.parameters, 16)
|
||||
btn:SetPoint('TOPRIGHT', -15, -143)
|
||||
btn:SetWidth(150)
|
||||
btn:SetHeight(20)
|
||||
|
||||
@@ -524,7 +524,7 @@ do
|
||||
)
|
||||
end
|
||||
|
||||
function public.on_update()
|
||||
function private.on_update()
|
||||
if state == IDLE or state == SEARCHING then
|
||||
m.buyout_button:Disable()
|
||||
m.bid_button:Disable()
|
||||
|
||||
@@ -2,6 +2,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
m.frame:SetAllPoints()
|
||||
m.frame:SetScript('OnUpdate', m.on_update)
|
||||
m.frame:Hide()
|
||||
|
||||
m.frame.filter = CreateFrame('Frame', nil, m.frame, 'AuxFrameBoxTemplate')
|
||||
m.frame.filter:SetAllPoints(AuxFrameContent)
|
||||
|
||||
Reference in New Issue
Block a user