diff --git a/Aux-AddOn.toc b/Aux-AddOn.toc index e8903b0..c43bf51 100644 --- a/Aux-AddOn.toc +++ b/Aux-AddOn.toc @@ -26,9 +26,21 @@ item_listing.lua history.lua completion.xml -search/core.xml -post/core.xml -auctions/core.xml -bids/core.xml + +search\core.xml +search\core.lua +search\frames.lua + +post\core.xml +post\core.lua +post\frames.lua + +auctions\core.xml +auctions\core.lua +auctions\frames.lua + +bids\core.xml +bids\core.lua +bids\frames.lua diff --git a/auctions/core.lua b/auctions/core.lua index 6100b1f..9202929 100644 --- a/auctions/core.lua +++ b/auctions/core.lua @@ -4,48 +4,7 @@ Aux.auctions_frame = public local auction_records function public.on_load() - private.listing = Aux.auction_listing.CreateAuctionResultsTable(AuxAuctionsFrameListing, Aux.auction_listing.auctions_config) - private.listing:Show() - private.listing:SetSort(1,2,3,4,5,6,7,8) - private.listing:Clear() - private.listing:SetHandler('OnCellClick', function(cell, button) - if IsAltKeyDown() and private.listing:GetSelection().record == cell.row.data.record and private.cancel_button:IsEnabled() then - private.cancel_button:Click() - end - end) - private.listing:SetHandler('OnSelectionChanged', function(rt, datum) - if not datum then return end - private.find_auction(datum.record) - end) - - do - local status_bar = Aux.gui.status_bar(AuxAuctionsFrame) - status_bar:SetWidth(265) - status_bar:SetHeight(25) - status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6) - status_bar:update_status(100, 100) - status_bar:set_text('') - private.status_bar = status_bar - end - do - local btn = Aux.gui.button(AuxAuctionsFrame, 16) - btn:SetPoint('TOPLEFT', private.status_bar, 'TOPRIGHT', 5, 0) - btn:SetWidth(80) - btn:SetHeight(24) - btn:SetText('Cancel') - btn:Disable() - private.cancel_button = btn - end - do - local btn = Aux.gui.button(AuxAuctionsFrame, 16) - btn:SetPoint('TOPLEFT', private.cancel_button, 'TOPRIGHT', 5, 0) - btn:SetWidth(80) - btn:SetHeight(24) - btn:SetText('Refresh') - btn:SetScript('OnClick', function() - public.scan_auctions() - end) - end + public.create_frames(private, public) end function private.update_listing() diff --git a/auctions/core.xml b/auctions/core.xml index 4a45649..72140c4 100644 --- a/auctions/core.xml +++ b/auctions/core.xml @@ -1,8 +1,4 @@ - -