module refactoring
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
module 'aux.tabs.auctions'
|
||||
|
||||
include 'aux'
|
||||
|
||||
local T = require 'T'
|
||||
|
||||
local aux = require 'aux'
|
||||
local scan_util = require 'aux.util.scan'
|
||||
local scan = require 'aux.core.scan'
|
||||
|
||||
local tab = TAB 'Auctions'
|
||||
local tab = aux.tab 'Auctions'
|
||||
|
||||
auction_records = T.acquire()
|
||||
|
||||
@@ -75,7 +73,7 @@ do
|
||||
|
||||
cancel_button:SetScript('OnClick', function()
|
||||
if scan_util.test(record, index) and listing:ContainsRecord(record) then
|
||||
cancel_auction(index, function() listing:RemoveAuctionRecord(record) end)
|
||||
aux.cancel_auction(index, function() listing:RemoveAuctionRecord(record) end)
|
||||
end
|
||||
end)
|
||||
cancel_button:Enable()
|
||||
@@ -97,7 +95,7 @@ do
|
||||
find_auction(selection.record)
|
||||
elseif state == FOUND and not scan_util.test(selection.record, found_index) then
|
||||
cancel_button:Disable()
|
||||
if not cancel_in_progress() then state = IDLE end
|
||||
if not aux.cancel_in_progress() then state = IDLE end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,19 +1,20 @@
|
||||
module 'aux.tabs.auctions'
|
||||
|
||||
local aux = require 'aux'
|
||||
local info = require 'aux.util.info'
|
||||
local gui = require 'aux.gui'
|
||||
local auction_listing = require 'aux.gui.auction_listing'
|
||||
local search_tab = require 'aux.tabs.search'
|
||||
|
||||
frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
frame = CreateFrame('Frame', nil, aux.frame)
|
||||
frame:SetAllPoints()
|
||||
frame:SetScript('OnUpdate', on_update)
|
||||
frame:Hide()
|
||||
|
||||
frame.listing = gui.panel(frame)
|
||||
frame.listing:SetPoint('TOP', frame, 'TOP', 0, -8)
|
||||
frame.listing:SetPoint('BOTTOMLEFT', AuxFrame.content, 'BOTTOMLEFT', 0, 0)
|
||||
frame.listing:SetPoint('BOTTOMRIGHT', AuxFrame.content, 'BOTTOMRIGHT', 0, 0)
|
||||
frame.listing:SetPoint('BOTTOMLEFT', aux.frame.content, 'BOTTOMLEFT', 0, 0)
|
||||
frame.listing:SetPoint('BOTTOMRIGHT', aux.frame.content, 'BOTTOMRIGHT', 0, 0)
|
||||
|
||||
listing = auction_listing.new(frame.listing, 20, auction_listing.auctions_columns)
|
||||
listing:SetSort(1, 2, 3, 4, 5, 6, 7, 8)
|
||||
@@ -26,7 +27,7 @@ listing:SetHandler('OnClick', function(row, button)
|
||||
end
|
||||
end
|
||||
elseif button == 'RightButton' then
|
||||
set_tab(1)
|
||||
aux.set_tab(1)
|
||||
search_tab.set_filter(strlower(info.item(this.record.item_id).name) .. '/exact')
|
||||
search_tab.execute(nil, false)
|
||||
end
|
||||
@@ -40,7 +41,7 @@ do
|
||||
status_bar = gui.status_bar(frame)
|
||||
status_bar:SetWidth(265)
|
||||
status_bar:SetHeight(25)
|
||||
status_bar:SetPoint('TOPLEFT', AuxFrame.content, 'BOTTOMLEFT', 0, -6)
|
||||
status_bar:SetPoint('TOPLEFT', aux.frame.content, 'BOTTOMLEFT', 0, -6)
|
||||
status_bar:update_status(1, 1)
|
||||
status_bar:set_text('')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user