perfected the appearance of both auctionator tabs

This commit is contained in:
Manuel Simon Hirsig
2015-09-09 06:01:38 +02:00
parent a31cc69abe
commit 94e8d7d77f
4 changed files with 74 additions and 60 deletions
+46 -34
View File
@@ -1,6 +1,6 @@
local recommendationElements = {}
local sellTabElements = {}
local defaultAuctionTabElements = {}
local defaultBrowseTabElements = {}
local defaultBidsTabElements = {}
AUCTIONATOR_ENABLE_ALT = true
AUCTIONATOR_OPEN_FIRST = false
@@ -87,33 +87,45 @@ function Auctionator_OnAddonLoaded()
Auctionator_SetupHookFunctions()
defaultAuctionTabElements[1] = AuctionsScrollFrame
defaultAuctionTabElements[2] = AuctionsButton1
defaultAuctionTabElements[3] = AuctionsButton2
defaultAuctionTabElements[4] = AuctionsButton3
defaultAuctionTabElements[5] = AuctionsButton4
defaultAuctionTabElements[6] = AuctionsButton5
defaultAuctionTabElements[7] = AuctionsButton6
defaultAuctionTabElements[8] = AuctionsButton7
defaultAuctionTabElements[9] = AuctionsButton8
defaultAuctionTabElements[10] = AuctionsButton9
defaultAuctionTabElements[11] = AuctionsQualitySort
defaultAuctionTabElements[12] = AuctionsDurationSort
defaultAuctionTabElements[13] = AuctionsHighBidderSort
defaultAuctionTabElements[14] = AuctionsBidSort
defaultAuctionTabElements[15] = AuctionsCancelAuctionButton
--defaultAuctionTabElements[16] = AuctionFrameAuctions
--defaultAuctionTabElements[16] = AuctionFrame
defaultAuctionTabElements[1] = AuctionsTitle
defaultAuctionTabElements[2] = AuctionsScrollFrame
defaultAuctionTabElements[3] = AuctionsButton1
defaultAuctionTabElements[4] = AuctionsButton2
defaultAuctionTabElements[5] = AuctionsButton3
defaultAuctionTabElements[6] = AuctionsButton4
defaultAuctionTabElements[7] = AuctionsButton5
defaultAuctionTabElements[8] = AuctionsButton6
defaultAuctionTabElements[9] = AuctionsButton7
defaultAuctionTabElements[10] = AuctionsButton8
defaultAuctionTabElements[11] = AuctionsButton9
defaultAuctionTabElements[12] = AuctionsQualitySort
defaultAuctionTabElements[13] = AuctionsDurationSort
defaultAuctionTabElements[14] = AuctionsHighBidderSort
defaultAuctionTabElements[15] = AuctionsBidSort
defaultAuctionTabElements[16] = AuctionsCancelAuctionButton
--defaultAuctionTabElements[17] = AuctionFrameAuctions
--defaultAuctionTabElements[18] = AuctionFrame
defaultBrowseTabElements[1] = AuctionFrameBrowse
defaultBidsTabElements[1] = BidTitle
defaultBidsTabElements[2] = BidScrollFrame
defaultBidsTabElements[3] = BidQualitySort
defaultBidsTabElements[4] = BidLevelSort
defaultBidsTabElements[5] = BidDurationSort
defaultBidsTabElements[6] = BidBuyoutSort
defaultBidsTabElements[7] = BidStatusSort
defaultBidsTabElements[8] = BidBidSort
defaultBidsTabElements[9] = BidBidButton
defaultBidsTabElements[10] = BidBuyoutButton
defaultBidsTabElements[11] = BidBidPrice
defaultBidsTabElements[12] = BidBidText
recommendationElements[1] = getglobal("Auctionator_Recommend_Text")
recommendationElements[2] = getglobal("Auctionator_RecommendPerItem_Text")
recommendationElements[3] = getglobal("Auctionator_RecommendPerItem_Price")
recommendationElements[4] = getglobal("Auctionator_RecommendPerStack_Text")
recommendationElements[5] = getglobal("Auctionator_RecommendPerStack_Price")
recommendationElements[6] = getglobal("Auctionator_Recommend_Basis_Text")
recommendationElements[7] = getglobal("Auctionator_RecommendItem_Tex")
sellTabElements[1] = getglobal("Auctionator_Recommend_Text")
sellTabElements[2] = getglobal("Auctionator_RecommendPerItem_Text")
sellTabElements[3] = getglobal("Auctionator_RecommendPerItem_Price")
sellTabElements[4] = getglobal("Auctionator_RecommendPerStack_Text")
sellTabElements[5] = getglobal("Auctionator_RecommendPerStack_Price")
sellTabElements[6] = getglobal("Auctionator_Recommend_Basis_Text")
sellTabElements[7] = getglobal("Auctionator_RecommendItem_Tex")
end
end
@@ -145,11 +157,11 @@ function Auctionator_AuctionFrameTab_OnClick(index)
Auctionator_OnNewAuctionUpdate()
elseif index == Auctionator.tabs.buy.index then
AuctionFrameTab_OnClick(1)
AuctionFrameTab_OnClick(2)
PanelTemplates_SetTab(AuctionFrame, Auctionator.tabs.buy.index)
Auctionator_HideElems(defaultBrowseTabElements)
Auctionator_HideElems(defaultBidsTabElements)
Auctionator_Buy_Panel:Show()
AuctionFrame:EnableMouse(false)
@@ -329,12 +341,12 @@ function Auctionator_AddTabs()
setglobal(buyTabName, buyTab)
sellTab:SetID(Auctionator.tabs.sell.index)
sellTab:SetText("Auctionator")
sellTab:SetText("Sell")
sellTab:SetPoint("LEFT", getglobal("AuctionFrameTab"..AuctionFrame.numTabs), "RIGHT", -8, 0)
buyTab:SetID(Auctionator.tabs.buy.index)
buyTab:SetText("Buy")
-- buyTab:SetPoint("LEFT", getglobal("AuctionFrameTab"..Auctionator.tabs.sell.index), "RIGHT", -8, 0)
buyTab:SetPoint("LEFT", getglobal("AuctionFrameTab"..Auctionator.tabs.sell.index), "RIGHT", -8, 0)
PanelTemplates_SetNumTabs(AuctionFrame, Auctionator.tabs.buy.index)
PanelTemplates_EnableTab(AuctionFrame, Auctionator.tabs.sell.index)
@@ -366,7 +378,7 @@ end
-----------------------------------------
function Auctionator_SetMessage(msg)
Auctionator_HideElems(recommendationElements)
Auctionator_HideElems(sellTabElements)
AuctionatorMessage:SetText(msg)
AuctionatorMessage:Show()
end
@@ -426,7 +438,7 @@ function Auctionator_UpdateRecommendation()
local newStartPrice = newBuyoutPrice * 0.95
AuctionatorMessage:Hide()
Auctionator_ShowElems(recommendationElements)
Auctionator_ShowElems(sellTabElements)
Auctionator_Recommend_Text:SetText("Recommended Buyout Price")
Auctionator_RecommendPerStack_Text:SetText("for your stack of "..currentAuctionItemStackSize)
@@ -459,7 +471,7 @@ function Auctionator_UpdateRecommendation()
elseif auctionatorEntries[currentAuctionItemName] then
Auctionator_SetMessage("No auctions were found for \n\n"..currentAuctionItemName)
else
Auctionator_HideElems(recommendationElements)
Auctionator_HideElems(sellTabElements)
end
end
+4 -4
View File
@@ -103,8 +103,8 @@
<Layers>
<Layer level="BACKGROUND">
<FontString name="AuctionatorTitle" inherits="GameFontNormal">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="2" y="-58"/></Offset></Anchor></Anchors>
<FontString inherits="GameFontNormal" text="Auctionator Sell">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="-100" y="-18"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="AuctionatorMessage" inherits="GameFontNormal">
@@ -141,7 +141,7 @@
</Texture>
<FontString inherits="GameFontHighlightSmall" text="Unit Price">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="70" y="1"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="80" y="1"/></Offset></Anchor></Anchors>
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Stacks">
@@ -153,7 +153,7 @@
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Total Price">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="500" y="1"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="496" y="1"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
+5 -5
View File
@@ -107,17 +107,17 @@ function Auctionator_Buy_ScrollbarUpdate()
numrows = getn(entries)
end
FauxScrollFrame_Update(AuctionatorBuyScrollFrame, numrows, 17, 16);
FauxScrollFrame_Update(AuctionatorBuyScrollFrame, numrows, 19, 16);
for line = 1,17 do
for line = 1,19 do
dataOffset = line + FauxScrollFrame_GetOffset(AuctionatorBuyScrollFrame)
local lineEntry = getglobal("AuctionatorBuyEntry"..line)
if numrows <= 17 then
lineEntry:SetWidth(632)
if numrows <= 19 then
lineEntry:SetWidth(800)
else
lineEntry:SetWidth(514)
lineEntry:SetWidth(782)
end
lineEntry:SetID(dataOffset)
+19 -17
View File
@@ -19,7 +19,7 @@
<Frame>
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="245" y="0"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="300" y="0"/></Offset></Anchor></Anchors>
<Frames>
<Frame name="$parent_UnitPrice" inherits="SmallMoneyFrameTemplate">
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
@@ -35,7 +35,7 @@
<Frame>
<Size><AbsDimension x="50" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="385" y="-3"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="485" y="-3"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parent_StackSize" inherits="GameFontHighlightSmall">
@@ -47,7 +47,7 @@
<Frame>
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="490" y="0"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="620" 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>
@@ -86,21 +86,21 @@
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="Advanced Search">
<FontString inherits="GameFontNormal" text="Auctionator Buy">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="-100" y="-18"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="AuctionatorBuySearchBoxLabel" inherits="GameFontNormalSmall" text="Search For">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="40" y="-50"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-50" 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>
<Size><AbsDimension x="802" y="64"/></Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-22" y="-82"/>
<AbsDimension x="-190" y="-52"/>
</Offset>
</Anchor>
</Anchors>
@@ -112,15 +112,15 @@
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Unit Price">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="302" y="1"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="358" 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>
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="509" 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>
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="675" y="1"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
@@ -128,12 +128,12 @@
<Frames>
<EditBox name="AuctionatorBuySearchBox" autoFocus="false" inherits="InputBoxTemplate">
<Size><AbsDimension x="240" y="20"/></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuySearchBoxLabel" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="2" y="-4"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT" relativeTo="AuctionatorBuySearchBoxLabel" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors>
</EditBox>
<Button name="AuctionatorBuySearchButton" inherits="UIPanelButtonTemplate" text="Search">
<Size><AbsDimension x="80" y="22"/></Size>
<Anchors><Anchor point="RIGHT" relativeTo="AuctionatorBuySearchBox" relativePoint="RIGHT"><Offset><AbsDimension x="90" y="3" /></Offset></Anchor></Anchors>
<Anchors><Anchor point="LEFT" relativeTo="AuctionatorBuySearchBox" relativePoint="RIGHT"><Offset><AbsDimension x="10" y="1" /></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
AuctionatorBuySearchButton_OnClick()
@@ -141,8 +141,8 @@
</Scripts>
</Button>
<Button name="AuctionatorBuyBuySelectedButton" inherits="UIPanelButtonTemplate" text="Buy Selected">
<Size><AbsDimension x="126" y="22"/> </Size>
<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>
<Scripts>
<OnClick>
@@ -152,8 +152,8 @@
</Button>
<ScrollFrame name="AuctionatorBuyScrollFrame" inherits="FauxScrollFrameTemplate">
<Size><AbsDimension x="617" y="279"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-29" y="-128"/></Offset></Anchor></Anchors>
<Size><AbsDimension x="785" y="309"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-197" y="-98"/></Offset></Anchor></Anchors>
<Scripts>
<OnVerticalScroll>
@@ -183,7 +183,9 @@
<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="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>
<Button name="AuctionatorBuyEntry17" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry16" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorBuyEntry18" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry17" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuctionatorBuyEntry19" inherits="AuctionatorBuyEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuctionatorBuyEntry18" relativePoint="BOTTOMLEFT"/></Anchors></Button>
</Frames>
</Frame>
</Ui>