working on quantities
This commit is contained in:
@@ -9,3 +9,4 @@ sell.xml
|
|||||||
buy.xml
|
buy.xml
|
||||||
options.xml
|
options.xml
|
||||||
about.xml
|
about.xml
|
||||||
|
post.lua
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
local target_size
|
||||||
|
local slot
|
||||||
|
|
||||||
|
|
||||||
|
-- iterator for inventory
|
||||||
|
function inventory()
|
||||||
|
local inventory = {}
|
||||||
|
for bag = 0, 4 do
|
||||||
|
if GetBagName(bag) then
|
||||||
|
for bagSlot = 1, GetContainerNumSlots(bag) do
|
||||||
|
tinsert(inventory, { bag = bag, bagSlot = bagSlot })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local i = 0
|
||||||
|
local n = getn(inventory)
|
||||||
|
return function()
|
||||||
|
i = i + 1
|
||||||
|
if i <= n then
|
||||||
|
return inventory[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function findEmptySlot()
|
||||||
|
for slot in inventory() do
|
||||||
|
if not GetContainerItemInfo(slot.bag, slot.bagSlot) then
|
||||||
|
return slot
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function findItem(name)
|
||||||
|
local slots = {}
|
||||||
|
for slot in inventory() do
|
||||||
|
if itemName(slot) == name then
|
||||||
|
tinsert(slots, slot)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return slots
|
||||||
|
end
|
||||||
|
|
||||||
|
function sameSlot(slot1, slot2)
|
||||||
|
return slot1.bag == slot2.bag and slot1.bagSlot == slot2.bagSlot
|
||||||
|
end
|
||||||
|
|
||||||
|
function moveItem(fromSlot, toSlot, amount)
|
||||||
|
ClearCursor()
|
||||||
|
SplitContainerItem(fromSlot.bag, fromSlot.bagSlot, amount)
|
||||||
|
PickupContainerItem(toSlot.bag, toSlot.bagSlot)
|
||||||
|
ClearCursor()
|
||||||
|
end
|
||||||
|
|
||||||
|
function itemName(slot)
|
||||||
|
local itemLink = GetContainerItemLink(slot.bag, slot.bagSlot)
|
||||||
|
if itemLink then
|
||||||
|
return string.gsub(itemLink, "^.-%[(.*)%].*", "%1")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function stackSize(slot)
|
||||||
|
local _, itemCount = GetContainerItemInfo(slot.bag, slot.bagSlot)
|
||||||
|
return itemCount
|
||||||
|
end
|
||||||
|
|
||||||
|
function postAuction(slot)
|
||||||
|
ClearCursor()
|
||||||
|
pickupContainerItem(slot.bag, slot.bagSlot)
|
||||||
|
ClickAuctionSellItemButton()
|
||||||
|
ClearCursor()
|
||||||
|
Aux.orig.AuctionsCreateAuctionButton_OnClick()
|
||||||
|
-- StartAuction(request.bid, request.buyout, request.duration);
|
||||||
|
end
|
||||||
|
|
||||||
|
function createStack(name, size)
|
||||||
|
ClearCursor()
|
||||||
|
ClickAuctionSellItemButton()
|
||||||
|
ClearCursor()
|
||||||
|
|
||||||
|
local slots = findItem(name)
|
||||||
|
local stackSlot = slots[1]
|
||||||
|
tremove(slots, 1)
|
||||||
|
|
||||||
|
for _, slot in ipairs(slots) do
|
||||||
|
if stackSize(stackSlot) < size then
|
||||||
|
moveItem(slot, stackSlot, size - stackSize(stackSlot))
|
||||||
|
elseif stackSize(stackSlot) > size then
|
||||||
|
moveItem(stackSlot, slot, stackSize(stackSlot) - size)
|
||||||
|
else
|
||||||
|
return stackSlot
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if stackSize(stackSlot) > size then
|
||||||
|
local emptySlot = findEmptySlot()
|
||||||
|
Aux_Log(stackSize(stackSlot) .. ' : ' .. emptySlot.bag .. ' ' .. emptySlot.bagSlot)
|
||||||
|
moveItem(stackSlot, emptySlot, stackSize(stackSlot) - size)
|
||||||
|
Aux_Log(stackSize(stackSlot) .. ' : ' .. emptySlot.bag .. ' ' .. emptySlot.bagSlot)
|
||||||
|
if stackSize(stackSlot) == size then
|
||||||
|
return stackSlot
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- /script createStack('Dried King Bolete', 3)
|
||||||
@@ -4,8 +4,7 @@ auxSellEntries = {} -- persisted
|
|||||||
|
|
||||||
local bestPriceOurStackSize
|
local bestPriceOurStackSize
|
||||||
|
|
||||||
local currentAuctionItem
|
local currentAuction
|
||||||
local postedItem
|
|
||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
@@ -64,13 +63,10 @@ end
|
|||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
function Aux_AuctionsCreateAuctionButton_OnClick()
|
function Aux_AuctionsCreateAuctionButton_OnClick()
|
||||||
if PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.sell.index and AuctionFrame:IsShown() then
|
for i=1, currentAuction.stackCount do
|
||||||
postedItem = {
|
local slot = createStack(currentAuction.name, currentAuction.stackCount)
|
||||||
name = currentAuctionItem.name,
|
postAuction(slot)
|
||||||
price = MoneyInputFrame_GetCopper(BuyoutPrice),
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
Aux.orig.AuctionsCreateAuctionButton_OnClick()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@@ -94,13 +90,13 @@ end
|
|||||||
|
|
||||||
function Aux_SelectAuxEntry()
|
function Aux_SelectAuxEntry()
|
||||||
|
|
||||||
if currentAuctionItem and auxSellEntries[currentAuctionItem.name] and not auxSellEntries[currentAuctionItem.name].selected then
|
if currentAuction and auxSellEntries[currentAuction.name] and not auxSellEntries[currentAuction.name].selected then
|
||||||
local bestPrice = {} -- a table with one entry per stacksize that is the cheapest auction for that particular stacksize
|
local bestPrice = {} -- a table with one entry per stacksize that is the cheapest auction for that particular stacksize
|
||||||
local absoluteBest -- the overall cheapest auction
|
local absoluteBest -- the overall cheapest auction
|
||||||
|
|
||||||
----- find the best price per stacksize and overall -----
|
----- find the best price per stacksize and overall -----
|
||||||
|
|
||||||
for _,auxEntry in ipairs(auxSellEntries[currentAuctionItem.name]) do
|
for _,auxEntry in ipairs(auxSellEntries[currentAuction.name]) do
|
||||||
if not bestPrice[auxEntry.stackSize] or bestPrice[auxEntry.stackSize].itemPrice >= auxEntry.itemPrice then
|
if not bestPrice[auxEntry.stackSize] or bestPrice[auxEntry.stackSize].itemPrice >= auxEntry.itemPrice then
|
||||||
bestPrice[auxEntry.stackSize] = auxEntry
|
bestPrice[auxEntry.stackSize] = auxEntry
|
||||||
end
|
end
|
||||||
@@ -110,11 +106,11 @@ function Aux_SelectAuxEntry()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
auxSellEntries[currentAuctionItem.name].selected = absoluteBest
|
auxSellEntries[currentAuction.name].selected = absoluteBest
|
||||||
|
|
||||||
if bestPrice[currentAuctionItem.stackSize] then
|
if bestPrice[currentAuction.stackSize] then
|
||||||
auxSellEntries[currentAuctionItem.name].selected = bestPrice[currentAuctionItem.stackSize]
|
auxSellEntries[currentAuction.name].selected = bestPrice[currentAuction.stackSize]
|
||||||
bestPriceOurStackSize = bestPrice[currentAuctionItem.stackSize]
|
bestPriceOurStackSize = bestPrice[currentAuction.stackSize]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -124,35 +120,21 @@ end
|
|||||||
function Aux_UpdateRecommendation()
|
function Aux_UpdateRecommendation()
|
||||||
AuxRecommendStaleText:Hide()
|
AuxRecommendStaleText:Hide()
|
||||||
|
|
||||||
if not currentAuctionItem then
|
if not currentAuction then
|
||||||
AuxSellRefreshButton:Disable()
|
AuxSellRefreshButton:Disable()
|
||||||
if postedItem then
|
Aux_SetMessage("Drag an item to the Auction Item area\n\nto see recommended pricing information")
|
||||||
AuxMessage:Hide()
|
|
||||||
AuxRecommendText:SetText("Auction Created for "..postedItem.name)
|
|
||||||
|
|
||||||
MoneyFrame_Update("AuxRecommendPerStackPrice", postedItem.price)
|
|
||||||
|
|
||||||
AuxRecommendPerStackPrice:Show()
|
|
||||||
AuxRecommendPerItemPrice:Hide()
|
|
||||||
AuxRecommendPerItemText:Hide()
|
|
||||||
AuxRecommendBasisText:Hide()
|
|
||||||
|
|
||||||
postedItem = nil
|
|
||||||
else
|
|
||||||
Aux_SetMessage("Drag an item to the Auction Item area\n\nto see recommended pricing information")
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
AuxSellRefreshButton:Enable()
|
AuxSellRefreshButton:Enable()
|
||||||
|
|
||||||
if auxSellEntries[currentAuctionItem.name] and auxSellEntries[currentAuctionItem.name].selected then
|
if auxSellEntries[currentAuction.name] and auxSellEntries[currentAuction.name].selected then
|
||||||
if not auxSellEntries[currentAuctionItem.name].created or GetTime() - auxSellEntries[currentAuctionItem.name].created > 1800 then
|
if not auxSellEntries[currentAuction.name].created or GetTime() - auxSellEntries[currentAuction.name].created > 1800 then
|
||||||
AuxRecommendStaleText:SetText("STALE DATA") -- data older than half an hour marked as stale
|
AuxRecommendStaleText:SetText("STALE DATA") -- data older than half an hour marked as stale
|
||||||
AuxRecommendStaleText:Show()
|
AuxRecommendStaleText:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
local newBuyoutPrice = auxSellEntries[currentAuctionItem.name].selected.itemPrice * currentAuctionItem.stackSize
|
local newBuyoutPrice = auxSellEntries[currentAuction.name].selected.itemPrice * currentAuction.stackSize
|
||||||
|
|
||||||
if auxSellEntries[currentAuctionItem.name].selected.numYours < auxSellEntries[currentAuctionItem.name].selected.count then
|
if auxSellEntries[currentAuction.name].selected.numYours < auxSellEntries[currentAuction.name].selected.count then
|
||||||
newBuyoutPrice = undercut(newBuyoutPrice)
|
newBuyoutPrice = undercut(newBuyoutPrice)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -162,12 +144,12 @@ function Aux_UpdateRecommendation()
|
|||||||
Aux_ShowElems(Aux.tabs.sell.recommendationElements)
|
Aux_ShowElems(Aux.tabs.sell.recommendationElements)
|
||||||
|
|
||||||
AuxRecommendText:SetText("Recommended Buyout Price")
|
AuxRecommendText:SetText("Recommended Buyout Price")
|
||||||
AuxRecommendPerStackText:SetText("for your stack of "..currentAuctionItem.stackSize)
|
AuxRecommendPerStackText:SetText("for your stack of "..currentAuction.stackSize)
|
||||||
|
|
||||||
if currentAuctionItem.texture then
|
if currentAuction.texture then
|
||||||
AuxRecommendItemTex:SetNormalTexture(currentAuctionItem.texture)
|
AuxRecommendItemTex:SetNormalTexture(currentAuction.texture)
|
||||||
if currentAuctionItem.stackSize > 1 then
|
if currentAuction.stackSize > 1 then
|
||||||
AuxRecommendItemTexCount:SetText(currentAuctionItem.stackSize)
|
AuxRecommendItemTexCount:SetText(currentAuction.stackSize)
|
||||||
AuxRecommendItemTexCount:Show()
|
AuxRecommendItemTexCount:Show()
|
||||||
else
|
else
|
||||||
AuxRecommendItemTexCount:Hide()
|
AuxRecommendItemTexCount:Hide()
|
||||||
@@ -176,22 +158,22 @@ function Aux_UpdateRecommendation()
|
|||||||
AuxRecommendItemTex:Hide()
|
AuxRecommendItemTex:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
MoneyFrame_Update("AuxRecommendPerItemPrice", Aux_Round(newBuyoutPrice / currentAuctionItem.stackSize))
|
MoneyFrame_Update("AuxRecommendPerItemPrice", Aux_Round(newBuyoutPrice / currentAuction.stackSize))
|
||||||
MoneyFrame_Update("AuxRecommendPerStackPrice", Aux_Round(newBuyoutPrice))
|
MoneyFrame_Update("AuxRecommendPerStackPrice", Aux_Round(newBuyoutPrice))
|
||||||
|
|
||||||
MoneyInputFrame_SetCopper(BuyoutPrice, newBuyoutPrice)
|
MoneyInputFrame_SetCopper(BuyoutPrice, newBuyoutPrice)
|
||||||
MoneyInputFrame_SetCopper(StartPrice, newStartPrice)
|
MoneyInputFrame_SetCopper(StartPrice, newStartPrice)
|
||||||
|
|
||||||
if auxSellEntries[currentAuctionItem.name].selected.stackSize == auxSellEntries[currentAuctionItem.name][1].stackSize and auxSellEntries[currentAuctionItem.name].selected.buyoutPrice == auxSellEntries[currentAuctionItem.name][1].buyoutPrice then
|
if auxSellEntries[currentAuction.name].selected.stackSize == auxSellEntries[currentAuction.name][1].stackSize and auxSellEntries[currentAuction.name].selected.buyoutPrice == auxSellEntries[currentAuction.name][1].buyoutPrice then
|
||||||
AuxRecommendBasisText:SetText("(based on cheapest)")
|
AuxRecommendBasisText:SetText("(based on cheapest)")
|
||||||
elseif bestPriceOurStackSize and auxSellEntries[currentAuctionItem.name].selected.stackSize == bestPriceOurStackSize.stackSize and auxSellEntries[currentAuctionItem.name].selected.buyoutPrice == bestPriceOurStackSize.buyoutPrice then
|
elseif bestPriceOurStackSize and auxSellEntries[currentAuction.name].selected.stackSize == bestPriceOurStackSize.stackSize and auxSellEntries[currentAuction.name].selected.buyoutPrice == bestPriceOurStackSize.buyoutPrice then
|
||||||
AuxRecommendBasisText:SetText("(based on cheapest stack of the same size)")
|
AuxRecommendBasisText:SetText("(based on cheapest stack of the same size)")
|
||||||
else
|
else
|
||||||
AuxRecommendBasisText:SetText("(based on auction selected below)")
|
AuxRecommendBasisText:SetText("(based on auction selected below)")
|
||||||
end
|
end
|
||||||
elseif auxSellEntries[currentAuctionItem.name] then
|
elseif auxSellEntries[currentAuction.name] then
|
||||||
Aux_SetMessage("No auctions were found for \n\n"..currentAuctionItem.name)
|
Aux_SetMessage("No auctions were found for \n\n"..currentAuction.name)
|
||||||
auxSellEntries[currentAuctionItem.name] = nil
|
auxSellEntries[currentAuction.name] = nil
|
||||||
else
|
else
|
||||||
Aux_HideElems(Aux.tabs.sell.shownElements)
|
Aux_HideElems(Aux.tabs.sell.shownElements)
|
||||||
end
|
end
|
||||||
@@ -202,6 +184,42 @@ end
|
|||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
|
function Aux_Sell_GetStackSize()
|
||||||
|
return AuxSellStackSize:GetNumber()
|
||||||
|
end
|
||||||
|
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
function Aux_Sell_SetStackSize(stackSize)
|
||||||
|
return AuxSellStackSize:SetNumber(stackSize)
|
||||||
|
end
|
||||||
|
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
function Aux_Sell_GetStackCount()
|
||||||
|
return AuxSellStackCount:GetNumber()
|
||||||
|
end
|
||||||
|
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
function Aux_Sell_SetStackCount(stackCount)
|
||||||
|
return AuxSellStackCount:SetNumber(stackCount)
|
||||||
|
end
|
||||||
|
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
function Aux_Sell_QuantityUpdate()
|
||||||
|
if currentAuction then
|
||||||
|
currentAuction.stackSize = Aux_Sell_GetStackSize()
|
||||||
|
currentAuction.stackCount = Aux_Sell_GetStackCount()
|
||||||
|
end
|
||||||
|
|
||||||
|
Aux_SelectAuxEntry()
|
||||||
|
Aux_UpdateRecommendation()
|
||||||
|
end
|
||||||
|
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
function Aux_OnNewAuctionUpdate()
|
function Aux_OnNewAuctionUpdate()
|
||||||
|
|
||||||
if PanelTemplates_GetSelectedTab(AuctionFrame) ~= Aux.tabs.sell.index then
|
if PanelTemplates_GetSelectedTab(AuctionFrame) ~= Aux.tabs.sell.index then
|
||||||
@@ -220,13 +238,14 @@ function Aux_OnNewAuctionUpdate()
|
|||||||
AuxScanTooltip:Show()
|
AuxScanTooltip:Show()
|
||||||
local tooltip = Aux_Scan_ExtractTooltip()
|
local tooltip = Aux_Scan_ExtractTooltip()
|
||||||
|
|
||||||
currentAuctionItem = auctionItemName and {
|
currentAuction = auctionItemName and {
|
||||||
name = auctionItemName,
|
name = auctionItemName,
|
||||||
texture = auctionItemTexture,
|
texture = auctionItemTexture,
|
||||||
stackSize = Aux_Scan_ItemCharges(tooltip) or auctionItemStackSize,
|
stackSize = Aux_Scan_ItemCharges(tooltip) or auctionItemStackSize,
|
||||||
|
stackCount = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
if currentAuctionItem and not auxSellEntries[currentAuctionItem.name] then
|
if currentAuction and not auxSellEntries[currentAuction.name] then
|
||||||
Aux_RefreshEntries()
|
Aux_RefreshEntries()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -237,22 +256,22 @@ end
|
|||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
function Aux_RefreshEntries()
|
function Aux_RefreshEntries()
|
||||||
if currentAuctionItem then
|
if currentAuction then
|
||||||
auxSellEntries[currentAuctionItem.name] = nil
|
auxSellEntries[currentAuction.name] = nil
|
||||||
|
|
||||||
local _, _, _, _, _, sType, sSubType, _ = GetItemInfo(currentAuctionItem.name)
|
local _, _, _, _, _, sType, sSubType, _ = GetItemInfo(currentAuction.name)
|
||||||
|
|
||||||
local currentAuctionClass = ItemType2AuctionClass(sType)
|
local currentAuctionClass = ItemType2AuctionClass(sType)
|
||||||
local currentAuctionSubclass = nil -- SubType2AuctionSubclass(currentAuctionClass, sSubType)
|
local currentAuctionSubclass = nil -- SubType2AuctionSubclass(currentAuctionClass, sSubType)
|
||||||
|
|
||||||
Aux_Scan_Start{
|
Aux_Scan_Start{
|
||||||
query = Aux_Scan_CreateQuery{
|
query = Aux_Scan_CreateQuery{
|
||||||
name = currentAuctionItem.name,
|
name = currentAuction.name,
|
||||||
classIndex = currentAuctionClass,
|
classIndex = currentAuctionClass,
|
||||||
subclassIndex = currentAuctionSubclass
|
subclassIndex = currentAuctionSubclass
|
||||||
},
|
},
|
||||||
onComplete = function(data)
|
onComplete = function(data)
|
||||||
processScanResults(data, currentAuctionItem.name)
|
processScanResults(data, currentAuction.name)
|
||||||
Aux_SelectAuxEntry()
|
Aux_SelectAuxEntry()
|
||||||
Aux_UpdateRecommendation()
|
Aux_UpdateRecommendation()
|
||||||
end
|
end
|
||||||
@@ -265,10 +284,10 @@ end
|
|||||||
function Aux_ScrollbarUpdate()
|
function Aux_ScrollbarUpdate()
|
||||||
|
|
||||||
local numrows
|
local numrows
|
||||||
if not currentAuctionItem or not auxSellEntries[currentAuctionItem.name] then
|
if not currentAuction or not auxSellEntries[currentAuction.name] then
|
||||||
numrows = 0
|
numrows = 0
|
||||||
else
|
else
|
||||||
numrows = getn(auxSellEntries[currentAuctionItem.name])
|
numrows = getn(auxSellEntries[currentAuction.name])
|
||||||
end
|
end
|
||||||
|
|
||||||
FauxScrollFrame_Update(AuxScrollFrame, numrows, 12, 16);
|
FauxScrollFrame_Update(AuxScrollFrame, numrows, 12, 16);
|
||||||
@@ -286,11 +305,11 @@ function Aux_ScrollbarUpdate()
|
|||||||
|
|
||||||
lineEntry:SetID(dataOffset)
|
lineEntry:SetID(dataOffset)
|
||||||
|
|
||||||
if currentAuctionItem and dataOffset <= numrows and auxSellEntries[currentAuctionItem.name] then
|
if currentAuction and dataOffset <= numrows and auxSellEntries[currentAuction.name] then
|
||||||
|
|
||||||
local entry = auxSellEntries[currentAuctionItem.name][dataOffset]
|
local entry = auxSellEntries[currentAuction.name][dataOffset]
|
||||||
|
|
||||||
if auxSellEntries[currentAuctionItem.name].selected and entry.itemPrice == auxSellEntries[currentAuctionItem.name].selected.itemPrice and entry.stackSize == auxSellEntries[currentAuctionItem.name].selected.stackSize then
|
if auxSellEntries[currentAuction.name].selected and entry.itemPrice == auxSellEntries[currentAuction.name].selected.itemPrice and entry.stackSize == auxSellEntries[currentAuction.name].selected.stackSize then
|
||||||
lineEntry:LockHighlight()
|
lineEntry:LockHighlight()
|
||||||
else
|
else
|
||||||
lineEntry:UnlockHighlight()
|
lineEntry:UnlockHighlight()
|
||||||
@@ -309,7 +328,7 @@ function Aux_ScrollbarUpdate()
|
|||||||
lineEntry_time:SetText("Very Long")
|
lineEntry_time:SetText("Very Long")
|
||||||
end
|
end
|
||||||
|
|
||||||
if entry.stackSize == currentAuctionItem.stackSize then
|
if entry.stackSize == currentAuction.stackSize then
|
||||||
lineEntry_stacks:SetTextColor(0.2, 0.9, 0.2)
|
lineEntry_stacks:SetTextColor(0.2, 0.9, 0.2)
|
||||||
else
|
else
|
||||||
lineEntry_stacks:SetTextColor(1.0, 1.0, 1.0)
|
lineEntry_stacks:SetTextColor(1.0, 1.0, 1.0)
|
||||||
@@ -343,7 +362,7 @@ end
|
|||||||
function AuxSellEntry_OnClick()
|
function AuxSellEntry_OnClick()
|
||||||
local entryIndex = this:GetID()
|
local entryIndex = this:GetID()
|
||||||
|
|
||||||
auxSellEntries[currentAuctionItem.name].selected = auxSellEntries[currentAuctionItem.name][entryIndex]
|
auxSellEntries[currentAuction.name].selected = auxSellEntries[currentAuction.name][entryIndex]
|
||||||
|
|
||||||
Aux_UpdateRecommendation()
|
Aux_UpdateRecommendation()
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,104 @@
|
|||||||
<Button name="AuxSellEntry9" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry8" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
<Button name="AuxSellEntry9" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry8" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
||||||
<Button name="AuxSellEntry10" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry9" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
<Button name="AuxSellEntry10" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry9" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
||||||
<Button name="AuxSellEntry11" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry10" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
<Button name="AuxSellEntry11" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry10" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
||||||
<Button name="AuxSellEntry12" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry11" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
<Button name="AuxSellEntry12" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry11" relativePoint="BOTTOMLEFT"/></Anchors></Button>
|
||||||
|
|
||||||
|
<frame name="AuxSellQuantity">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="1" y="1"/>
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOPLEFT">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="150" y="-202"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<layers>
|
||||||
|
<layer level="BACKGROUND">
|
||||||
|
<FontString name="AuxSellStackSizeText" inherits="GameFontHighlightSmall" text="Stack Size">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP" relativePoint="BOTTOM">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="0"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
<FontString name="AuxSellStackCountText" inherits="GameFontHighlightSmall" text="Stacks">
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP" relativePoint="BOTTOM">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-33"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
</FontString>
|
||||||
|
</layer>
|
||||||
|
</layers>
|
||||||
|
<frames>
|
||||||
|
<EditBox name="AuxSellStackSize" letters="3" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="30" y="16"/>
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="AuxSellStackSizeText">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-3"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnTextChanged>
|
||||||
|
Aux_Sell_QuantityUpdate()
|
||||||
|
</OnTextChanged>
|
||||||
|
<OnTabPressed>
|
||||||
|
<!-- if (IsShiftKeyDown()) then
|
||||||
|
getglobal(this:GetParent():GetName().."BuyoutPriceCopper"):SetFocus();
|
||||||
|
else
|
||||||
|
getglobal(this:GetParent():GetName().."StackCount"):SetFocus();
|
||||||
|
end -->
|
||||||
|
</OnTabPressed>
|
||||||
|
<OnEditFocusLost>
|
||||||
|
this:HighlightText(0, 0)
|
||||||
|
</OnEditFocusLost>
|
||||||
|
<OnEditFocusGained>
|
||||||
|
this:HighlightText()
|
||||||
|
</OnEditFocusGained>
|
||||||
|
</Scripts>
|
||||||
|
</EditBox>
|
||||||
|
<EditBox name="AuxSellStackCount" letters="2" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="22" y="16"/>
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="AuxSellStackCountText">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-3"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnTextChanged>
|
||||||
|
Aux_Sell_QuantityUpdate()
|
||||||
|
</OnTextChanged>
|
||||||
|
<OnTabPressed>
|
||||||
|
<!-- if (IsShiftKeyDown()) then
|
||||||
|
getglobal(this:GetParent():GetName().."StackSize"):SetFocus();
|
||||||
|
else
|
||||||
|
getglobal(this:GetParent():GetName().."StartPriceGold"):SetFocus();
|
||||||
|
end -->
|
||||||
|
</OnTabPressed>
|
||||||
|
<OnEditFocusLost>
|
||||||
|
this:HighlightText(0, 0)
|
||||||
|
</OnEditFocusLost>
|
||||||
|
<OnEditFocusGained>
|
||||||
|
this:HighlightText()
|
||||||
|
</OnEditFocusGained>
|
||||||
|
</Scripts>
|
||||||
|
</EditBox>
|
||||||
|
</frames>
|
||||||
|
</frame>
|
||||||
</Frames>
|
</Frames>
|
||||||
</Frame>
|
</Frame>
|
||||||
</Ui>
|
</Ui>
|
||||||
Reference in New Issue
Block a user