some more final touches for the new ui, made custom tooltip that can be offset off the cursor
This commit is contained in:
@@ -262,7 +262,7 @@
|
||||
<Layer level="ARTWORK">
|
||||
<FontString name="$parentText" inherits="GameFontNormalSmall">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"/>
|
||||
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="3" y="0"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
@@ -328,7 +328,7 @@
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
if this.tooltip then
|
||||
GameTooltip:Hide()
|
||||
AuxTooltip:Hide()
|
||||
end
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
@@ -383,9 +383,13 @@
|
||||
</Anchors>
|
||||
</Button>
|
||||
<Button name="AuxAuctionFrameButton" inherits="UIPanelButtonTemplate" text="Default UI">
|
||||
<Size><AbsDimension x="60" y="15"/></Size>
|
||||
<Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxCloseButton"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor></Anchors>
|
||||
<Size><AbsDimension x="65" y="17"/></Size>
|
||||
<Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxCloseButton"><Offset><AbsDimension x="-3" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
this:SetTextFontObject('GameFontNormalSmall')
|
||||
this:SetHighlightFontObject('GameFontHighlightSmall')
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
if AuctionFrame:IsVisible() then
|
||||
Aux.blizzard_ui_shown = false
|
||||
@@ -475,7 +479,7 @@
|
||||
</Anchor>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-5" y="0"/>
|
||||
<AbsDimension x="-10" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="BOTTOM">
|
||||
|
||||
+133
-123
@@ -29,30 +29,20 @@ public.views = {
|
||||
end,
|
||||
on_row_enter = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(.5)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info, 0, 30)
|
||||
end,
|
||||
on_row_leave = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(0)
|
||||
GameTooltip:Hide()
|
||||
AuxTooltip:Hide()
|
||||
end,
|
||||
row_setter = function(row, group)
|
||||
row.tooltip = group[1].tooltip
|
||||
row.EnhTooltip_info = group[1].EnhTooltip_info
|
||||
end,
|
||||
columns = {
|
||||
{
|
||||
title = 'Avail',
|
||||
width = 40,
|
||||
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 = 'Auction Item',
|
||||
width = 342,
|
||||
width = 280,
|
||||
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)
|
||||
@@ -102,9 +92,19 @@ public.views = {
|
||||
group_alpha_setter(cell, group)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(group[1].buyout_price))
|
||||
group_alpha_setter(cell, group)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy/ea',
|
||||
width = 93,
|
||||
width = 80,
|
||||
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)
|
||||
@@ -113,12 +113,12 @@ public.views = {
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 93,
|
||||
comparator = function(group1, group2) return Aux.util.compare(group1[1].buyout_price, group2[1].buyout_price, Aux.util.GT) end,
|
||||
title = 'Avail',
|
||||
width = 40,
|
||||
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(Aux.util.money_string(group[1].buyout_price))
|
||||
cell.text:SetText(getn(Aux.util.filter(group, function(auction) return not auction.gone end)))
|
||||
group_alpha_setter(cell, group)
|
||||
end,
|
||||
},
|
||||
@@ -133,30 +133,20 @@ public.views = {
|
||||
end,
|
||||
on_row_enter = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(.5)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info, 0, 30)
|
||||
end,
|
||||
on_row_leave = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(0)
|
||||
GameTooltip:Hide()
|
||||
AuxTooltip:Hide()
|
||||
end,
|
||||
row_setter = function(row, datum)
|
||||
row.tooltip = datum.tooltip
|
||||
row.EnhTooltip_info = datum.EnhTooltip_info
|
||||
end,
|
||||
columns = {
|
||||
{
|
||||
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.page)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Auction Item',
|
||||
width = 206,
|
||||
width = 280,
|
||||
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)
|
||||
@@ -196,6 +186,46 @@ public.views = {
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Qty',
|
||||
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.stack_size)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Status',
|
||||
width = 70,
|
||||
comparator = function(auction1, auction2) return Aux.util.compare(auction1.status, auction2.status, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('CENTER'),
|
||||
cell_setter = function(cell, auction)
|
||||
cell.text:SetText(auction.status)
|
||||
auction_alpha_setter(cell, auction)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Left',
|
||||
width = 30,
|
||||
@@ -217,42 +247,12 @@ public.views = {
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Status',
|
||||
width = 70,
|
||||
comparator = function(auction1, auction2) return Aux.util.compare(auction1.status, auction2.status, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('CENTER'),
|
||||
cell_setter = function(cell, auction)
|
||||
cell.text:SetText(auction.status)
|
||||
auction_alpha_setter(cell, auction)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Qty',
|
||||
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)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid))
|
||||
cell.text:SetText(datum.page)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
@@ -267,30 +267,20 @@ public.views = {
|
||||
end,
|
||||
on_row_enter = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(.5)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info, 0, 20)
|
||||
end,
|
||||
on_row_leave = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(0)
|
||||
GameTooltip:Hide()
|
||||
AuxTooltip:Hide()
|
||||
end,
|
||||
row_setter = function(row, datum)
|
||||
row.tooltip = datum.tooltip
|
||||
row.EnhTooltip_info = datum.EnhTooltip_info
|
||||
end,
|
||||
columns = {
|
||||
{
|
||||
title = 'Qty',
|
||||
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.stack_size)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Auction Item',
|
||||
width = 157,
|
||||
width = 280,
|
||||
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)
|
||||
@@ -307,8 +297,8 @@ public.views = {
|
||||
icon:SetPoint('LEFT', cell)
|
||||
icon:SetWidth(12)
|
||||
icon:SetHeight(12)
|
||||
icon:SetScript('OnEnter', function() Aux.info.set_game_tooltip(this, cell.tooltip, 'ANCHOR_CURSOR', cell.EnhTooltip_info) end)
|
||||
icon:SetScript('OnLeave', function() GameTooltip:Hide() end)
|
||||
icon:SetScript('OnEnter', function() Aux.info.set_game_tooltip(this, cell.tooltip, 'ANCHOR_CURSOR', cell.EnhTooltip_info, 0, 30) end)
|
||||
icon:SetScript('OnLeave', function() AuxTooltip:Hide() end)
|
||||
local text = cell:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
|
||||
text:SetPoint("LEFT", icon, "RIGHT", 1, 0)
|
||||
text:SetPoint('TOPRIGHT', cell)
|
||||
@@ -349,6 +339,66 @@ public.views = {
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Qty',
|
||||
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.stack_size)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 80,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price, row2.buyout_price, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(Aux.util.money_string(datum.buyout_price))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy/ea',
|
||||
width = 80,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price_per_unit, row2.buyout_price_per_unit, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(Aux.util.money_string(datum.buyout_price_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Status',
|
||||
width = 70,
|
||||
comparator = function(auction1, auction2) return Aux.util.compare(auction1.status, auction2.status, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('CENTER'),
|
||||
cell_setter = function(cell, auction)
|
||||
cell.text:SetText(auction.status)
|
||||
auction_alpha_setter(cell, auction)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Left',
|
||||
width = 30,
|
||||
@@ -379,46 +429,6 @@ public.views = {
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
width = 70,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy/ea',
|
||||
width = 70,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price_per_unit, row2.buyout_price_per_unit, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(Aux.util.money_string(datum.buyout_price_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
width = 70,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 70,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price, row2.buyout_price, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(Aux.util.money_string(datum.buyout_price))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
},
|
||||
sort_order = {},
|
||||
},
|
||||
@@ -458,18 +468,18 @@ function update_sheet()
|
||||
local buyout_auctions = auctions and Aux.util.filter(auctions, function(auction) return auction.owner ~= UnitName('player') and auction.buyout_price end) or {}
|
||||
Aux.list.populate(AuxFilterSearchFrameResultsBuyListing.sheet, auctions and Aux.util.group_by(buyout_auctions, function(a1, a2) return a1.hyperlink == a2.hyperlink and a1.stack_size == a2.stack_size and a1.buyout_price == a2.buyout_price end) or {})
|
||||
AuxFilterSearchFrameResults:SetWidth(AuxFilterSearchFrameResultsBuyListing:GetWidth() + 40)
|
||||
AuxFrame:SetWidth(AuxFilterSearchFrameFilters:GetWidth() + AuxFilterSearchFrameResults:GetWidth() + 20)
|
||||
AuxFrame:SetWidth(AuxFilterSearchFrameFilters:GetWidth() + AuxFilterSearchFrameResults:GetWidth() + 15)
|
||||
elseif private.view == BID then
|
||||
AuxFilterSearchFrameResultsBidListing:Show()
|
||||
local bid_auctions = auctions and Aux.util.filter(auctions, function(auction) return auction.owner ~= UnitName('player') end) or {}
|
||||
Aux.list.populate(AuxFilterSearchFrameResultsBidListing.sheet, bid_auctions)
|
||||
AuxFilterSearchFrameResults:SetWidth(AuxFilterSearchFrameResultsBidListing:GetWidth() + 40)
|
||||
AuxFrame:SetWidth(AuxFilterSearchFrameFilters:GetWidth() + AuxFilterSearchFrameResults:GetWidth() + 20)
|
||||
AuxFrame:SetWidth(AuxFilterSearchFrameFilters:GetWidth() + AuxFilterSearchFrameResults:GetWidth() + 15)
|
||||
elseif private.view == FULL then
|
||||
AuxFilterSearchFrameResultsFullListing:Show()
|
||||
Aux.list.populate(AuxFilterSearchFrameResultsFullListing.sheet, auctions or {})
|
||||
AuxFilterSearchFrameResults:SetWidth(AuxFilterSearchFrameResultsFullListing:GetWidth() + 40)
|
||||
AuxFrame:SetWidth(AuxFilterSearchFrameFilters:GetWidth() + AuxFilterSearchFrameResults:GetWidth() + 20)
|
||||
AuxFrame:SetWidth(AuxFilterSearchFrameFilters:GetWidth() + AuxFilterSearchFrameResults:GetWidth() + 15)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<Frame name="AuxFilterSearchFrame" hidden="true" parent="AuxFrame" setAllPoints="true">
|
||||
<Frames>
|
||||
<Frame name="$parentFilters" inherits="AuxFrameBoxTemplate">
|
||||
<Size><AbsDimension x="180" y="326"/></Size>
|
||||
<Size><AbsDimension x="178" y="326"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="-35"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
<Button name="$parentSearchButton" inherits="UIPanelButtonTemplate" text="Search">
|
||||
<Size><AbsDimension x="90" y="26"/></Size>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="5" y="5"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="8" y="15"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
Aux.filter_search_frame.start_search()
|
||||
@@ -186,7 +186,7 @@
|
||||
</Button>
|
||||
<Button name="$parentStopButton" inherits="UIPanelButtonTemplate" text="Stop" hidden="true">
|
||||
<Size><AbsDimension x="90" y="26"/></Size>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="5" y="5"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="8" y="15"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
Aux.filter_search_frame.stop_search()
|
||||
@@ -194,7 +194,7 @@
|
||||
</Scripts>
|
||||
</Button>
|
||||
<EditBox name="$parentPageEditBox" numeric="true" autoFocus="false" inherits="AuxInputBoxTemplate">
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="110" y="5"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="111" y="15"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
getglobal(this:GetName()..'Label'):SetText('Page')
|
||||
@@ -209,7 +209,7 @@
|
||||
</EditBox>
|
||||
<CheckButton name="$parentAllPagesCheckButton" inherits="UICheckButtonTemplate" checked="true">
|
||||
<Size><AbsDimension x="22" y="22"/></Size>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="143" y="5"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="144" y="15"/></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString inherits="GameFontNormalSmall" text="All" justifyH="LEFT">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local TOOLTIP_LENGTH = 30
|
||||
|
||||
Aux.info = {}
|
||||
local private, public = {}, {}
|
||||
Aux.info = public
|
||||
|
||||
local hyperlink_item, item_id, item_charges, item_signature, parse_item_signature, parse_hyperlink
|
||||
|
||||
@@ -92,15 +93,31 @@ function Aux.info.auction_item(index, type)
|
||||
return auction_item
|
||||
end
|
||||
|
||||
function Aux.info.set_game_tooltip(owner, tooltip, anchor, EnhTooltip_info)
|
||||
GameTooltip:SetOwner(owner, anchor)
|
||||
function public.reanchor_tooltip()
|
||||
if private.anchor_cursor then
|
||||
this:ClearAllPoints()
|
||||
local x, y = GetCursorPosition()
|
||||
x, y = x / UIParent:GetEffectiveScale() + private.x_offset, y / UIParent:GetEffectiveScale() + private.y_offset
|
||||
this:SetPoint('BOTTOM', UIParent, 'BOTTOMLEFT', x, y)
|
||||
end
|
||||
end
|
||||
|
||||
function Aux.info.set_game_tooltip(owner, tooltip, anchor, EnhTooltip_info, x_offset, y_offset)
|
||||
if anchor == 'ANCHOR_CURSOR' and (x_offset or y_offset) then
|
||||
private.anchor_cursor = true
|
||||
private.x_offset = x_offset
|
||||
private.y_offset = y_offset
|
||||
anchor = 'BOTTOM'
|
||||
else
|
||||
private.anchor_cursor = false
|
||||
end
|
||||
AuxTooltip:SetOwner(owner, anchor)
|
||||
for _, line in ipairs(tooltip) do
|
||||
GameTooltip:AddDoubleLine(line[1].text, line[2].text, line[1].r, line[1].b, line[1].g, line[2].r, line[2].b, line[2].g, true)
|
||||
AuxTooltip:AddDoubleLine(line[1].text, line[2].text, line[1].r, line[1].b, line[1].g, line[2].r, line[2].b, line[2].g, true)
|
||||
end
|
||||
GameTooltip:Show()
|
||||
|
||||
AuxTooltip:Show()
|
||||
if EnhTooltip and EnhTooltip_info then
|
||||
EnhTooltip.TooltipCall(GameTooltip, EnhTooltip_info.name, EnhTooltip_info.hyperlink, EnhTooltip_info.quality, EnhTooltip_info.count)
|
||||
EnhTooltip.TooltipCAux(AuxTooltip, EnhTooltip_info.name, EnhTooltip_info.hyperlink, EnhTooltip_info.quality, EnhTooltip_info.count)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -120,7 +137,7 @@ function Aux.info.tooltip(setter)
|
||||
getglobal('AuxInfoTooltipTextRight'..i):SetText()
|
||||
end
|
||||
|
||||
AuxInfoTooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||
AuxInfoTooltip:SetOwner(UIParent, 'ANCHOR_NONE')
|
||||
setter(AuxInfoTooltip)
|
||||
AuxInfoTooltip:Show()
|
||||
|
||||
|
||||
@@ -3,4 +3,11 @@
|
||||
<Script file="info.lua"/>
|
||||
|
||||
<GameTooltip name="AuxInfoTooltip" inherits="GameTooltipTemplate"/>
|
||||
<GameTooltip name="AuxTooltip" parent="UIParent" inherits="GameTooltipTemplate">
|
||||
<Scripts>
|
||||
<OnUpdate>
|
||||
Aux.info.reanchor_tooltip()
|
||||
</OnUpdate>
|
||||
</Scripts>
|
||||
</GameTooltip>
|
||||
</Ui>
|
||||
+103
-83
@@ -82,11 +82,11 @@ public.views = {
|
||||
end,
|
||||
on_row_enter = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(.5)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info, 0, 30)
|
||||
end,
|
||||
on_row_leave = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(0)
|
||||
GameTooltip:Hide()
|
||||
AuxTooltip:Hide()
|
||||
end,
|
||||
row_setter = function(row, group)
|
||||
row.tooltip = group[1].tooltip
|
||||
@@ -105,7 +105,7 @@ public.views = {
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 93,
|
||||
width = 80,
|
||||
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)
|
||||
@@ -115,7 +115,7 @@ public.views = {
|
||||
},
|
||||
{
|
||||
title = 'Buy/ea',
|
||||
width = 93,
|
||||
width = 80,
|
||||
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)
|
||||
@@ -144,11 +144,11 @@ public.views = {
|
||||
end,
|
||||
on_row_enter = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(.5)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info, 0, 30)
|
||||
end,
|
||||
on_row_leave = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(0)
|
||||
GameTooltip:Hide()
|
||||
AuxTooltip:Hide()
|
||||
end,
|
||||
row_setter = function(row, datum)
|
||||
row.tooltip = datum.tooltip
|
||||
@@ -156,15 +156,45 @@ public.views = {
|
||||
end,
|
||||
columns = {
|
||||
{
|
||||
title = 'Page',
|
||||
width = 40,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.page, row2.page, Aux.util.LT) end,
|
||||
title = 'Qty',
|
||||
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.page)
|
||||
cell.text:SetText(datum.stack_size)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Status',
|
||||
width = 70,
|
||||
comparator = function(auction1, auction2) return Aux.util.compare(auction1.status, auction2.status, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('CENTER'),
|
||||
cell_setter = function(cell, auction)
|
||||
cell.text:SetText(auction.status)
|
||||
auction_alpha_setter(cell, auction)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Left',
|
||||
width = 30,
|
||||
@@ -186,42 +216,12 @@ public.views = {
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Status',
|
||||
width = 70,
|
||||
comparator = function(auction1, auction2) return Aux.util.compare(auction1.status, auction2.status, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('CENTER'),
|
||||
cell_setter = function(cell, auction)
|
||||
cell.text:SetText(auction.status)
|
||||
auction_alpha_setter(cell, auction)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Qty',
|
||||
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)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid))
|
||||
cell.text:SetText(datum.page)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
@@ -236,11 +236,11 @@ public.views = {
|
||||
end,
|
||||
on_row_enter = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(.5)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info)
|
||||
Aux.info.set_game_tooltip(this, sheet.rows[row_index].tooltip, 'ANCHOR_CURSOR', sheet.rows[row_index].EnhTooltip_info, 0, 30)
|
||||
end,
|
||||
on_row_leave = function (sheet, row_index)
|
||||
sheet.rows[row_index].highlight:SetAlpha(0)
|
||||
GameTooltip:Hide()
|
||||
AuxTooltip:Hide()
|
||||
end,
|
||||
row_setter = function(row, datum)
|
||||
row.tooltip = datum.tooltip
|
||||
@@ -257,6 +257,46 @@ public.views = {
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 80,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price, row2.buyout_price, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(Aux.util.money_string(datum.buyout_price))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
width = 80,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy/ea',
|
||||
width = 80,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price_per_unit, row2.buyout_price_per_unit, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(Aux.util.money_string(datum.buyout_price_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Lvl',
|
||||
width = 23,
|
||||
@@ -274,6 +314,16 @@ public.views = {
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Status',
|
||||
width = 70,
|
||||
comparator = function(auction1, auction2) return Aux.util.compare(auction1.status, auction2.status, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('CENTER'),
|
||||
cell_setter = function(cell, auction)
|
||||
cell.text:SetText(auction.status)
|
||||
auction_alpha_setter(cell, auction)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Left',
|
||||
width = 30,
|
||||
@@ -305,42 +355,12 @@ public.views = {
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid/ea',
|
||||
width = 70,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.bid_per_unit, row2.bid_per_unit, Aux.util.GT) 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(Aux.util.money_string(datum.bid_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy/ea',
|
||||
width = 70,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price_per_unit, row2.buyout_price_per_unit, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(Aux.util.money_string(datum.buyout_price_per_unit))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Bid',
|
||||
width = 70,
|
||||
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)
|
||||
cell.text:SetText(Aux.util.money_string(datum.bid))
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 70,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price, row2.buyout_price, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, datum)
|
||||
cell.text:SetText(Aux.util.money_string(datum.buyout_price))
|
||||
cell.text:SetText(datum.page)
|
||||
auction_alpha_setter(cell, datum)
|
||||
end,
|
||||
},
|
||||
@@ -385,18 +405,18 @@ function update_listing()
|
||||
local buy_records = auctions and Aux.util.filter(auctions, function(auction) return auction.owner ~= UnitName('player') and auction.buyout_price end) or {}
|
||||
Aux.list.populate(AuxItemSearchFrameAuctionsBuyListing.sheet, auctions and Aux.util.group_by(buy_records, function(a1, a2) return a1.hyperlink == a2.hyperlink and a1.stack_size == a2.stack_size and a1.buyout_price == a2.buyout_price end) or {})
|
||||
AuxItemSearchFrameAuctions:SetWidth(AuxItemSearchFrameAuctionsBuyListing:GetWidth() + 40)
|
||||
AuxFrame:SetWidth(AuxItemSearchFrameItem:GetWidth() + AuxItemSearchFrameAuctions:GetWidth() + 20)
|
||||
AuxFrame:SetWidth(AuxItemSearchFrameItem:GetWidth() + AuxItemSearchFrameAuctions:GetWidth() + 15)
|
||||
elseif private.view == BID then
|
||||
AuxItemSearchFrameAuctionsBidListing:Show()
|
||||
local bid_records = auctions and Aux.util.filter(auctions, function(auction) return auction.owner ~= UnitName('player') end) or {}
|
||||
Aux.list.populate(AuxItemSearchFrameAuctionsBidListing.sheet, bid_records)
|
||||
AuxItemSearchFrameAuctions:SetWidth(AuxItemSearchFrameAuctionsBidListing:GetWidth() + 40)
|
||||
AuxFrame:SetWidth(AuxItemSearchFrameItem:GetWidth() + AuxItemSearchFrameAuctions:GetWidth() + 20)
|
||||
AuxFrame:SetWidth(AuxItemSearchFrameItem:GetWidth() + AuxItemSearchFrameAuctions:GetWidth() + 15)
|
||||
elseif private.view == FULL then
|
||||
AuxItemSearchFrameAuctionsFullListing:Show()
|
||||
Aux.list.populate(AuxItemSearchFrameAuctionsFullListing.sheet, auctions or {})
|
||||
AuxItemSearchFrameAuctions:SetWidth(AuxItemSearchFrameAuctionsFullListing:GetWidth() + 40)
|
||||
AuxFrame:SetWidth(AuxItemSearchFrameItem:GetWidth() + AuxItemSearchFrameAuctions:GetWidth() + 20)
|
||||
AuxFrame:SetWidth(AuxItemSearchFrameItem:GetWidth() + AuxItemSearchFrameAuctions:GetWidth() + 15)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+4
-2
@@ -51,7 +51,7 @@ public.bid_listing_config = {
|
||||
icon:SetWidth(12)
|
||||
icon:SetHeight(12)
|
||||
icon:SetScript('OnEnter', function() Aux.info.set_game_tooltip(this, cell.tooltip, 'ANCHOR_CURSOR', cell.EnhTooltip_info) end)
|
||||
icon:SetScript('OnLeave', function() GameTooltip:Hide() end)
|
||||
icon:SetScript('OnLeave', function() AuxTooltip:Hide() end)
|
||||
local text = cell:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
|
||||
text:SetPoint("LEFT", icon, "RIGHT", 1, 0)
|
||||
text:SetPoint('TOPRIGHT', cell)
|
||||
@@ -175,7 +175,7 @@ public.auction_listing_config = {
|
||||
icon:SetWidth(12)
|
||||
icon:SetHeight(12)
|
||||
icon:SetScript('OnEnter', function() Aux.info.set_game_tooltip(this, cell.tooltip, 'ANCHOR_CURSOR', cell.EnhTooltip_info) end)
|
||||
icon:SetScript('OnLeave', function() GameTooltip:Hide() end)
|
||||
icon:SetScript('OnLeave', function() AuxTooltip:Hide() end)
|
||||
local text = cell:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
|
||||
text:SetPoint("LEFT", icon, "RIGHT", 1, 0)
|
||||
text:SetPoint('TOPRIGHT', cell)
|
||||
@@ -328,10 +328,12 @@ function public.update_listing()
|
||||
AuxManageFrameListingBidListing:Show()
|
||||
Aux.list.populate(AuxManageFrameListingBidListing.sheet, bid_records)
|
||||
AuxManageFrameListing:SetWidth(AuxManageFrameListingBidListing:GetWidth() + 40)
|
||||
AuxFrame:SetWidth(AuxManageFrameListing:GetWidth() + 15)
|
||||
elseif public.listing == AUCTIONS then
|
||||
AuxManageFrameListingAuctionListing:Show()
|
||||
Aux.list.populate(AuxManageFrameListingAuctionListing.sheet, auction_records)
|
||||
AuxManageFrameListing:SetWidth(AuxManageFrameListingAuctionListing:GetWidth() + 40)
|
||||
AuxFrame:SetWidth(AuxManageFrameListing:GetWidth() + 15)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+41
-47
@@ -151,15 +151,6 @@ Aux.sell.auction_listing_config = {
|
||||
cell.text:SetText(text)
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy/ea',
|
||||
width = 70,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.unit_buyout_price, row2.unit_buyout_price, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, row)
|
||||
cell.text:SetText(Aux.util.money_string(row.unit_buyout_price))
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Qty',
|
||||
width = 23,
|
||||
@@ -170,12 +161,12 @@ Aux.sell.auction_listing_config = {
|
||||
end,
|
||||
},
|
||||
{
|
||||
title = 'Buy',
|
||||
width = 70,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price, row2.buyout_price, Aux.util.GT) end,
|
||||
title = 'Buy/ea',
|
||||
width = 80,
|
||||
comparator = function(row1, row2) return Aux.util.compare(row1.unit_buyout_price, row2.unit_buyout_price, Aux.util.GT) end,
|
||||
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
|
||||
cell_setter = function(cell, row)
|
||||
cell.text:SetText(Aux.util.money_string(row.buyout_price))
|
||||
cell.text:SetText(Aux.util.money_string(row.unit_buyout_price))
|
||||
end,
|
||||
},
|
||||
},
|
||||
@@ -191,7 +182,10 @@ function update_auction_listing()
|
||||
end
|
||||
|
||||
function Aux.sell.on_open()
|
||||
UIDropDownMenu_SetSelectedValue(AuxSellParametersStrategyDropDown, LIVE)
|
||||
MoneyFrame_Update('AuxSellParametersDepositMoneyFrame', 0)
|
||||
AuxFrame:SetWidth(AuxSellInventory:GetWidth() + AuxSellParameters:GetWidth() + AuxSellAuctions:GetWidth() + 15)
|
||||
|
||||
-- UIDropDownMenu_SetSelectedValue(AuxSellParametersStrategyDropDown, LIVE)
|
||||
Aux_Sell_SetAuctionDuration(AUX_AUCTION_DURATION)
|
||||
|
||||
AuxSellStackSizeSlider:SetValueStep(1)
|
||||
@@ -324,7 +318,7 @@ function get_stack_size_slider_value()
|
||||
end
|
||||
|
||||
function Aux.sell.validate_parameters()
|
||||
AuxSellPostButton:Disable()
|
||||
AuxSellParametersPostButton:Disable()
|
||||
AuxSellParametersBuyoutPriceErrorText:Hide()
|
||||
|
||||
if not current_auction then
|
||||
@@ -340,14 +334,14 @@ function Aux.sell.validate_parameters()
|
||||
return
|
||||
end
|
||||
|
||||
AuxSellPostButton:Enable()
|
||||
AuxSellParametersPostButton:Enable()
|
||||
end
|
||||
|
||||
function update_recommendation()
|
||||
AuxSellParametersStrategyDropDownStaleWarning:SetText()
|
||||
-- AuxSellParametersStrategyDropDownStaleWarning:SetText()
|
||||
|
||||
if not current_auction then
|
||||
AuxSellRefreshButton:Disable()
|
||||
AuxSellParametersRefreshButton:Disable()
|
||||
|
||||
AuxSellParametersItemIconTexture:SetTexture(nil)
|
||||
AuxSellParametersItemCount:SetText()
|
||||
@@ -373,13 +367,13 @@ function update_recommendation()
|
||||
else
|
||||
AuxSellParametersItemCount:SetText()
|
||||
end
|
||||
|
||||
AuxSellRefreshButton:Enable()
|
||||
|
||||
AuxSellParametersRefreshButton:Enable()
|
||||
|
||||
-- TODO neutral AH deposit formula
|
||||
MoneyFrame_Update('AuxSellParametersDepositMoneyFrame', floor(current_auction.unit_vendor_price * 0.05 * (current_auction.charges and 1 or get_stack_size_slider_value())) * AuxSellStackCountSlider:GetValue() * AuctionFrameAuctions.duration / 120)
|
||||
|
||||
if UIDropDownMenu_GetSelectedValue(AuxSellParametersStrategyDropDown) == LIVE and auxSellEntries[current_auction.name] and auxSellEntries[current_auction.name].selected then
|
||||
if auxSellEntries[current_auction.name] and auxSellEntries[current_auction.name].selected then
|
||||
if not auxSellEntries[current_auction.name].created or GetTime() - auxSellEntries[current_auction.name].created > 1800 then
|
||||
AuxSellParametersStrategyDropDownStaleWarning:SetText('Stale data!') -- data older than half an hour marked as stale
|
||||
end
|
||||
@@ -394,10 +388,10 @@ function update_recommendation()
|
||||
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, Aux_Round(new_buyout_price))
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, Aux_Round(new_start_price))
|
||||
elseif UIDropDownMenu_GetSelectedValue(AuxSellParametersStrategyDropDown) == HISTORICAL then
|
||||
local market_price = Aux.history.get_price_suggestion(current_auction.key, current_auction.aux_quantity)
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, Aux_Round(market_price * 0.95))
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, market_price)
|
||||
-- elseif UIDropDownMenu_GetSelectedValue(AuxSellParametersStrategyDropDown) == HISTORICAL then
|
||||
-- local market_price = Aux.history.get_price_suggestion(current_auction.key, current_auction.aux_quantity)
|
||||
-- MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, Aux_Round(market_price * 0.95))
|
||||
-- MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, market_price)
|
||||
else
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0)
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 0)
|
||||
@@ -600,7 +594,7 @@ function AuxSellEntry_OnClick(entry)
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
end
|
||||
|
||||
function AuxSellRefreshButton_OnClick()
|
||||
function AuxSellParametersRefreshButton_OnClick()
|
||||
Aux.scan.abort(function()
|
||||
refresh_entries()
|
||||
select_entry()
|
||||
@@ -686,27 +680,27 @@ function report(hyperlink, stack_size, buyout_price, posted)
|
||||
))
|
||||
end
|
||||
|
||||
function Aux.sell.initialize_strategy_dropdown()
|
||||
|
||||
local function on_click()
|
||||
UIDropDownMenu_SetSelectedValue(AuxSellParametersStrategyDropDown, this.value)
|
||||
end
|
||||
|
||||
UIDropDownMenu_AddButton{
|
||||
text = 'Live scan',
|
||||
value = LIVE,
|
||||
func = on_click,
|
||||
}
|
||||
|
||||
UIDropDownMenu_AddButton{
|
||||
text = 'Historical price',
|
||||
value = HISTORICAL,
|
||||
func = on_click,
|
||||
}
|
||||
|
||||
--function Aux.sell.initialize_strategy_dropdown()
|
||||
--
|
||||
-- local function on_click()
|
||||
-- UIDropDownMenu_SetSelectedValue(AuxSellParametersStrategyDropDown, this.value)
|
||||
-- end
|
||||
--
|
||||
-- UIDropDownMenu_AddButton{
|
||||
-- text = 'Fixed',
|
||||
-- value = FIXED,
|
||||
-- text = 'Live scan',
|
||||
-- value = LIVE,
|
||||
-- func = on_click,
|
||||
-- }
|
||||
end
|
||||
--
|
||||
-- UIDropDownMenu_AddButton{
|
||||
-- text = 'Historical price',
|
||||
-- value = HISTORICAL,
|
||||
-- func = on_click,
|
||||
-- }
|
||||
--
|
||||
---- UIDropDownMenu_AddButton{
|
||||
---- text = 'Fixed',
|
||||
---- value = FIXED,
|
||||
---- func = on_click,
|
||||
---- }
|
||||
--end
|
||||
|
||||
+53
-53
@@ -44,6 +44,13 @@
|
||||
getglobal(this:GetName().."Title"):SetText('Parameters')
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="$parentDepositLabel" inherits="GameFontNormal" text="Deposit:">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="14" y="-255"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<frames>
|
||||
<Frame name="$parentItem" inherits="AuxItemTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-10"/></Offset></Anchor></Anchors>
|
||||
@@ -129,7 +136,7 @@
|
||||
<layers>
|
||||
<layer level="BACKGROUND">
|
||||
<FontString name="$parentDurationText" inherits="GameFontNormalSmall" text="Duration">
|
||||
<Anchors><Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="0" y="4"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="3" y="4"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</layer>
|
||||
</layers>
|
||||
@@ -164,30 +171,30 @@
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<Frame name="$parentStrategyDropDown" inherits="UIDropDownMenuTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-11" y="-180" /></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="Suggestion Based On">
|
||||
<Anchors><Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="21" y="0"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parentStaleWarning" inherits="GameFontRedSmall">
|
||||
<Anchors><Anchor point="LEFT" relativePoint="RIGHT"><Offset><AbsDimension x="-6" y="3"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
UIDropDownMenu_SetWidth(100)
|
||||
UIDropDownMenu_Initialize(this, Aux.sell.initialize_strategy_dropdown)
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
UIDropDownMenu_Initialize(this, Aux.sell.initialize_strategy_dropdown)
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<!--<Frame name="$parentStrategyDropDown" inherits="UIDropDownMenuTemplate">-->
|
||||
<!--<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-11" y="-180" /></Offset></Anchor></Anchors>-->
|
||||
<!--<Layers>-->
|
||||
<!--<Layer level="BACKGROUND">-->
|
||||
<!--<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="Suggestion Based On">-->
|
||||
<!--<Anchors><Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="21" y="0"/></Offset></Anchor></Anchors>-->
|
||||
<!--</FontString>-->
|
||||
<!--<FontString name="$parentStaleWarning" inherits="GameFontRedSmall">-->
|
||||
<!--<Anchors><Anchor point="LEFT" relativePoint="RIGHT"><Offset><AbsDimension x="-6" y="3"/></Offset></Anchor></Anchors>-->
|
||||
<!--</FontString>-->
|
||||
<!--</Layer>-->
|
||||
<!--</Layers>-->
|
||||
<!--<Scripts>-->
|
||||
<!--<OnLoad>-->
|
||||
<!--UIDropDownMenu_SetWidth(100)-->
|
||||
<!--UIDropDownMenu_Initialize(this, Aux.sell.initialize_strategy_dropdown)-->
|
||||
<!--</OnLoad>-->
|
||||
<!--<OnShow>-->
|
||||
<!--UIDropDownMenu_Initialize(this, Aux.sell.initialize_strategy_dropdown)-->
|
||||
<!--</OnShow>-->
|
||||
<!--</Scripts>-->
|
||||
<!--</Frame>-->
|
||||
<Frame name="$parentStartPrice" inherits="MoneyInputFrameTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="12" y="-221"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="16" y="-181"/></Offset></Anchor></Anchors>
|
||||
<layers>
|
||||
<Layer level="ARTWORK">
|
||||
<FontString name="$parentText" inherits="GameFontNormalSmall" text="STARTING_PRICE">
|
||||
@@ -202,7 +209,7 @@
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<Frame name="$parentBuyoutPrice" inherits="MoneyInputFrameTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="12" y="-256"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="16" y="-216"/></Offset></Anchor></Anchors>
|
||||
<layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parentText" inherits="GameFontNormalSmall" text="Buyout Price |cff808080(optional)|r">
|
||||
@@ -220,21 +227,32 @@
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<Frame name="$parentDepositMoneyFrame" inherits="SmallMoneyFrameTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="62" y="-295"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentDepositLabel"><Offset><AbsDimension x="5" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
SmallMoneyFrame_OnLoad();
|
||||
MoneyFrame_SetType("AUCTION");
|
||||
SmallMoneyFrame_OnLoad()
|
||||
MoneyFrame_SetType('STATIC')
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString inherits="GameFontNormal" text="Deposit:">
|
||||
<Anchors><Anchor point="RIGHT" relativePoint="LEFT"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Frame>
|
||||
<Button name="$parentPostButton" inherits="UIPanelButtonTemplate" text="Post">
|
||||
<Size><AbsDimension x="90" y="26"/></Size>
|
||||
<Anchors><Anchor point="BOTTOMLEFT" ><Offset><AbsDimension x="8" y="15"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
Aux.sell.post_auctions()
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parentRefreshButton" inherits="UIPanelButtonTemplate" text="Refresh">
|
||||
<Size><AbsDimension x="90" y="26"/></Size>
|
||||
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentPostButton"><Offset><AbsDimension x="5" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AuxSellParametersRefreshButton_OnClick()
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</frames>
|
||||
</frame>
|
||||
<Frame name="AuxSellAuctions" inherits="AuxFrameBoxTemplate">
|
||||
@@ -263,24 +281,6 @@
|
||||
</Frame>
|
||||
</Frames>
|
||||
</Frame>
|
||||
<Button name="AuxSellRefreshButton" inherits="UIPanelButtonTemplate" text="Refresh">
|
||||
<Size><AbsDimension x="90" y="26"/></Size>
|
||||
<Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxAuctionFrameButton"><Offset><AbsDimension x="-25" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AuxSellRefreshButton_OnClick()
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="AuxSellPostButton" inherits="UIPanelButtonTemplate" text="Post Auctions">
|
||||
<Size><AbsDimension x="120" y="26"/></Size>
|
||||
<Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxSellRefreshButton"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
Aux.sell.post_auctions()
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Ui>
|
||||
|
||||
Reference in New Issue
Block a user