major visual upgrade of buy tab, cleaned up xml files a bit, better reporting functionality for the buy tab, handled more corner cases in buy tab
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local processScanResults
|
||||
local processScanResults, createOrder, updateOrder
|
||||
local entries
|
||||
local selectedEntries = {}
|
||||
local searchQuery
|
||||
@@ -22,7 +22,7 @@ end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
function condensedSelection()
|
||||
function createOrder()
|
||||
local selection = {}
|
||||
for entry,_ in pairs(selectedEntries) do
|
||||
local key = entry.name.."_"..entry.stackSize.."_"..entry.buyoutPrice
|
||||
@@ -39,13 +39,14 @@ end
|
||||
-----------------------------------------
|
||||
|
||||
function AuctionatorBuyBuySelectedButton_OnClick()
|
||||
|
||||
|
||||
AuctionatorBuySearchButton:Disable()
|
||||
AuctionatorBuyBuySelectedButton:Disable()
|
||||
|
||||
local selection = condensedSelection(selectedEntries)
|
||||
local selectedCount = Auctionator_SetSize(selectedEntries)
|
||||
local order = createOrder(selectedEntries)
|
||||
local orderedCount = Auctionator_SetSize(selectedEntries)
|
||||
local purchasedCount = 0
|
||||
|
||||
entries = nil
|
||||
selectedEntries = {}
|
||||
|
||||
@@ -55,15 +56,19 @@ function AuctionatorBuyBuySelectedButton_OnClick()
|
||||
query = searchQuery,
|
||||
onReadDatum = function(datum)
|
||||
local key = datum.name.."_"..datum.stackSize.."_"..datum.buyoutPrice
|
||||
if selection[key] then
|
||||
if order[key] then
|
||||
|
||||
PlaceAuctionBid("list", datum.pageIndex, datum.buyoutPrice)
|
||||
purchasedCount = purchasedCount + 1
|
||||
Auctionator_Log(string.format("[Auctionator] Auction purchased", purchasedCount, selectedCount))
|
||||
if selection[key] > 1 then
|
||||
selection[key] = selection[key] - 1
|
||||
if GetMoney() >= datum.buyoutPrice then
|
||||
PlaceAuctionBid("list", datum.pageIndex, datum.buyoutPrice)
|
||||
purchasedCount = purchasedCount + 1
|
||||
else
|
||||
selection[key] = nil
|
||||
|
||||
end
|
||||
|
||||
if order[key] > 1 then
|
||||
order[key] = order[key] - 1
|
||||
else
|
||||
order[key] = nil
|
||||
end
|
||||
|
||||
return false
|
||||
@@ -72,14 +77,14 @@ function AuctionatorBuyBuySelectedButton_OnClick()
|
||||
end
|
||||
end,
|
||||
onComplete = function(data)
|
||||
Auctionator_Log(string.format("[Auctionator] Final report: %i out of %i auctions purchased", purchasedCount, selectedCount))
|
||||
processScanResults(data)
|
||||
Auctionator_Buy_ScrollbarUpdate()
|
||||
AuctionatorBuySearchButton:Enable()
|
||||
Auctionator_Buy_ShowReport(false, orderedCount, purchasedCount)
|
||||
end,
|
||||
onAbort = function()
|
||||
Auctionator_Log(string.format("[Auctionator] Final report: %i out of %i auctions purchased", purchasedCount, selectedCount))
|
||||
AuctionatorBuySearchButton:Enable()
|
||||
Auctionator_Buy_ShowReport(false, orderedCount, purchasedCount)
|
||||
end
|
||||
}
|
||||
end
|
||||
@@ -132,14 +137,17 @@ function Auctionator_Buy_ScrollbarUpdate()
|
||||
AuctionatorBuyMessage:Hide()
|
||||
end
|
||||
|
||||
if Auctionator_SetSize(selectedEntries) > 0 then
|
||||
local total = 0
|
||||
for entry, _ in selectedEntries do
|
||||
total = total + entry.buyoutPrice
|
||||
end
|
||||
MoneyFrame_Update("AuctionatorBuyTotal", Auctionator_Round(total))
|
||||
|
||||
if Auctionator_SetSize(selectedEntries) > 0 and GetMoney() >= total then
|
||||
AuctionatorBuyBuySelectedButton:Enable()
|
||||
else
|
||||
AuctionatorBuyBuySelectedButton:Disable()
|
||||
end
|
||||
|
||||
local line -- 1 through 15 of our window to scroll
|
||||
local dataOffset -- an index into our data calculated from the scroll offset
|
||||
|
||||
local numrows
|
||||
if not entries then
|
||||
@@ -149,10 +157,10 @@ function Auctionator_Buy_ScrollbarUpdate()
|
||||
end
|
||||
|
||||
FauxScrollFrame_Update(AuctionatorBuyScrollFrame, numrows, 19, 16);
|
||||
|
||||
|
||||
for line = 1,19 do
|
||||
|
||||
dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorBuyScrollFrame)
|
||||
local dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorBuyScrollFrame)
|
||||
local lineEntry = getglobal("AuctionatorBuyEntry"..line)
|
||||
|
||||
if numrows <= 19 then
|
||||
@@ -188,4 +196,20 @@ function Auctionator_Buy_ScrollbarUpdate()
|
||||
lineEntry:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function Auctionator_Buy_ShowReport(completed, orderedCount, purchasedCount)
|
||||
AuctionatorBuyReport:Show()
|
||||
|
||||
AuctionatorBuyReportHTML:SetText("<html><body>"
|
||||
.."<h1>Auctionator Buy Report</h1><br/>"
|
||||
.."<h1>Status:"..(completed and "Completed" or "Aborted").."</h1><br/>"
|
||||
.."<p>"
|
||||
..string.format("%i out of the %i ordered auctions have been purchased", purchasedCount, orderedCount)
|
||||
.."</p>"
|
||||
.."</body></html>")
|
||||
|
||||
AuctionatorBuyReportHTML:SetSpacing(3)
|
||||
|
||||
AuctionatorBuyAuthorText:SetText("Author: "..AuctionatorAuthor)
|
||||
end
|
||||
end
|
||||
@@ -72,16 +72,12 @@
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Frame name="Auctionator_Buy_Template" virtual="true" hidden="true">
|
||||
<Frame name="AuctionatorBuyTemplate" virtual="true" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="550" y="447"/>
|
||||
<AbsDimension x="694" y="447"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="210" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
</Anchors>
|
||||
|
||||
<Layers>
|
||||
@@ -91,20 +87,29 @@
|
||||
</FontString>
|
||||
|
||||
<FontString name="AuctionatorBuyMessage" inherits="GameFontNormal">
|
||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="-60" y="-200"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="70" y="-120"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
|
||||
<FontString name="AuctionatorBuySearchBoxLabel" inherits="GameFontNormalSmall" text="Search For">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-50" y="-50"/></Offset></Anchor></Anchors>
|
||||
<FontString name="AuctionatorBuySearchBoxLabel" inherits="GameFontHighlightSmall" text="Search For">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="160" y="-50"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
<Layer level="ARTWORK">
|
||||
<FontString name="AuctionatorBuyTotalLabel" inherits="GameFontHighlightSmall" text="Total">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="70" y="22"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
|
||||
<Size><AbsDimension x="802" y="64"/></Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-190" y="-52"/>
|
||||
<AbsDimension x="20" y="-52"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -135,7 +140,7 @@
|
||||
<Anchors><Anchor point="LEFT" relativeTo="AuctionatorBuySearchBoxLabel" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnEnterPressed>
|
||||
this:ClearFocus();
|
||||
this:ClearFocus()
|
||||
</OnEnterPressed>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
@@ -151,8 +156,14 @@
|
||||
</Button>
|
||||
|
||||
<Button name="AuctionatorBuyBuySelectedButton" inherits="UIPanelButtonTemplate" text="Buy Selected Auctions">
|
||||
<Size><AbsDimension x="166" y="22"/> </Size>
|
||||
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="-14" y="-199"/></Offset></Anchor></Anchors>
|
||||
<Size><AbsDimension x="166" y="22"/></Size>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="51" y="14"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AuctionatorBuyBuySelectedButton_OnClick()
|
||||
@@ -160,9 +171,35 @@
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Frame name="AuctionatorBuyTotal" inherits="SmallMoneyFrameTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="AuctionatorBuyTotalLabel">
|
||||
<Offset>
|
||||
<AbsDimension x="10" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
SmallMoneyFrame_OnLoad()
|
||||
MoneyFrame_SetType("STATIC")
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<!-- <Frame name="BidBidPrice" inherits="MoneyInputFrameTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOM">
|
||||
<Offset>
|
||||
<AbsDimension x="-15" y="18"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Frame> -->
|
||||
|
||||
<ScrollFrame name="AuctionatorBuyScrollFrame" inherits="FauxScrollFrameTemplate">
|
||||
<Size><AbsDimension x="785" y="309"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-197" y="-98"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="13" y="-98"/></Offset></Anchor></Anchors>
|
||||
|
||||
<Scripts>
|
||||
<OnVerticalScroll>
|
||||
@@ -197,4 +234,50 @@
|
||||
<Button name="AuctionatorBuyEntry19" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry18" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
||||
</Frames>
|
||||
</Frame>
|
||||
|
||||
<Frame name="AuctionatorBuyReport" frameStrata="FULLSCREEN_DIALOG" toplevel="true" parent="UIParent" enableMouse="true" hidden="true">
|
||||
<Size><AbsDimension x="300" y="300" /></Size>
|
||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="0" y="-90"/></Offset></Anchor></Anchors>
|
||||
|
||||
<Backdrop bgFile="Interface\CharacterFrame\UI-Party-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||
<BackgroundInsets><AbsInset left="11" right="12" top="12" bottom="11"/></BackgroundInsets>
|
||||
<TileSize><AbsValue val="32"/></TileSize>
|
||||
<EdgeSize><AbsValue val="32"/></EdgeSize>
|
||||
</Backdrop>
|
||||
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<FontString name="AuctionatorBuyAuthorText" inherits="GameFontDisableSmall" justifyH="LEFT" justifyV="TOP">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT">
|
||||
<Offset><AbsDimension x="30" y="20"/></Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
|
||||
<Frames>
|
||||
|
||||
<SimpleHTML name="AuctionatorBuyReportHTML">
|
||||
<Size><AbsDimension x="420" y="420" /></Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="30" y="-30"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
<FontString inherits="GameFontHighlightSmall"/>
|
||||
<FontStringHeader1 inherits="GameFontNormal"/>
|
||||
</SimpleHTML>
|
||||
|
||||
<Button inherits="UIPanelButtonTemplate" text="Close">
|
||||
<Size><AbsDimension x="100" y="22"/> </Size>
|
||||
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-20" y="15"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
AuctionatorBuyReport:Hide()
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Ui>
|
||||
@@ -1,3 +1,6 @@
|
||||
AuctionatorVersion = "1.2.0-Vanilla"
|
||||
AuctionatorAuthor = "Zirco; Backport by Nimeral; Reworked by Simon Hirsig"
|
||||
|
||||
AuctionatorLoaded = false
|
||||
|
||||
local val2gsc
|
||||
@@ -52,7 +55,7 @@ end
|
||||
-----------------------------------------
|
||||
|
||||
function Auctionator_OnLoad()
|
||||
Auctionator_Log("[Auctionator] Loaded")
|
||||
Auctionator_Log("Auctionator v"..AuctionatorVersion.." loaded")
|
||||
AuctionatorLoaded = true
|
||||
end
|
||||
|
||||
|
||||
+23
-24
@@ -1,10 +1,29 @@
|
||||
local AuctionatorVersion = "1.1.0-Vanilla"
|
||||
local AuctionatorAuthor = "Zirco; Backport by Nimeral; Reworked by Simon Hirsig"
|
||||
|
||||
local BoolToString, BoolToNum, NumToBool
|
||||
|
||||
function Auctionator_ShowDescriptionFrame()
|
||||
AuctionatorDescriptionFrame:Show()
|
||||
|
||||
AuctionatorDescriptionHTML:SetText("<html><body>"
|
||||
.."<h1>What is Auctionator?</h1><br/>"
|
||||
.."<p>"
|
||||
.."Figuring out a good buyout price when posting auctions can be tedious and time-consuming. If you're like most people, you first browse the current "
|
||||
.."auctions to get a sense of how much your item is currently selling for. Then you undercut the lowest price by a bit. If you're creating multiple auctions "
|
||||
.."you're bouncing back and forth between the Browse tab and the Auctions tab, doing lots of division in "
|
||||
.."your head, and doing lots of clicking and typing."
|
||||
.."</p><br/><h1>How it works</h1><br/><p>"
|
||||
.."Auctionator makes this whole process easy and streamlined. When you select an item to auction, Auctionator displays a summary of all the current auctions for "
|
||||
.."that item sorted by per-item price. Auctionator also calculates a recommended buyout price based on the cheapest per-item price for your item. If you're "
|
||||
.."selling a stack rather than a single item, Auctionator bases its recommended buyout price on the cheapest stack of the same size."
|
||||
.."</p><br/><p>"
|
||||
.."If you don't like Auctionator's recommendation, you can click on any line in the summary and Auctionator will recalculate the recommended buyout price based "
|
||||
.."on that auction. Of course, you can always override Auctionator's recommendation by just typing in your own buyout price."
|
||||
.."</p><br/><p>"
|
||||
.."With Auctionator, creating an auction is usually just a matter of picking an item to auction and clicking the Create Auction button."
|
||||
.."</p>"
|
||||
.."</body></html>")
|
||||
|
||||
AuctionatorDescriptionHTML:SetSpacing(3)
|
||||
|
||||
AuctionatorAuthorText:SetText("Author: "..AuctionatorAuthor)
|
||||
end
|
||||
|
||||
@@ -16,29 +35,9 @@ function Auctionator_ShowOptionsFrame()
|
||||
AuctionatorOptionsFrame:SetBackdropColor(0,0,0,100)
|
||||
|
||||
AuctionatorConfigFrameTitle:SetText("Auctionator Options for "..UnitName("player"))
|
||||
|
||||
local expText = "<html><body>"
|
||||
.."<h1>What is Auctionator?</h1><br/>"
|
||||
.."<p>"
|
||||
.."Figuring out a good buyout price when posting auctions can be tedious and time-consuming. If you're like most people, you first browse the current "
|
||||
.."auctions to get a sense of how much your item is currently selling for. Then you undercut the lowest price by a bit. If you're creating multiple auctions "
|
||||
.."you're bouncing back and forth between the Browse tab and the Auctions tab, doing lots of division in "
|
||||
.."your head, and doing lots of clicking and typing."
|
||||
.."</p><br/><h1>How it works</h1><br/><p>"
|
||||
.."Auctionator makes this whole process easy and streamlined. When you select an item to auction, Auctionator displays a summary of all the current auctions for "
|
||||
.."that item sorted by per-item price. Auctionator also calculates a recommended buyout price based on the cheapest per-item price for your item. If you're "
|
||||
.."selling a stack rather than a single item, Auctionator bases its recommended buyout price on the cheapest stack of the same size."
|
||||
.."</p><br/><p>"
|
||||
.."If you don't like Auctionator's recommendation, you can click on any line in the summary and Auctionator will recalculate the recommended buyout price based "
|
||||
.."on that auction. Of course, you can always override Auctionator's recommendation by just typing in your own buyout price."
|
||||
.."</p><br/><p>"
|
||||
.."With Auctionator, creating an auction is usually just a matter of picking an item to auction and clicking the Create Auction button."
|
||||
.."</p>"
|
||||
.."</body></html>"
|
||||
|
||||
AuctionatorExplanation:SetText("Auctionator is an addon designed to make it easier and faster to setup your auctions at the auction house.")
|
||||
AuctionatorDescriptionHTML:SetText(expText)
|
||||
AuctionatorDescriptionHTML:SetSpacing(3)
|
||||
|
||||
|
||||
AuctionatorVersionText:SetText("Version: "..AuctionatorVersion)
|
||||
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
<Frame name="AuctionatorOptionsButtonTemplate" virtual="true" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="550" y="447"/>
|
||||
<AbsDimension x="1" y="1"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
@@ -16,7 +16,7 @@
|
||||
<Frames>
|
||||
<Button name="AuctionatorOptionsButton" inherits="UIPanelButtonTemplate" text="Auctionator">
|
||||
<Size><AbsDimension x="126" y="22"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="472" y="-12"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="682" y="-12"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
Auctionator_ShowOptionsFrame()
|
||||
|
||||
@@ -23,7 +23,7 @@ end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
function Auctionator_Scan_Complete()
|
||||
function Auctionator_Scan_Complete()
|
||||
if state ~= STATE_IDLE then
|
||||
if currentJob.onComplete then
|
||||
currentJob.onComplete(scanData)
|
||||
@@ -39,21 +39,22 @@ end
|
||||
-----------------------------------------
|
||||
|
||||
function Auctionator_Scan_Abort()
|
||||
|
||||
if currentJob and currentJob.onAbort then
|
||||
currentJob.onAbort()
|
||||
if state ~= STATE_IDLE then
|
||||
if currentJob and currentJob.onAbort then
|
||||
currentJob.onAbort()
|
||||
end
|
||||
|
||||
currentJob = nil
|
||||
currentPage = nil
|
||||
scanData = nil
|
||||
state = STATE_IDLE
|
||||
end
|
||||
|
||||
currentJob = nil
|
||||
currentPage = nil
|
||||
scanData = nil
|
||||
state = STATE_IDLE
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
function Auctionator_Scan_Start(job)
|
||||
|
||||
|
||||
Auctionator_SetMessage("Scanning auctions ...")
|
||||
|
||||
if state ~= STATE_IDLE then
|
||||
|
||||
@@ -58,21 +58,21 @@ end
|
||||
|
||||
function Auctionator_AddPanels()
|
||||
|
||||
local sellFrame = CreateFrame("Frame", "Auctionator_Sell_Panel", AuctionFrame, "Auctionator_Sell_Template")
|
||||
local sellFrame = CreateFrame("Frame", "AuctionatorSellPanel", AuctionFrame, "AuctionatorSellTemplate")
|
||||
sellFrame:SetParent("AuctionFrame")
|
||||
sellFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT", 210, 0)
|
||||
sellFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
|
||||
relevel(sellFrame)
|
||||
sellFrame:Hide()
|
||||
|
||||
local buyFrame = CreateFrame("Frame", "Auctionator_Buy_Panel", AuctionFrame, "Auctionator_Buy_Template")
|
||||
local buyFrame = CreateFrame("Frame", "AuctionatorBuyPanel", AuctionFrame, "AuctionatorBuyTemplate")
|
||||
buyFrame:SetParent("AuctionFrame")
|
||||
buyFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT", 210, 0)
|
||||
buyFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
|
||||
relevel(buyFrame)
|
||||
buyFrame:Hide()
|
||||
|
||||
local optionsFrame = CreateFrame("Frame", "AuctionatorOptionsButtonPanel", AuctionFrame, "AuctionatorOptionsButtonTemplate")
|
||||
optionsFrame:SetParent("AuctionFrame")
|
||||
optionsFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT", 210, 0)
|
||||
optionsFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
|
||||
relevel(optionsFrame)
|
||||
optionsFrame:Hide()
|
||||
end
|
||||
@@ -137,9 +137,15 @@ function Auctionator_AuctionFrameTab_OnClick(index)
|
||||
index = this:GetID()
|
||||
end
|
||||
|
||||
Auctionator_Scan_Abort()
|
||||
Auctionator_Sell_Panel:Hide()
|
||||
Auctionator_Buy_Panel:Hide()
|
||||
if not Auctionator_Scan_IsIdle() then
|
||||
Auctionator_Scan_Abort()
|
||||
end
|
||||
AuctionatorSellPanel:Hide()
|
||||
AuctionatorBuyPanel:Hide()
|
||||
|
||||
if index == 2 then
|
||||
Auctionator_ShowElems(defaultBidsTabElements)
|
||||
end
|
||||
|
||||
if index == 3 then
|
||||
Auctionator_ShowElems(defaultAuctionTabElements)
|
||||
@@ -152,7 +158,7 @@ function Auctionator_AuctionFrameTab_OnClick(index)
|
||||
|
||||
Auctionator_HideElems(defaultAuctionTabElements)
|
||||
|
||||
Auctionator_Sell_Panel:Show()
|
||||
AuctionatorSellPanel:Show()
|
||||
AuctionFrame:EnableMouse(false)
|
||||
|
||||
Auctionator_OnNewAuctionUpdate()
|
||||
@@ -163,7 +169,7 @@ function Auctionator_AuctionFrameTab_OnClick(index)
|
||||
|
||||
Auctionator_HideElems(defaultBidsTabElements)
|
||||
|
||||
Auctionator_Buy_Panel:Show()
|
||||
AuctionatorBuyPanel:Show()
|
||||
AuctionFrame:EnableMouse(false)
|
||||
|
||||
Auctionator_Buy_ScrollbarUpdate()
|
||||
@@ -498,11 +504,15 @@ end
|
||||
|
||||
function Auctionator_OnAuctionHouseClosed()
|
||||
|
||||
if not Auctionator_Scan_IsIdle() then
|
||||
Auctionator_Scan_Abort()
|
||||
end
|
||||
|
||||
AuctionatorOptionsButtonPanel:Hide()
|
||||
AuctionatorOptionsFrame:Hide()
|
||||
AuctionatorDescriptionFrame:Hide()
|
||||
Auctionator_Sell_Panel:Hide()
|
||||
Auctionator_Buy_Panel:Hide()
|
||||
AuctionatorSellPanel:Hide()
|
||||
AuctionatorBuyPanel:Hide()
|
||||
|
||||
end
|
||||
|
||||
@@ -514,7 +524,9 @@ function Auctionator_OnNewAuctionUpdate()
|
||||
return
|
||||
end
|
||||
|
||||
Auctionator_Scan_Abort()
|
||||
if not Auctionator_Scan_IsIdle() then
|
||||
Auctionator_Scan_Abort()
|
||||
end
|
||||
|
||||
currentAuctionItemName, currentAuctionItemTexture, currentAuctionItemStackSize = GetAuctionSellItemInfo()
|
||||
|
||||
@@ -555,9 +567,6 @@ end
|
||||
|
||||
function Auctionator_ScrollbarUpdate()
|
||||
|
||||
local line -- 1 through 12 of our window to scroll
|
||||
local dataOffset -- an index into our data calculated from the scroll offset
|
||||
|
||||
local numrows
|
||||
if not currentAuctionItemName or not auctionatorEntries[currentAuctionItemName] then
|
||||
numrows = 0
|
||||
@@ -569,8 +578,7 @@ function Auctionator_ScrollbarUpdate()
|
||||
|
||||
for line = 1,12 do
|
||||
|
||||
dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorScrollFrame)
|
||||
|
||||
local dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorScrollFrame)
|
||||
local lineEntry = getglobal("AuctionatorEntry"..line)
|
||||
|
||||
if numrows <= 12 then
|
||||
@@ -636,7 +644,9 @@ function Auctionator_EntryOnClick()
|
||||
end
|
||||
|
||||
function Auctionator_RefreshButtonOnClick()
|
||||
Auctionator_Scan_Abort()
|
||||
if not Auctionator_Scan_IsIdle() then
|
||||
Auctionator_Scan_Abort()
|
||||
end
|
||||
Auctionator_RefreshEntries()
|
||||
Auctionator_SelectAuctionatorEntry()
|
||||
Auctionator_UpdateRecommendation()
|
||||
|
||||
@@ -89,9 +89,9 @@
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Frame name="Auctionator_Sell_Template" virtual="true" hidden="true">
|
||||
<Frame name="AuctionatorSellTemplate" virtual="true" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="550" y="447"/>
|
||||
<AbsDimension x="694" y="447"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
@@ -108,11 +108,11 @@
|
||||
</FontString>
|
||||
|
||||
<FontString name="AuctionatorMessage" inherits="GameFontNormal">
|
||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="28" y="-100"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="170" y="-100"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
|
||||
<FontString name="Auctionator_Recommend_Text" inherits="GameFontNormal" text="Recommended buyout price">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="77" y="-98"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="287" y="-98"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
|
||||
<FontString name="Auctionator_Recommend_Basis_Text" inherits="GameFontHighlightSmall" text="based on">
|
||||
@@ -133,7 +133,7 @@
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="6" y="-167"/>
|
||||
<AbsDimension x="216" y="-167"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -160,10 +160,9 @@
|
||||
|
||||
<Frames>
|
||||
<Button>
|
||||
<Size><AbsDimension y="118"/></Size>
|
||||
<Size><AbsDimension x="612" y="118"/></Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="-70"/></Offset></Anchor>
|
||||
<Anchor point="RIGHT"><Offset><AbsDimension x="63"/></Offset></Anchor>
|
||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="213" y="-70"/></Offset></Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND"></Layer>
|
||||
@@ -213,7 +212,7 @@
|
||||
|
||||
<Button name="Auctionator_RecommendItem_Tex">
|
||||
<Size><AbsDimension x="37" y="37"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="24" y="-87"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="234" y="-87"/></Offset></Anchor></Anchors>
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
|
||||
@@ -263,7 +262,13 @@
|
||||
|
||||
<Button name="AuctionatorRefreshButton" inherits="UIPanelButtonTemplate" text="Refresh">
|
||||
<Size><AbsDimension x="126" y="22"/></Size>
|
||||
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="-14" y="-199"/></Offset></Anchor></Anchors>
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="51" y="14"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
Auctionator_RefreshButtonOnClick()
|
||||
@@ -273,7 +278,7 @@
|
||||
|
||||
<ScrollFrame name="AuctionatorScrollFrame" inherits="FauxScrollFrameTemplate">
|
||||
<Size><AbsDimension x="588" y="194"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-213"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="210" y="-213"/></Offset></Anchor></Anchors>
|
||||
|
||||
<Scripts>
|
||||
<OnVerticalScroll>
|
||||
|
||||
Reference in New Issue
Block a user