fixed the total price display bug (well, more missing feature than bug), improved the appearance of the buy tab a lot

This commit is contained in:
Manuel Simon Hirsig
2015-09-09 04:27:02 +02:00
parent 41e0eefe47
commit a31cc69abe
5 changed files with 101 additions and 280 deletions
+3 -4
View File
@@ -595,11 +595,10 @@ function Auctionator_ScrollbarUpdate()
end
local tx = string.format("%i %s of %i", auctionatorEntry.count, Auctionator_PluralizeIf("stack", auctionatorEntry.count), auctionatorEntry.stackSize)
MoneyFrame_Update("AuctionatorEntry"..line.."_PerItem_Price", Auctionator_Round(auctionatorEntry.buyoutPrice/auctionatorEntry.stackSize))
lineEntry_avail:SetText(tx)
lineEntry_stack:SetText(Auctionator_PriceToString(auctionatorEntry.buyoutPrice))
MoneyFrame_Update("AuctionatorEntry"..line.."_UnitPrice", Auctionator_Round(auctionatorEntry.buyoutPrice/auctionatorEntry.stackSize))
MoneyFrame_Update("AuctionatorEntry"..line.."_TotalPrice", Auctionator_Round(auctionatorEntry.buyoutPrice))
lineEntry:Show()
else
+16 -17
View File
@@ -19,13 +19,13 @@
</Frame>
<Button name="AuctionatorEntryTemplate" virtual="true" hidden="true">
<Size><AbsDimension x="603" y="16" /></Size>
<Size><AbsDimension y="16" /></Size>
<Frames>
<Frame>
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="22" y="0"/></Offset></Anchor></Anchors>
<Frames>
<Frame name="$parent_PerItem_Price" inherits="SmallMoneyFrameTemplate">
<Frame name="$parent_UnitPrice" inherits="SmallMoneyFrameTemplate">
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Scripts>
@@ -64,14 +64,18 @@
<Frame>
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="440" y="-3"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parent_StackPrice" inherits="GameFontHighlightSmall">
<Anchors><Anchor point="TOPRIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="440" y="0"/></Offset></Anchor></Anchors>
<Frames>
<Frame name="$parent_TotalPrice" inherits="SmallMoneyFrameTemplate">
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
SmallMoneyFrame_OnLoad()
MoneyFrame_SetType("STATIC")
</OnLoad>
</Scripts>
</Frame>
</Frames>
</Frame>
</Frames>
@@ -99,7 +103,6 @@
<Layers>
<Layer level="BACKGROUND">
<FontString name="AuctionatorTitle" inherits="GameFontNormal">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="2" y="-58"/></Offset></Anchor></Anchors>
</FontString>
@@ -124,7 +127,6 @@
<Anchors><Anchor point="TOPLEFT" relativeTo="Auctionator_Recommend_Text"><Offset><AbsDimension x="152" y="-51"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
<Size><AbsDimension x="606" y="64"/></Size>
@@ -138,7 +140,7 @@
<TexCoords left="0.1953125" right="0.8046875" top="0" bottom="1"/>
</Texture>
<FontString inherits="GameFontHighlightSmall" text="Item Price">
<FontString inherits="GameFontHighlightSmall" text="Unit Price">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="70" y="1"/></Offset></Anchor></Anchors>
</FontString>
@@ -296,10 +298,7 @@
<Button name="AuctionatorEntry9" inherits="AuctionatorEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorEntry8" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorEntry10" inherits="AuctionatorEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorEntry9" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorEntry11" inherits="AuctionatorEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorEntry10" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorEntry12" inherits="AuctionatorEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorEntry11" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorEntry13" inherits="AuctionatorEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorEntry12" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorEntry14" inherits="AuctionatorEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorEntry13" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorEntry15" inherits="AuctionatorEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorEntry14" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorEntry12" inherits="AuctionatorEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorEntry11" relativePoint="BOTTOMLEFT"/></Anchors></Button>
</Frames>
</Frame>
</Ui>
+18 -183
View File
@@ -80,13 +80,12 @@ function processScanResults(rawData)
for _,rawDatum in ipairs(rawData) do
if rawDatum.buyoutPrice > 0 then
if rawDatum.buyoutPrice > 0 and rawDatum.owner ~= UnitName("player") then
tinsert(entries, {
stackSize = rawDatum.stackSize,
name = rawDatum.name,
stackSize = rawDatum.stackSize,
buyoutPrice = rawDatum.buyoutPrice,
itemPrice = rawDatum.buyoutPrice / rawDatum.stackSize,
count = 1,
numYours = rawDatum.owner == UnitName("player") and 1 or 0
itemPrice = rawDatum.buyoutPrice / rawDatum.stackSize,
})
end
end
@@ -108,17 +107,17 @@ function Auctionator_Buy_ScrollbarUpdate()
numrows = getn(entries)
end
FauxScrollFrame_Update(AuctionatorBuyScrollFrame, numrows, 12, 16);
FauxScrollFrame_Update(AuctionatorBuyScrollFrame, numrows, 17, 16);
for line = 1,12 do
for line = 1,17 do
dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorBuyScrollFrame)
local lineEntry = getglobal("AuctionatorBuyEntry"..line)
if numrows <= 12 then
lineEntry:SetWidth(603)
if numrows <= 17 then
lineEntry:SetWidth(632)
else
lineEntry:SetWidth(585)
lineEntry:SetWidth(514)
end
lineEntry:SetID(dataOffset)
@@ -127,9 +126,10 @@ function Auctionator_Buy_ScrollbarUpdate()
local entry = entries[dataOffset]
local lineEntry_avail = getglobal("AuctionatorBuyEntry"..line.."_Availability")
local lineEntry_comm = getglobal("AuctionatorBuyEntry"..line.."_Comment")
local lineEntry_stack = getglobal("AuctionatorBuyEntry"..line.."_StackPrice")
local lineEntry_name = getglobal("AuctionatorBuyEntry"..line.."_Name")
local lineEntry_stackSize = getglobal("AuctionatorBuyEntry"..line.."_StackSize")
lineEntry_name:SetText(entry.name)
if Auctionator_SetContains(selectedEntries, entry) then
lineEntry:LockHighlight()
@@ -137,179 +137,14 @@ function Auctionator_Buy_ScrollbarUpdate()
lineEntry:UnlockHighlight()
end
if entry.numYours == 0 then
lineEntry_comm:SetText("")
elseif
entry.numYours == entry.count then
lineEntry_comm:SetText("yours")
else
lineEntry_comm:SetText("yours: "..entry.numYours)
end
local tx = string.format("%i %s of %i", entry.count, Auctionator_PluralizeIf("stack", entry.count), entry.stackSize)
MoneyFrame_Update("AuctionatorBuyEntry"..line.."_PerItem_Price", Auctionator_Round(entry.buyoutPrice/entry.stackSize))
lineEntry_avail:SetText(tx)
lineEntry_stack:SetText(Auctionator_PriceToString(entry.buyoutPrice))
lineEntry_stackSize:SetText(entry.stackSize)
MoneyFrame_Update("AuctionatorBuyEntry"..line.."_UnitPrice", Auctionator_Round(entry.buyoutPrice/entry.stackSize))
MoneyFrame_Update("AuctionatorBuyEntry"..line.."_TotalPrice", Auctionator_Round(entry.buyoutPrice))
lineEntry:Show()
else
lineEntry:Hide()
end
end
end
-----------------------------------------
-- These functions were meant to be used for a search sorted by buyout price but that actually seems impossible to implement nicely with the vanilla interface
-- function Auctionator_AuctionFrameBrowse_Update()
-- local numBatchAuctions = getn(searchResults)
-- local totalAuctions = numBatchAuctions
-- local button, buttonName, iconTexture, itemName, color, itemCount, moneyFrame, buyoutMoneyFrame, buyoutText, buttonHighlight
-- local offset = FauxScrollFrame_GetOffset(BrowseScrollFrame)
-- local index
-- local isLastSlotEmpty
-- local name, texture, count, quality, canUse, minBid, minIncrement, buyoutPrice, duration, bidAmount, highBidder
-- BrowseBidButton:Disable()
-- BrowseBuyoutButton:Disable()
-- -- Update sort arrows
-- SortButton_UpdateArrow(BrowseQualitySort, "list", "quality")
-- SortButton_UpdateArrow(BrowseLevelSort, "list", "level")
-- SortButton_UpdateArrow(BrowseDurationSort, "list", "duration")
-- SortButton_UpdateArrow(BrowseHighBidderSort, "list", "status")
-- SortButton_UpdateArrow(BrowseCurrentBidSort, "list", "bid")
-- -- Show the no results text if no items found
-- if numBatchAuctions == 0 then
-- BrowseNoResultsText:Show()
-- else
-- BrowseNoResultsText:Hide()
-- end
-- for i=1, NUM_BROWSE_TO_DISPLAY do
-- index = offset + i
-- button = getglobal("BrowseButton"..i)
-- -- Show or hide auction buttons
-- if index > numBatchAuctions then
-- button:Hide()
-- -- If the last button is empty then set isLastSlotEmpty var
-- if i == NUM_BROWSE_TO_DISPLAY then
-- isLastSlotEmpty = 1
-- end
-- else
-- button:Show()
-- buttonName = "BrowseButton"..i
-- local name, texture, count, quality, canUse, level, minBid, minIncrement, buyoutPrice, bidAmount, highBidder = GetAuctionItemInfo("list", index);
-- -- duration = GetAuctionItemTimeLeft("list", offset + i)
-- -- Resize button if there isn't a scrollbar
-- buttonHighlight = getglobal("BrowseButton"..i.."Highlight")
-- if numBatchAuctions < NUM_BROWSE_TO_DISPLAY then
-- button:SetWidth(557)
-- buttonHighlight:SetWidth(523)
-- BrowseCurrentBidSort:SetWidth(173)
-- else
-- button:SetWidth(532)
-- buttonHighlight:SetWidth(502)
-- BrowseCurrentBidSort:SetWidth(157)
-- end
-- -- Set name and quality color
-- color = ITEM_QUALITY_COLORS[searchResults[i].quality]
-- itemName = getglobal(buttonName.."Name")
-- itemName:SetText(searchResults[i].name)
-- itemName:SetVertexColor(color.r, color.g, color.b)
-- -- Set level
-- if searchResults[i].level > UnitLevel("player") then
-- getglobal(buttonName.."Level"):SetText(RED_FONT_COLOR_CODE..level..FONT_COLOR_CODE_CLOSE)
-- else
-- getglobal(buttonName.."Level"):SetText(searchResults[i].level)
-- end
-- -- Set high bidder
-- getglobal(buttonName.."HighBidder"):SetText(searchResults[i].highBidder)
-- -- Set closing time
-- getglobal(buttonName.."ClosingTimeText"):SetText(AuctionFrame_GetTimeLeftText(searchResults[i].duration))
-- getglobal(buttonName.."ClosingTime").tooltip = AuctionFrame_GetTimeLeftTooltipText(searchResults[i].duration)
-- -- Set item texture, count, and usability
-- iconTexture = getglobal(buttonName.."ItemIconTexture")
-- iconTexture:SetTexture(searchResults[i].texture)
-- if not searchResults[i].canUse then
-- iconTexture:SetVertexColor(1.0, 0.1, 0.1)
-- else
-- iconTexture:SetVertexColor(1.0, 1.0, 1.0)
-- end
-- itemCount = getglobal(buttonName.."ItemCount")
-- if searchResults[i].stackSize > 1 then
-- itemCount:SetText(searchResults[i].stackSize)
-- itemCount:Show()
-- else
-- itemCount:Hide()
-- end
-- -- Set high bid
-- moneyFrame = getglobal(buttonName.."MoneyFrame")
-- buyoutMoneyFrame = getglobal(buttonName.."BuyoutMoneyFrame")
-- buyoutText = getglobal(buttonName.."BuyoutText")
-- -- If not bidAmount set the bid amount to the min bid
-- if searchResults[i].bidAmount == 0 then
-- MoneyFrame_Update(moneyFrame:GetName(), searchResults[i].minBid)
-- else
-- MoneyFrame_Update(moneyFrame:GetName(), searchResults[i].bidAmount)
-- end
-- if searchResults[i].buyoutPrice > 0 then
-- moneyFrame:SetPoint("RIGHT", buttonName, "RIGHT", 10, 10)
-- MoneyFrame_Update(buyoutMoneyFrame:GetName(), searchResults[i].buyoutPrice)
-- buyoutMoneyFrame:Show()
-- buyoutText:Show()
-- else
-- moneyFrame:SetPoint("RIGHT", buttonName, "RIGHT", 10, 3)
-- buyoutMoneyFrame:Hide()
-- buyoutText:Hide()
-- end
-- -- Set high bidder
-- local highBidder = searchResults[i].highBidder
-- if not highBidder then
-- highBidder = RED_FONT_COLOR_CODE..NO_BIDS..FONT_COLOR_CODE_CLOSE
-- end
-- getglobal(buttonName.."HighBidder"):SetText(highBidder)
-- -- Set highlight
-- if GetSelectedAuctionItem("list") and (offset + i) == GetSelectedAuctionItem("list") then
-- button:LockHighlight()
-- if highBidder ~= UnitName("player") then
-- BrowseBidButton:Enable()
-- end
-- if searchResults[i].buyoutPrice > 0 and searchResults[i].buyoutPrice >= searchResults[i].minBid then
-- BrowseBuyoutButton:Enable()
-- AuctionFrame.buyoutPrice = searchResults[i].buyoutPrice
-- else
-- AuctionFrame.buyoutPrice = nil
-- end
-- -- Set bid
-- local bidAmount = searchResults[i].bidAmount
-- if bidAmount > 0 then
-- bidAmount = bidAmount + searchResults[i].minIncrement
-- MoneyInputFrame_SetCopper(BrowseBidPrice, bidAmount)
-- else
-- MoneyInputFrame_SetCopper(BrowseBidPrice, searchResults[i].minBid)
-- end
-- else
-- button:UnlockHighlight()
-- end
-- end
-- end
-- BrowsePrevPageButton:Hide()
-- BrowseNextPageButton:Hide()
-- BrowseScanCountText:Hide()
-- FauxScrollFrame_Update(BrowseScrollFrame, numBatchAuctions, NUM_BROWSE_TO_DISPLAY, AUCTIONS_BUTTON_HEIGHT)
-- end
-- eventFrame:RegisterEvent("AUCTION_ITEM_LIST_UPDATE")
-- eventFrame:SetScript("OnEvent", function(event)
-- if state == STATE_POSTQUERY then
-- processQueryResults()
-- end
-- end)
end
+64 -31
View File
@@ -3,14 +3,25 @@
<Script file="Buy.lua"/>
<Button name="AuctionatorBuyEntryTemplate" virtual="true" hidden="true">
<Size><AbsDimension x="603" y="16" /></Size>
<Size><AbsDimension y="16"/></Size>
<Frames>
<Frame>
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="22" y="0"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="25" y="-3"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parent_Name" inherits="GameFontHighlightSmall">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame>
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="245" y="0"/></Offset></Anchor></Anchors>
<Frames>
<Frame name="$parent_PerItem_Price" inherits="SmallMoneyFrameTemplate">
<Frame name="$parent_UnitPrice" inherits="SmallMoneyFrameTemplate">
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
@@ -23,39 +34,31 @@
</Frame>
<Frame>
<Size><AbsDimension x="100" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="170" y="-3"/></Offset></Anchor></Anchors>
<Size><AbsDimension x="50" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="385" y="-3"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parent_Availability" inherits="GameFontHighlightSmall">
<FontString name="$parent_StackSize" inherits="GameFontHighlightSmall">
<Anchors><Anchor point="TOPRIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame>
<Size><AbsDimension x="100" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="320" y="-3"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parent_Comment" inherits="GameFontHighlightSmall">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame>
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="440" y="-3"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parent_StackPrice" inherits="GameFontHighlightSmall">
<Anchors><Anchor point="TOPRIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="490" y="0"/></Offset></Anchor></Anchors>
<Frames>
<Frame name="$parent_TotalPrice" inherits="SmallMoneyFrameTemplate">
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
SmallMoneyFrame_OnLoad()
MoneyFrame_SetType("STATIC")
</OnLoad>
</Scripts>
</Frame>
</Frames>
</Frame>
</Frames>
@@ -83,7 +86,6 @@
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="Advanced Search">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="-100" y="-18"/></Offset></Anchor></Anchors>
</FontString>
@@ -92,6 +94,35 @@
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="40" y="-50"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
<Size><AbsDimension x="634" y="64"/></Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-22" y="-82"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.1953125" right="0.8046875" top="0" bottom="1"/>
</Texture>
<FontString inherits="GameFontHighlightSmall" text="Name">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="25" y="1"/></Offset></Anchor></Anchors>
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Unit Price">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="302" y="1"/></Offset></Anchor></Anchors>
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Stack Size">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="409" y="1"/></Offset></Anchor></Anchors>
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Total Price">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="544" y="1"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
@@ -121,8 +152,8 @@
</Button>
<ScrollFrame name="AuctionatorBuyScrollFrame" inherits="FauxScrollFrameTemplate">
<Size><AbsDimension x="588" y="194"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-213"/></Offset></Anchor></Anchors>
<Size><AbsDimension x="617" y="279"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-29" y="-128"/></Offset></Anchor></Anchors>
<Scripts>
<OnVerticalScroll>
@@ -150,7 +181,9 @@
<Button name="AuctionatorBuyEntry12" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry11" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorBuyEntry13" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry12" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorBuyEntry14" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry13" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorBuyEntry15" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry14" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorBuyEntry15" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry14" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorBuyEntry16" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry15" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorBuyEntry17" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry16" relativePoint="BOTTOMLEFT"/></Anchors></Button>
</Frames>
</Frame>
</Ui>
-45
View File
@@ -29,51 +29,6 @@ end
-----------------------------------------
function Auctionator_PriceToString(val)
local gold, silver, copper = val2gsc(val)
local st = ""
if gold ~= 0 then
st = gold.."g "
end
if st ~= "" then
st = st..format("%02is ", silver)
elseif silver ~= 0 then
st = st..silver.."s "
end
if st ~= "" then
st = st..format("%02ic", copper)
elseif copper ~= 0 then
st = st..copper.."c"
end
return st
end
-----------------------------------------
function val2gsc(v)
local rv = Auctionator_Round(v)
local g = math.floor(rv/10000)
rv = rv - g * 10000
local s = math.floor(rv/100)
rv = rv - s * 100
local c = rv
return g, s, c
end
-----------------------------------------
function Auctionator_AddToSet(set, key)
set[key] = true
end