refactoring
This commit is contained in:
+12
-12
@@ -32,20 +32,20 @@ tables\auction_listing.lua
|
||||
tables\item_listing.lua
|
||||
|
||||
|
||||
panels\search\core.xml
|
||||
panels\search\core.lua
|
||||
panels\search\frames.lua
|
||||
tabs\search\core.xml
|
||||
tabs\search\core.lua
|
||||
tabs\search\frames.lua
|
||||
|
||||
panels\post\core.xml
|
||||
panels\post\core.lua
|
||||
panels\post\frames.lua
|
||||
tabs\post\core.xml
|
||||
tabs\post\core.lua
|
||||
tabs\post\frames.lua
|
||||
|
||||
panels\auctions\core.xml
|
||||
panels\auctions\core.lua
|
||||
panels\auctions\frames.lua
|
||||
tabs\auctions\core.xml
|
||||
tabs\auctions\core.lua
|
||||
tabs\auctions\frames.lua
|
||||
|
||||
panels\bids\core.xml
|
||||
panels\bids\core.lua
|
||||
panels\bids\frames.lua
|
||||
tabs\bids\core.xml
|
||||
tabs\bids\core.lua
|
||||
tabs\bids\frames.lua
|
||||
|
||||
|
||||
|
||||
@@ -344,6 +344,7 @@ function private.setup_hooks()
|
||||
|
||||
m.hook('GetOwnerAuctionItems', m.GetOwnerAuctionItems)
|
||||
m.hook('PickupContainerItem', m.PickupContainerItem)
|
||||
m.hook('PickupInventoryItem', m.PickupInventoryItem)
|
||||
m.hook('SetItemRef', m.SetItemRef)
|
||||
m.hook('UseContainerItem', m.UseContainerItem)
|
||||
m.hook('AuctionFrameAuctions_OnEvent', m.AuctionFrameAuctions_OnEvent)
|
||||
@@ -426,7 +427,11 @@ do -- TODO make it work for other ways to pick up things
|
||||
last_picked_up = { bag, slot }
|
||||
return m.orig.PickupContainerItem(unpack(arg))
|
||||
end
|
||||
function private.cursor_item()
|
||||
function private.PickupInventoryItem(...)
|
||||
last_picked_up = nil
|
||||
return m.orig.PickupInventoryItem(unpack(arg))
|
||||
end
|
||||
function public.cursor_item()
|
||||
if last_picked_up and CursorHasItem() then
|
||||
return m.info.container_item(unpack(last_picked_up))
|
||||
end
|
||||
@@ -438,9 +443,9 @@ function private.SetItemRef(...)
|
||||
if AuxSearchFrame:IsVisible() and button == 'RightButton' then
|
||||
local item_info = m.info.item(tonumber(({strfind(itemstring, '^item:(%d+)')})[3]))
|
||||
if item_info then
|
||||
m.search_frame.set_filter(strlower(item_info.name)..'/exact')
|
||||
m.search_frame.disable_sniping()
|
||||
m.search_frame.execute()
|
||||
m.search_tab.set_filter(strlower(item_info.name)..'/exact')
|
||||
m.search_tab.disable_sniping()
|
||||
m.search_tab.execute()
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -457,9 +462,9 @@ function private.UseContainerItem(...)
|
||||
local item_info = m.info.container_item(bag, slot)
|
||||
item_info = item_info and m.info.item(item_info.item_id)
|
||||
if item_info then
|
||||
m.search_frame.set_filter(strlower(item_info.name)..'/exact')
|
||||
m.search_frame.disable_sniping()
|
||||
m.search_frame.execute()
|
||||
m.search_tab.set_filter(strlower(item_info.name)..'/exact')
|
||||
m.search_tab.disable_sniping()
|
||||
m.search_tab.execute()
|
||||
end
|
||||
return
|
||||
end
|
||||
@@ -467,7 +472,7 @@ function private.UseContainerItem(...)
|
||||
if AuxPostFrame:IsVisible() then
|
||||
local item_info = m.info.container_item(bag, slot)
|
||||
if item_info then
|
||||
m.post_frame.select_item(item_info.item_key)
|
||||
m.post_tab.select_item(item_info.item_key)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
@@ -654,9 +654,9 @@ local methods = {
|
||||
ChatFrameEditBox:Insert(this.row.data.record.hyperlink)
|
||||
elseif Aux.unmodified() and button == 'RightButton' then -- TODO not when alt (how?)
|
||||
Aux.tab_group:set_tab(1)
|
||||
Aux.search_frame.set_filter(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact')
|
||||
Aux.search_frame.disable_sniping()
|
||||
Aux.search_frame.execute()
|
||||
Aux.search_tab.set_filter(strlower(Aux.info.item(this.row.data.record.item_id).name)..'/exact')
|
||||
Aux.search_tab.disable_sniping()
|
||||
Aux.search_tab.execute()
|
||||
else
|
||||
local selection = this.rt:GetSelection()
|
||||
if not selection or selection.record ~= this.row.data.record then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local m, public, private = Aux.tab(3, 'auctions_frame')
|
||||
local m, public, private = Aux.tab(3, 'auctions_tab')
|
||||
|
||||
local auction_records
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Frame name="AuxAuctionsFrame" hidden="true" parent="AuxFrame" setAllPoints="true">
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
Aux.auctions_frame.on_update()
|
||||
Aux.auctions_tab.on_update()
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
<Frames>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Aux.auctions_frame.FRAMES(function(m, public, private)
|
||||
Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
private.listing = Aux.auction_listing.CreateAuctionResultsTable(AuxAuctionsFrameListing, Aux.auction_listing.auctions_config)
|
||||
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
||||
m.listing:Reset()
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
local m, public, private = Aux.tab(4, 'bids_frame')
|
||||
local m, public, private = Aux.tab(4, 'bids_tab')
|
||||
|
||||
local auction_records
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<Frame name="AuxBidsFrame" hidden="true" parent="AuxFrame" setAllPoints="true">
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
Aux.bids_frame.on_update()
|
||||
Aux.bids_tab.on_update()
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
<Frames>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Aux.bids_frame.FRAMES(function(m, public, private)
|
||||
Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.listing = Aux.auction_listing.CreateAuctionResultsTable(AuxBidsFrameListing, Aux.auction_listing.bids_config)
|
||||
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
||||
m.listing:Reset()
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
local m, public, private = Aux.tab(2, 'post_frame')
|
||||
local m, public, private = Aux.tab(2, 'post_tab')
|
||||
|
||||
local DURATION_4, DURATION_8, DURATION_24 = 120, 480, 1440
|
||||
local settings_schema = {'record', '#', {stack_size='number'}, {duration='number'}, {start_price='number'}, {buyout_price='number'}, {hidden='boolean'}}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
Aux.post_frame.on_update()
|
||||
Aux.post_tab.on_update()
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
<Frames>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Aux.post_frame.FRAMES(function(m, public, private)
|
||||
Aux.post_tab.FRAMES(function(m, public, private)
|
||||
Aux.gui.vertical_line(AuxPostFrameContent, 219)
|
||||
|
||||
AuxPostParametersItem:EnableMouse()
|
||||
@@ -54,9 +54,9 @@ Aux.post_frame.FRAMES(function(m, public, private)
|
||||
m.set_item(this.item_record)
|
||||
elseif arg1 == 'RightButton' then
|
||||
Aux.tab_group:set_tab(1)
|
||||
Aux.search_frame.set_filter(strlower(Aux.info.item(this.item_record.item_id).name)..'/exact')
|
||||
Aux.search_frame.disable_sniping()
|
||||
Aux.search_frame.execute()
|
||||
Aux.search_tab.set_filter(strlower(Aux.info.item(this.item_record.item_id).name)..'/exact')
|
||||
Aux.search_tab.disable_sniping()
|
||||
Aux.search_tab.execute()
|
||||
end
|
||||
end,
|
||||
function()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local m, public, private = Aux.tab(1, 'search_frame')
|
||||
local m, public, private = Aux.tab(1, 'search_tab')
|
||||
|
||||
aux_favorite_searches = {}
|
||||
aux_recent_searches = {}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Frame name="AuxSearchFrame" hidden="true" parent="AuxFrame" setAllPoints="true">
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
Aux.search_frame.on_update()
|
||||
Aux.search_tab.on_update()
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
<Frames>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Aux.search_frame.FRAMES(function(m, public, private)
|
||||
Aux.search_tab.FRAMES(function(m, public, private)
|
||||
do
|
||||
local btn = Aux.gui.button(AuxSearchFrame, 22)
|
||||
btn:SetPoint('TOPLEFT', 5, -8)
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ function public.inventory()
|
||||
end
|
||||
|
||||
if bag <= 4 then
|
||||
return { bag, slot }, public.bag_type(bag)
|
||||
return { bag, slot }, m.bag_type(bag)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user