almost finished the buy tab modes
This commit is contained in:
Generated
+100
-81
@@ -3,10 +3,12 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="3c1af1d3-ae57-470d-8daa-a9295703c6fc" name="Default" comment="">
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/buy.lua" afterPath="$PROJECT_DIR$/buy.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/buy.xml" afterPath="$PROJECT_DIR$/buy.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/core.lua" afterPath="$PROJECT_DIR$/core.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/core.xml" afterPath="$PROJECT_DIR$/core.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/info.lua" afterPath="$PROJECT_DIR$/info.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/sell.lua" afterPath="$PROJECT_DIR$/sell.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/list.lua" afterPath="$PROJECT_DIR$/list.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/scan.lua" afterPath="$PROJECT_DIR$/scan.lua" />
|
||||
</list>
|
||||
<ignored path="Aux-Addon.iws" />
|
||||
<ignored path=".idea/workspace.xml" />
|
||||
@@ -72,38 +74,8 @@
|
||||
<file leaf-file-name="core.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/core.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="4406" max-vertical-offset="8806">
|
||||
<caret line="286" column="25" selection-start-line="286" selection-start-column="25" selection-end-line="286" selection-end-column="25" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="scan.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/scan.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1831" max-vertical-offset="2737">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="buy.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/buy.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-11.5" vertical-offset="8212" max-vertical-offset="15878">
|
||||
<caret line="502" column="155" selection-start-line="502" selection-start-column="155" selection-end-line="502" selection-end-column="155" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="util.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/util.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-137.21428" vertical-offset="408" max-vertical-offset="4420">
|
||||
<caret line="250" column="11" selection-start-line="250" selection-start-column="11" selection-end-line="250" selection-end-column="11" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="8602">
|
||||
<caret line="0" column="17" selection-start-line="0" selection-start-column="17" selection-end-line="0" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -112,18 +84,38 @@
|
||||
<file leaf-file-name="info.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/info.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="272" max-vertical-offset="3060">
|
||||
<caret line="43" column="58" selection-start-line="43" selection-start-column="58" selection-end-line="43" selection-end-column="58" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="921" max-vertical-offset="3060">
|
||||
<caret line="67" column="26" selection-start-line="67" selection-start-column="26" selection-end-line="67" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="sell.lua" pinned="false" current="true" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/sell.lua">
|
||||
<file leaf-file-name="scan.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/scan.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.33273703" vertical-offset="3520" max-vertical-offset="10353">
|
||||
<caret line="218" column="203" selection-start-line="218" selection-start-column="203" selection-end-line="218" selection-end-column="203" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="700" max-vertical-offset="2737">
|
||||
<caret line="54" column="9" selection-start-line="54" selection-start-column="9" selection-end-line="54" selection-end-column="9" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="buy.lua" pinned="false" current="true" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/buy.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.36456558" vertical-offset="3645" max-vertical-offset="15045">
|
||||
<caret line="227" column="34" selection-start-line="227" selection-start-column="34" selection-end-line="227" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="list.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/list.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-11.928572" vertical-offset="4052" max-vertical-offset="4624">
|
||||
<caret line="258" column="8" selection-start-line="258" selection-start-column="8" selection-end-line="258" selection-end-column="8" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -142,18 +134,28 @@
|
||||
<file leaf-file-name="buy.xml" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/buy.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="6120" max-vertical-offset="7973">
|
||||
<caret line="378" column="37" selection-start-line="378" selection-start-column="37" selection-end-line="378" selection-end-column="37" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1061" max-vertical-offset="8687">
|
||||
<caret line="90" column="87" selection-start-line="90" selection-start-column="87" selection-end-line="90" selection-end-column="87" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="list.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/list.lua">
|
||||
<file leaf-file-name="options.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/options.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1007" max-vertical-offset="4743">
|
||||
<caret line="90" column="73" selection-start-line="90" selection-start-column="73" selection-end-line="90" selection-end-column="73" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2040">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="options.xml" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/options.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="3672" max-vertical-offset="6579">
|
||||
<caret line="237" column="0" selection-start-line="237" selection-start-column="0" selection-end-line="249" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -162,8 +164,8 @@
|
||||
<file leaf-file-name="core.xml" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/core.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="714" max-vertical-offset="2261">
|
||||
<caret line="74" column="29" selection-start-line="74" selection-start-column="29" selection-end-line="74" selection-end-column="29" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="182" max-vertical-offset="1904">
|
||||
<caret line="61" column="87" selection-start-line="61" selection-start-column="87" selection-end-line="61" selection-end-column="87" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -182,16 +184,17 @@
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="changedFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/list.lua" />
|
||||
<option value="$PROJECT_DIR$/stack.lua" />
|
||||
<option value="$PROJECT_DIR$/buy.xml" />
|
||||
<option value="$PROJECT_DIR$/sell.xml" />
|
||||
<option value="$PROJECT_DIR$/util.lua" />
|
||||
<option value="$PROJECT_DIR$/core.xml" />
|
||||
<option value="$PROJECT_DIR$/core.lua" />
|
||||
<option value="$PROJECT_DIR$/buy.lua" />
|
||||
<option value="$PROJECT_DIR$/info.lua" />
|
||||
<option value="$PROJECT_DIR$/sell.lua" />
|
||||
<option value="$PROJECT_DIR$/core.xml" />
|
||||
<option value="$PROJECT_DIR$/buy.xml" />
|
||||
<option value="$PROJECT_DIR$/buy.lua" />
|
||||
<option value="$PROJECT_DIR$/list.lua" />
|
||||
<option value="$PROJECT_DIR$/core.lua" />
|
||||
<option value="$PROJECT_DIR$/scan.lua" />
|
||||
<option value="$PROJECT_DIR$/info.lua" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@@ -445,34 +448,26 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/list.lua">
|
||||
<entry file="file://$PROJECT_DIR$/sell.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1007" max-vertical-offset="4743">
|
||||
<caret line="90" column="73" selection-start-line="90" selection-start-column="73" selection-end-line="90" selection-end-column="73" />
|
||||
<state vertical-scroll-proportion="-3.0" vertical-offset="3520" max-vertical-offset="10353">
|
||||
<caret line="212" column="12" selection-start-line="212" selection-start-column="12" selection-end-line="212" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/buy.xml">
|
||||
<entry file="file://$PROJECT_DIR$/options.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="6120" max-vertical-offset="7973">
|
||||
<caret line="378" column="37" selection-start-line="378" selection-start-column="37" selection-end-line="378" selection-end-column="37" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/scan.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1831" max-vertical-offset="2737">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2040">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/core.xml">
|
||||
<entry file="file://$PROJECT_DIR$/options.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="714" max-vertical-offset="2261">
|
||||
<caret line="74" column="29" selection-start-line="74" selection-start-column="29" selection-end-line="74" selection-end-column="29" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="3672" max-vertical-offset="6579">
|
||||
<caret line="237" column="0" selection-start-line="237" selection-start-column="0" selection-end-line="249" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -485,34 +480,58 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/core.lua">
|
||||
<entry file="file://$PROJECT_DIR$/core.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="4406" max-vertical-offset="8806">
|
||||
<caret line="286" column="25" selection-start-line="286" selection-start-column="25" selection-end-line="286" selection-end-column="25" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="182" max-vertical-offset="1904">
|
||||
<caret line="61" column="87" selection-start-line="61" selection-start-column="87" selection-end-line="61" selection-end-column="87" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/buy.lua">
|
||||
<entry file="file://$PROJECT_DIR$/list.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="-11.5" vertical-offset="8212" max-vertical-offset="15878">
|
||||
<caret line="502" column="155" selection-start-line="502" selection-start-column="155" selection-end-line="502" selection-end-column="155" />
|
||||
<state vertical-scroll-proportion="-11.928572" vertical-offset="4052" max-vertical-offset="4624">
|
||||
<caret line="258" column="8" selection-start-line="258" selection-start-column="8" selection-end-line="258" selection-end-column="8" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/core.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="8602">
|
||||
<caret line="0" column="17" selection-start-line="0" selection-start-column="17" selection-end-line="0" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/scan.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="700" max-vertical-offset="2737">
|
||||
<caret line="54" column="9" selection-start-line="54" selection-start-column="9" selection-end-line="54" selection-end-column="9" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/buy.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1061" max-vertical-offset="8687">
|
||||
<caret line="90" column="87" selection-start-line="90" selection-start-column="87" selection-end-line="90" selection-end-column="87" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/info.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="272" max-vertical-offset="3060">
|
||||
<caret line="43" column="58" selection-start-line="43" selection-start-column="58" selection-end-line="43" selection-end-column="58" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="921" max-vertical-offset="3060">
|
||||
<caret line="67" column="26" selection-start-line="67" selection-start-column="26" selection-end-line="67" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/sell.lua">
|
||||
<entry file="file://$PROJECT_DIR$/buy.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.33273703" vertical-offset="3520" max-vertical-offset="10353">
|
||||
<caret line="218" column="203" selection-start-line="218" selection-start-column="203" selection-end-line="218" selection-end-column="203" />
|
||||
<state vertical-scroll-proportion="0.36456558" vertical-offset="3645" max-vertical-offset="15045">
|
||||
<caret line="227" column="34" selection-start-line="227" selection-start-column="34" selection-end-line="227" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Aux.buy = {}
|
||||
|
||||
local process_auction, set_message, report, show_dialog, find_auction, hide_sheet, update_sheet, auction_alpha_setter, group_alpha_setter
|
||||
local create_auction_record, show_dialog, find_auction, hide_sheet, update_sheet, auction_alpha_setter, group_alpha_setter
|
||||
local auctions
|
||||
local selectedAuctions = {}
|
||||
local search_query
|
||||
@@ -9,11 +9,11 @@ local current_page
|
||||
local refresh
|
||||
|
||||
function auction_alpha_setter(cell, auction)
|
||||
cell:SetAlpha(auction.gone and 0.4 or 1)
|
||||
cell:SetAlpha(auction.gone and 0.3 or 1)
|
||||
end
|
||||
|
||||
function group_alpha_setter(cell, group)
|
||||
cell:SetAlpha(Aux.util.all(group, function(auction) return auction.gone end) and 0.4 or 1)
|
||||
cell:SetAlpha(Aux.util.all(group, function(auction) return auction.gone end) and 0.3 or 1)
|
||||
end
|
||||
|
||||
local BUYOUT, BID, FULL = 1, 2, 3
|
||||
@@ -22,8 +22,8 @@ Aux.buy.modes = {
|
||||
[BUYOUT] = {
|
||||
name = 'Buyout',
|
||||
on_cell_click = function (sheet, row_index, column_index)
|
||||
local entry_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
|
||||
AuxBuyEntry_OnClick(entry_index)
|
||||
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
|
||||
AuxBuyEntry_OnClick(Aux.util.filter(sheet.data[data_index], function(auction) return not auction.gone end)[1] or sheet.data[data_index][1])
|
||||
end,
|
||||
|
||||
on_cell_enter = function (sheet, row_index, column_index)
|
||||
@@ -35,18 +35,18 @@ Aux.buy.modes = {
|
||||
end,
|
||||
columns = {
|
||||
{
|
||||
title = '#',
|
||||
width = 23,
|
||||
comparator = function(group1, group2) return Aux.util.compare(group1[1].stack_size, group2[1].stack_size, Aux.util.LT) end,
|
||||
title = 'Auctions',
|
||||
width = 70,
|
||||
comparator = function(group1, group2) return Aux.util.compare(getn(Aux.util.filter(group1, function(auction) return not auction.gone end)), getn(Aux.util.filter(group2, function(auction) return not auction.gone end)), Aux.util.LT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, group)
|
||||
cell.text:SetText(group[1].stack_size)
|
||||
cell.text:SetText(getn(Aux.util.filter(group, function(auction) return not auction.gone end)))
|
||||
group_alpha_setter(cell, group)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Auction Item',
|
||||
width = 274,
|
||||
width = 282,
|
||||
comparator = function(group1, group2) return Aux.util.compare(group1[1].name, group2[1].name, Aux.util.GT) end,
|
||||
cell_initializer = function(cell)
|
||||
local icon = CreateFrame('Button', nil, cell)
|
||||
@@ -93,35 +93,18 @@ Aux.buy.modes = {
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Lvl',
|
||||
title = '#',
|
||||
width = 23,
|
||||
comparator = function(group1, group2) return Aux.util.compare(group1[1].level, group2[1].level, Aux.util.GT) end,
|
||||
comparator = function(group1, group2) return Aux.util.compare(group1[1].stack_size, group2[1].stack_size, Aux.util.LT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, group)
|
||||
local level = max(1, group[1].level)
|
||||
local text
|
||||
if level > UnitLevel('player') then
|
||||
text = RED_FONT_COLOR_CODE..level..FONT_COLOR_CODE_CLOSE
|
||||
else
|
||||
text = level
|
||||
end
|
||||
cell.text:SetText(text)
|
||||
cell.text:SetText(group[1].stack_size)
|
||||
group_alpha_setter(cell, group)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Auctions',
|
||||
width = 83,
|
||||
comparator = function(group1, group2) return Aux.util.compare(getn(Aux.util.filter(group1, function(auction) return not auction.gone end)), getn(Aux.util.filter(group2, function(auction) return not auction.gone end)), Aux.util.LT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, group)
|
||||
cell.text:SetText(getn(Aux.util.filter(group, function(auction) return not auction.gone end)))
|
||||
group_alpha_setter(cell, group)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy/ea',
|
||||
width = 90,
|
||||
width = 110,
|
||||
comparator = function(group1, group2) return Aux.util.compare(group1[1].buyout_price_per_unit, group2[1].buyout_price_per_unit, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, group)
|
||||
@@ -131,7 +114,7 @@ Aux.buy.modes = {
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 90,
|
||||
width = 110,
|
||||
comparator = function(group1, group2) return Aux.util.compare(group1[1].buyout_price, group2[1].buyout_price, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, group)
|
||||
@@ -140,12 +123,13 @@ Aux.buy.modes = {
|
||||
end,
|
||||
},
|
||||
},
|
||||
sort_order = {{column = 2, order = 'ascending' }, {column = 4, order = 'ascending'}},
|
||||
},
|
||||
[BID] = {
|
||||
name = 'Bid',
|
||||
on_cell_click = function (sheet, row_index, column_index)
|
||||
local entry_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
|
||||
AuxBuyEntry_OnClick(entry_index)
|
||||
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
|
||||
AuxBuyEntry_OnClick(sheet.data[data_index])
|
||||
end,
|
||||
|
||||
on_cell_enter = function (sheet, row_index, column_index)
|
||||
@@ -157,18 +141,18 @@ Aux.buy.modes = {
|
||||
end,
|
||||
columns = {
|
||||
{
|
||||
title = '#',
|
||||
width = 23,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.stack_size, row2.stack_size, Aux.util.LT) end,
|
||||
title = 'Page',
|
||||
width = 40,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.page, row2.page, Aux.util.LT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(datum.stack_size)
|
||||
cell.text:SetText(datum.page)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Auction Item',
|
||||
width = 157,
|
||||
width = 181,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.tooltip[1][1].text, row2.tooltip[1][1].text, Aux.util.GT) end,
|
||||
cell_initializer = function(cell)
|
||||
local icon = CreateFrame('Button', nil, cell)
|
||||
@@ -214,33 +198,6 @@ Aux.buy.modes = {
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Lvl',
|
||||
width = 23,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.level, row2.level, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
local level = max(1, datum.level)
|
||||
local text
|
||||
if level > UnitLevel('player') then
|
||||
text = RED_FONT_COLOR_CODE..level..FONT_COLOR_CODE_CLOSE
|
||||
else
|
||||
text = level
|
||||
end
|
||||
cell.text:SetText(text)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = '#',
|
||||
width = 23,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.page, row2.page, Aux.util.LT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(datum.page)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Left',
|
||||
width = 30,
|
||||
@@ -262,18 +219,28 @@ Aux.buy.modes = {
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Owner',
|
||||
width = 70,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.owner, row2.owner, Aux.util.GT) end,
|
||||
title = 'High Bidder',
|
||||
width = 95,
|
||||
comparator = function(auction1, auction2) return Aux.util.compare(auction1.high_bidder, auction2.high_bidder, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('LEFT'),
|
||||
cell_setter = function(cell, auction)
|
||||
cell.text:SetText(auction.high_bidder)
|
||||
auction_alpha_setter(cell, auction)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = '#',
|
||||
width = 23,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.stack_size, row2.stack_size, Aux.util.LT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(datum.owner)
|
||||
cell.text:SetText(datum.stack_size)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
width = 140,
|
||||
width = 110,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.bid_per_unit, row2.bid_per_unit, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
@@ -283,7 +250,7 @@ Aux.buy.modes = {
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
width = 140,
|
||||
width = 110,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.bid, row2.bid, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
@@ -292,12 +259,13 @@ Aux.buy.modes = {
|
||||
end,
|
||||
},
|
||||
},
|
||||
sort_order = {{column = 2, order = 'ascending' }, {column = 6, order = 'ascending' }, {column = 3, order = 'ascending'}},
|
||||
},
|
||||
[FULL] = {
|
||||
name = 'Full',
|
||||
on_cell_click = function (sheet, row_index, column_index)
|
||||
local entry_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
|
||||
AuxBuyEntry_OnClick(entry_index)
|
||||
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
|
||||
AuxBuyEntry_OnClick(sheet.data[data_index])
|
||||
end,
|
||||
|
||||
on_cell_enter = function (sheet, row_index, column_index)
|
||||
@@ -454,6 +422,7 @@ Aux.buy.modes = {
|
||||
end,
|
||||
},
|
||||
},
|
||||
sort_order = {},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -544,10 +513,10 @@ function Aux.buy.SearchButton_onclick()
|
||||
usable = AuxBuyUsableCheckButton:GetChecked()
|
||||
}
|
||||
|
||||
set_message('Starting scan')
|
||||
Aux.log('Starting scan')
|
||||
Aux.scan.start{
|
||||
query = search_query,
|
||||
page = 0,
|
||||
page = AuxBuyAllPagesCheckButton:GetChecked() and 0 or AuxBuyPageEditBox:GetNumber(),
|
||||
on_submit_query = function()
|
||||
current_page = nil
|
||||
end,
|
||||
@@ -555,51 +524,42 @@ function Aux.buy.SearchButton_onclick()
|
||||
current_page = page
|
||||
end,
|
||||
on_start_page = function(page, total_pages)
|
||||
set_message('Scanning page ' .. page + 1 .. (total_pages > 0 and ' out of ' .. total_pages or ''))
|
||||
Aux.log('Scanning page ' .. page + 1 .. (total_pages > 0 and ' out of ' .. total_pages or ''))
|
||||
end,
|
||||
on_read_auction = function(i)
|
||||
local auction_item = Aux.info.auction_item(i)
|
||||
if auction_item then
|
||||
if (auction_item.name == search_query.name or search_query.name == '' or not AuxBuyExactCheckButton:GetChecked()) and Aux.info.tooltip_match(tooltip_patterns, auction_item.tooltip) then
|
||||
process_auction(auction_item, current_page)
|
||||
auctions = auctions or {}
|
||||
tinsert(auctions, create_auction_record(auction_item, current_page))
|
||||
end
|
||||
end
|
||||
end,
|
||||
on_complete = function()
|
||||
auctions = auctions or {}
|
||||
if getn(auctions) == 0 then
|
||||
set_message("No auctions were found")
|
||||
else
|
||||
AuxBuyMessage:Hide()
|
||||
end
|
||||
Aux.log('Scan completed: '..getn(auctions)..' auctions found')
|
||||
AuxBuyStopButton:Hide()
|
||||
AuxBuySearchButton:Show()
|
||||
refresh = true
|
||||
end,
|
||||
on_abort = function()
|
||||
auctions = auctions or {}
|
||||
if getn(auctions) == 0 then
|
||||
set_message("No auctions were found")
|
||||
else
|
||||
AuxBuyMessage:Hide()
|
||||
end
|
||||
Aux.log('Scan aborted: '..getn(auctions)..' auctions found')
|
||||
AuxBuyStopButton:Hide()
|
||||
AuxBuySearchButton:Show()
|
||||
refresh = true
|
||||
end,
|
||||
next_page = function(page, total_pages)
|
||||
local last_page = max(total_pages - 1, 0)
|
||||
if page < last_page then
|
||||
return page + 1
|
||||
end
|
||||
if AuxBuyAllPagesCheckButton:GetChecked() then
|
||||
local last_page = max(total_pages - 1, 0)
|
||||
if page < last_page then
|
||||
return page + 1
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
function set_message(msg)
|
||||
Aux.log(msg)
|
||||
end
|
||||
|
||||
function show_dialog(buyout_mode, entry, amount)
|
||||
AuxBuyConfirmation.tooltip = entry.tooltip
|
||||
AuxBuyConfirmation.EnhTooltip_info = entry.EnhTooltip_info
|
||||
@@ -634,17 +594,16 @@ end
|
||||
function find_auction(entry, buyout_mode, express_mode)
|
||||
|
||||
if entry.gone then
|
||||
Aux.log('Auction not available')
|
||||
return
|
||||
end
|
||||
|
||||
if buyout_mode and not entry.buyout_price then
|
||||
Aux.log('Auction has no buyout price')
|
||||
return
|
||||
end
|
||||
|
||||
-- if not buyout_mode and entry.high_bidder == UnitName('player') then
|
||||
-- return
|
||||
-- end
|
||||
|
||||
|
||||
Aux.log('Processing '..(buyout_mode and 'buyout' or 'bid')..' request')
|
||||
AuxBuySearchButton:Disable()
|
||||
|
||||
local amount
|
||||
@@ -661,7 +620,6 @@ function find_auction(entry, buyout_mode, express_mode)
|
||||
PlaySound('igMainMenuOptionCheckBoxOn')
|
||||
|
||||
local found
|
||||
local order_key = Aux.auction_key(entry.tooltip, entry.stack_size, amount)
|
||||
|
||||
Aux.scan.start{
|
||||
query = search_query,
|
||||
@@ -681,23 +639,18 @@ function find_auction(entry, buyout_mode, express_mode)
|
||||
|
||||
local stack_size = auction_item.charges or auction_item.count
|
||||
local bid = (auction_item.current_bid > 0 and auction_item.current_bid or auction_item.min_bid) + auction_item.min_increment
|
||||
|
||||
local auction_amount
|
||||
if buyout_mode then
|
||||
auction_amount = auction_item.buyout_price
|
||||
else
|
||||
auction_amount = bid
|
||||
end
|
||||
|
||||
local key = Aux.auction_key(auction_item.tooltip, stack_size, auction_amount)
|
||||
local signature = Aux.auction_signature(auction_item.hyperlink, stack_size, bid, auction_item.buyout_price)
|
||||
|
||||
if key == order_key then
|
||||
if entry.signature == signature then
|
||||
ctrl.suspend()
|
||||
found = true
|
||||
Aux.log('Matching auction found')
|
||||
|
||||
if express_mode then
|
||||
if GetMoney() >= amount then
|
||||
PlaceAuctionBid("list", i, amount)
|
||||
Aux.log((buyout_mode and 'Purchased ' or 'Bid on ')..entry.hyperlink..' x '..entry.stack_size)
|
||||
entry.gone = true
|
||||
refresh = true
|
||||
else
|
||||
@@ -708,7 +661,8 @@ function find_auction(entry, buyout_mode, express_mode)
|
||||
Aux.buy.dialog_action = function()
|
||||
if GetMoney() >= amount then
|
||||
PlaceAuctionBid("list", i, amount)
|
||||
entry.gone = true
|
||||
Aux.log((buyout_mode and 'Purchased ' or 'Bid on ')..entry.hyperlink..' x '..entry.stack_size)
|
||||
entry.gone = true
|
||||
refresh = true
|
||||
else
|
||||
Aux.log('Not enough money.')
|
||||
@@ -745,13 +699,11 @@ function find_auction(entry, buyout_mode, express_mode)
|
||||
}
|
||||
end
|
||||
|
||||
function AuxBuyEntry_OnClick(entry_index)
|
||||
function AuxBuyEntry_OnClick(entry)
|
||||
|
||||
local express_mode = IsAltKeyDown()
|
||||
local buyout_mode = arg1 == 'LeftButton'
|
||||
|
||||
local entry = auctions[entry_index]
|
||||
|
||||
if IsControlKeyDown() then
|
||||
DressUpItemLink(entry.hyperlink)
|
||||
else
|
||||
@@ -759,37 +711,36 @@ function AuxBuyEntry_OnClick(entry_index)
|
||||
end
|
||||
end
|
||||
|
||||
function process_auction(auction_item, current_page)
|
||||
auctions = auctions or {}
|
||||
function create_auction_record(auction_item, current_page)
|
||||
|
||||
local stack_size = auction_item.charges or auction_item.count
|
||||
local bid = (auction_item.current_bid > 0 and auction_item.current_bid or auction_item.min_bid) + auction_item.min_increment
|
||||
local buyout_price = auction_item.buyout_price > 0 and auction_item.buyout_price or nil
|
||||
local buyout_price_per_unit = buyout_price and Aux_Round(auction_item.buyout_price/stack_size)
|
||||
|
||||
if auction_item.owner ~= UnitName('player') then
|
||||
tinsert(auctions, {
|
||||
name = auction_item.name,
|
||||
level = auction_item.level,
|
||||
texture = auction_item.texture,
|
||||
tooltip = auction_item.tooltip,
|
||||
stack_size = stack_size,
|
||||
buyout_price = buyout_price,
|
||||
buyout_price_per_unit = buyout_price_per_unit,
|
||||
quality = auction_item.quality,
|
||||
hyperlink = auction_item.hyperlink,
|
||||
itemstring = auction_item.itemstring,
|
||||
page = current_page,
|
||||
bid = bid,
|
||||
bid_per_unit = Aux_Round(bid/stack_size),
|
||||
owner = auction_item.owner,
|
||||
duration = auction_item.duration,
|
||||
usable = auction_item.usable,
|
||||
high_bidder = auction_item.high_bidder,
|
||||
|
||||
EnhTooltip_info = auction_item.EnhTooltip_info,
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
signature = Aux.auction_signature(auction_item.hyperlink, stack_size, bid, auction_item.buyout_price),
|
||||
|
||||
name = auction_item.name,
|
||||
level = auction_item.level,
|
||||
texture = auction_item.texture,
|
||||
tooltip = auction_item.tooltip,
|
||||
stack_size = stack_size,
|
||||
buyout_price = buyout_price,
|
||||
buyout_price_per_unit = buyout_price_per_unit,
|
||||
quality = auction_item.quality,
|
||||
hyperlink = auction_item.hyperlink,
|
||||
itemstring = auction_item.itemstring,
|
||||
page = current_page,
|
||||
bid = bid,
|
||||
bid_per_unit = Aux_Round(bid/stack_size),
|
||||
owner = auction_item.owner,
|
||||
duration = auction_item.duration,
|
||||
usable = auction_item.usable,
|
||||
high_bidder = auction_item.high_bidder,
|
||||
|
||||
EnhTooltip_info = auction_item.EnhTooltip_info,
|
||||
}
|
||||
end
|
||||
|
||||
function Aux.buy.onupdate()
|
||||
|
||||
@@ -48,10 +48,6 @@
|
||||
<FontString inherits="GameFontNormal" text="Aux Buy">
|
||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="20" y="-18"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
|
||||
<FontString name="AuxBuyMessage" inherits="GameFontWhite">
|
||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="145" y="-150"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
<Layer level="ARTWORK">
|
||||
<FontString inherits="GameFontHighlightSmall" text="Filters">
|
||||
@@ -71,7 +67,8 @@
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="179" y="-94"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this.sheet = Aux.sheet.create(this, Aux.buy.modes[1].columns, Aux.util.map(Aux.buy.modes[1].columns, function(column) return { column = column, sort_ascending = true } end), Aux.buy.modes[1].on_cell_click, Aux.buy.modes[1].on_cell_enter, Aux.buy.modes[1].on_cell_leave)
|
||||
local sort_order = Aux.util.map(Aux.buy.modes[1].sort_order, function(column_order) return { column = Aux.buy.modes[1].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
|
||||
this.sheet = Aux.sheet.create(this, Aux.buy.modes[1].columns, sort_order, Aux.buy.modes[1].on_cell_click, Aux.buy.modes[1].on_cell_enter, Aux.buy.modes[1].on_cell_leave)
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
@@ -80,7 +77,8 @@
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="179" y="-94"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this.sheet = Aux.sheet.create(this, Aux.buy.modes[2].columns, Aux.util.map(Aux.buy.modes[2].columns, function(column) return { column = column, sort_ascending = true } end), Aux.buy.modes[2].on_cell_click, Aux.buy.modes[2].on_cell_enter, Aux.buy.modes[2].on_cell_leave)
|
||||
local sort_order = Aux.util.map(Aux.buy.modes[2].sort_order, function(column_order) return { column = Aux.buy.modes[2].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
|
||||
this.sheet = Aux.sheet.create(this, Aux.buy.modes[2].columns, sort_order, Aux.buy.modes[2].on_cell_click, Aux.buy.modes[2].on_cell_enter, Aux.buy.modes[2].on_cell_leave)
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
@@ -89,19 +87,21 @@
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="179" y="-94"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this.sheet = Aux.sheet.create(this, Aux.buy.modes[3].columns, Aux.util.map(Aux.buy.modes[3].columns, function(column) return { column = column, sort_ascending = true } end), Aux.buy.modes[3].on_cell_click, Aux.buy.modes[3].on_cell_enter, Aux.buy.modes[3].on_cell_leave)
|
||||
local sort_order = Aux.util.map(Aux.buy.modes[3].sort_order, function(column_order) return { column = Aux.buy.modes[3].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
|
||||
this.sheet = Aux.sheet.create(this, Aux.buy.modes[3].columns, sort_order, Aux.buy.modes[3].on_cell_click, Aux.buy.modes[3].on_cell_enter, Aux.buy.modes[3].on_cell_leave)
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Frame name="AuxBuyFilters">
|
||||
<Size><AbsDimension x="1" y="1"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="28" y="-112"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="28" y="-117"/></Offset></Anchor></Anchors>
|
||||
<Frames>
|
||||
<Frame name="AuxBuyModeDropDown" inherits="UIDropDownMenuTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0" /></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="0" /></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
UIDropDownMenu_SetWidth(140)
|
||||
UIDropDownMenu_Initialize(this, AuxBuyModeDropDown_Initialize)
|
||||
UIDropDownMenu_SetSelectedValue(this, 1)
|
||||
</OnLoad>
|
||||
@@ -119,8 +119,8 @@
|
||||
</Frame>
|
||||
|
||||
<EditBox name="AuxBuyNameInputBox" autoFocus="false" inherits="InputBoxTemplate">
|
||||
<Size><AbsDimension x="120" y="22"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-65"/></Offset></Anchor></Anchors>
|
||||
<Size><AbsDimension x="119" y="22"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="1" y="-56"/></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString inherits="GameFontHighlightSmall" text="Name" justifyH="LEFT">
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
<CheckButton name="AuxBuyExactCheckButton" inherits="UICheckButtonTemplate" checked="true">
|
||||
<Size><AbsDimension x="22" y="22"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="123" y="-65" /></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="123" y="-56" /></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString inherits="GameFontHighlightSmall" text="Exact" justifyH="LEFT">
|
||||
@@ -170,7 +170,7 @@
|
||||
</CheckButton>
|
||||
|
||||
<Frame name="AuxBuyCategoryDropDown" inherits="UIDropDownMenuTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="-30" /></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="-89" /></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString inherits="GameFontHighlightSmall" text="Category" justifyH="LEFT">
|
||||
@@ -180,8 +180,8 @@
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
UIDropDownMenu_SetWidth(140)
|
||||
UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize)
|
||||
UIDropDownMenu_SetWidth(140)
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize)
|
||||
@@ -190,9 +190,10 @@
|
||||
</Frame>
|
||||
|
||||
<Frame name="AuxBuyQualityDropDown" inherits="UIDropDownMenuTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="-101" /></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="-128" /></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
UIDropDownMenu_SetWidth(140)
|
||||
UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize)
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
@@ -211,7 +212,7 @@
|
||||
<EditBox name="AuxBuyMinLevel" letters="2" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
|
||||
<Size><AbsDimension x="30" y="22"/></Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-130"/></Offset></Anchor>
|
||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="1" y="-167"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
@@ -244,7 +245,7 @@
|
||||
</EditBox>
|
||||
<CheckButton name="AuxBuyUsableCheckButton" inherits="UICheckButtonTemplate">
|
||||
<Size><AbsDimension x="22" y="22"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="100" y="-130" /></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="72" y="-167" /></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString inherits="GameFontHighlightSmall" text="Usable" justifyH="LEFT">
|
||||
@@ -256,7 +257,7 @@
|
||||
|
||||
<EditBox name="AuxBuyTooltipInputBox" autoFocus="false" inherits="InputBoxTemplate">
|
||||
<Size><AbsDimension x="110" y="22"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-131"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-201"/></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString inherits="GameFontHighlightSmall" text="Tooltip" justifyH="LEFT">
|
||||
@@ -306,14 +307,55 @@
|
||||
</Button>
|
||||
<Button name="AuxBuyTooltipButton" inherits="UIPanelButtonTemplate" text="+">
|
||||
<Size><AbsDimension x="22" y="22"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="127" y="-131"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="127" y="-201"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AuxBuyTooltipButton_OnClick(this)
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
|
||||
<EditBox name="AuxBuyPageEditBox" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
|
||||
<Size><AbsDimension x="30" y="22"/></Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="1" y="-235"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString inherits="GameFontHighlightSmall" text="Page" justifyH="LEFT">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="9"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:EnableMouse(false)
|
||||
this:SetAlpha(0.5)
|
||||
</OnLoad>
|
||||
<OnEnterPressed>
|
||||
this:ClearFocus()
|
||||
</OnEnterPressed>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
<CheckButton name="AuxBuyAllPagesCheckButton" inherits="UICheckButtonTemplate" checked="true">
|
||||
<Size><AbsDimension x="22" y="22"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="34" y="-235" /></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString inherits="GameFontHighlightSmall" text="All" justifyH="LEFT">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="9"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AuxBuyPageEditBox:EnableMouse(not this:GetChecked())
|
||||
AuxBuyPageEditBox:SetAlpha(this:GetChecked() and 0.5 or 1)
|
||||
AuxBuyPageEditBox:ClearFocus()
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<Button name="AuxBuySearchButton" inherits="UIPanelButtonTemplate" text="Search">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
AuxVersion = "1.5.0"
|
||||
AuxVersion = "1.6.0"
|
||||
AuxAuthors = "shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)"
|
||||
|
||||
local lastRightClickAction = GetTime()
|
||||
@@ -306,7 +306,6 @@ function Aux_AddPanels()
|
||||
AuxLogFrame:SetPoint('TOP', buyFrame, 100, -43)
|
||||
relevel(buyFrame)
|
||||
buyFrame:Hide()
|
||||
-- AuxLogFrame:SetFrameLevel(buyFrame:GetFrameLevel() + 1)
|
||||
|
||||
local optionsFrame = CreateFrame("Frame", "AuxOptionsButtonPanel", AuctionFrame, "AuxOptionsButtonTemplate")
|
||||
optionsFrame:SetParent("AuctionFrame")
|
||||
@@ -497,17 +496,6 @@ end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
function Aux.auction_key(tooltip, stack_size, amount)
|
||||
local key = ''
|
||||
for i, line in ipairs(tooltip) do
|
||||
local left_text = line[1].text
|
||||
local right_text = line[2].text
|
||||
if left_text then
|
||||
key = key .. left_text .. (i == 1 and '' or '_')
|
||||
end
|
||||
if right_text then
|
||||
key = key .. right_text .. '_'
|
||||
end
|
||||
end
|
||||
return key .. (stack_size or '0') .. '_' .. (amount or '0')
|
||||
function Aux.auction_signature(hyperlink, stack_size, amount)
|
||||
return hyperlink .. (stack_size or '0') .. '_' .. (amount or '0')
|
||||
end
|
||||
@@ -16,7 +16,7 @@
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<ScrollingMessageFrame name="AuxLogFrame" hidden="false">
|
||||
<ScrollingMessageFrame name="AuxLogFrame" hidden="false" maxLines="500">
|
||||
<Size><AbsDimension x="400" y="45"/></Size>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
@@ -59,11 +59,8 @@
|
||||
getglobal(this:GetName()..'Middle'):Hide()
|
||||
</OnLeave>
|
||||
<OnHyperlinkClick>
|
||||
ChatFrame_OnHyperlinkShow(arg1)
|
||||
<!--ChatFrame_OnHyperlinkShow(arg1) TODO not working because of center -->
|
||||
</OnHyperlinkClick>
|
||||
<OnHyperlinkLeave>
|
||||
ChatFrame_OnHyperlinkHide()
|
||||
</OnHyperlinkLeave>
|
||||
<OnMouseWheel>
|
||||
if arg1 == 1 then
|
||||
this:ScrollUp()
|
||||
@@ -71,9 +68,6 @@
|
||||
this:ScrollDown()
|
||||
end
|
||||
</OnMouseWheel>
|
||||
<OnMouseUp>
|
||||
this:ScrollToBottom()
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
<FontString inherits="ChatFontNormal" justifyH="CENTER"/>
|
||||
</ScrollingMessageFrame>
|
||||
@@ -104,21 +98,6 @@
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
if ( this.tooltipText ) then
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
|
||||
GameTooltip:SetText(this.tooltipText, nil, nil, nil, nil, 1);
|
||||
end
|
||||
if ( this.tooltipRequirement ) then
|
||||
GameTooltip:AddLine(this.tooltipRequirement, "", 1.0, 1.0, 1.0);
|
||||
GameTooltip:Show();
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
<ThumbTexture name="$parentThumb" file="Interface\Buttons\UI-SliderBar-Button-Horizontal">
|
||||
<Size>
|
||||
<AbsDimension x="32" y="32"/>
|
||||
|
||||
@@ -64,7 +64,7 @@ function Aux.info.auction_item(index)
|
||||
|
||||
local name, texture, count, quality, usable, level, min_bid, min_increment, buyout_price, current_bid, high_bidder, owner, sale_status, id = GetAuctionItemInfo("list", index)
|
||||
local duration = GetAuctionItemTimeLeft("list", index)
|
||||
|
||||
|
||||
auction_item.texture = texture
|
||||
auction_item.count = count
|
||||
auction_item.min_bid = min_bid
|
||||
|
||||
@@ -16,7 +16,7 @@ function Aux.sheet.render(sheet)
|
||||
for i, column in ipairs(sheet.columns) do
|
||||
local sort_info = sheet.sort_order[1]
|
||||
|
||||
if sort_info.column == column then
|
||||
if sort_info and sort_info.column == column then
|
||||
if sort_info.sort_ascending then
|
||||
sheet.labels[i].sort_texture:SetTexCoord(0,0.55,0.2,0.9)
|
||||
sheet.labels[i].sort_texture:SetVertexColor(0.2,1,0)
|
||||
@@ -257,15 +257,8 @@ function Aux.list.sort(sheet, column_index)
|
||||
if sheet.sort_order[1].column == column then
|
||||
sheet.sort_order[1].sort_ascending = not sheet.sort_order[1].sort_ascending
|
||||
else
|
||||
for index, sort_info in ipairs(sheet.sort_order) do
|
||||
if sort_info.column == column then
|
||||
local temp = sort_info
|
||||
table.remove(sheet.sort_order, index)
|
||||
table.insert(sheet.sort_order, 1, temp)
|
||||
break
|
||||
end
|
||||
end
|
||||
sheet.sort_order[1].sort_ascending = true
|
||||
sort_order = Aux.util.filter(sort_order, function(sort_info) return not sort_info.column == column end)
|
||||
tinsert(sort_order, 1, {column=column, sort_ascending=true})
|
||||
end
|
||||
|
||||
Aux.util.merge_sort(sheet.data, Aux.list.row_comparator(sheet))
|
||||
|
||||
@@ -131,12 +131,12 @@ function submit_query(k)
|
||||
state.job.on_submit_query()
|
||||
end
|
||||
wait_for_results(function()
|
||||
--wait_for_complete_results(function()
|
||||
wait_for_complete_results(function()
|
||||
if state.job.on_page_loaded then
|
||||
state.job.on_page_loaded(state.page)
|
||||
end
|
||||
k()
|
||||
end)--end)
|
||||
end)end)
|
||||
QueryAuctionItems(
|
||||
state.job.query.name,
|
||||
state.job.query.min_level,
|
||||
|
||||
Reference in New Issue
Block a user