finished sliders for sell
This commit is contained in:
Generated
+51
-56
@@ -2,16 +2,11 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="3c1af1d3-ae57-470d-8daa-a9295703c6fc" name="Default" comment="">
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Aux-Addon.toc" afterPath="$PROJECT_DIR$/Aux-Addon.toc" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/buy.lua" afterPath="$PROJECT_DIR$/buy.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/buy.xml" afterPath="$PROJECT_DIR$/buy.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/core.lua" afterPath="$PROJECT_DIR$/core.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/core.xml" afterPath="$PROJECT_DIR$/core.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/info.lua" afterPath="$PROJECT_DIR$/info.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/list.lua" afterPath="$PROJECT_DIR$/list.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/sell.lua" afterPath="$PROJECT_DIR$/sell.lua" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/sell.xml" afterPath="$PROJECT_DIR$/sell.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/stack.lua" afterPath="$PROJECT_DIR$/stack.lua" />
|
||||
</list>
|
||||
<ignored path="Aux-Addon.iws" />
|
||||
<ignored path=".idea/workspace.xml" />
|
||||
@@ -77,8 +72,8 @@
|
||||
<file leaf-file-name="core.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/core.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="4184" max-vertical-offset="8772">
|
||||
<caret line="265" column="17" selection-start-line="265" selection-start-column="17" selection-end-line="265" selection-end-column="17" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="615" max-vertical-offset="8840">
|
||||
<caret line="58" column="34" selection-start-line="58" selection-start-column="34" selection-end-line="58" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -87,8 +82,8 @@
|
||||
<file leaf-file-name="buy.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/buy.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="3.642857" vertical-offset="9826" max-vertical-offset="16541">
|
||||
<caret line="572" column="29" selection-start-line="572" selection-start-column="29" selection-end-line="572" selection-end-column="29" />
|
||||
<state vertical-scroll-proportion="-10.321428" vertical-offset="13498" max-vertical-offset="16235">
|
||||
<caret line="811" column="68" selection-start-line="811" selection-start-column="68" selection-end-line="811" selection-end-column="68" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -97,18 +92,18 @@
|
||||
<file leaf-file-name="info.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/info.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="95" max-vertical-offset="2992">
|
||||
<caret line="40" column="43" selection-start-line="40" selection-start-column="43" selection-end-line="40" selection-end-column="43" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="172" max-vertical-offset="2992">
|
||||
<caret line="29" column="17" selection-start-line="29" selection-start-column="17" selection-end-line="29" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="sell.lua" pinned="false" current="true" current-in-tab="true">
|
||||
<file leaf-file-name="sell.lua" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/sell.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.3150838" vertical-offset="4580" max-vertical-offset="9639">
|
||||
<caret line="286" column="17" selection-start-line="286" selection-start-column="17" selection-end-line="286" selection-end-column="17" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="2676" max-vertical-offset="10336">
|
||||
<caret line="172" column="171" selection-start-line="172" selection-start-column="171" selection-end-line="172" selection-end-column="171" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -124,11 +119,11 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="sell.xml" pinned="false" current="false" current-in-tab="false">
|
||||
<file leaf-file-name="sell.xml" pinned="false" current="true" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/sell.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="7040" max-vertical-offset="8891">
|
||||
<caret line="426" column="58" selection-start-line="426" selection-start-column="58" selection-end-line="426" selection-end-column="58" />
|
||||
<state vertical-scroll-proportion="0.505" vertical-offset="7670" max-vertical-offset="9588">
|
||||
<caret line="469" column="55" selection-start-line="469" selection-start-column="55" selection-end-line="469" selection-end-column="55" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -137,8 +132,8 @@
|
||||
<file leaf-file-name="buy.xml" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/buy.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1687" max-vertical-offset="7956">
|
||||
<caret line="124" column="76" selection-start-line="124" selection-start-column="54" selection-end-line="124" selection-end-column="76" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="3814" max-vertical-offset="7973">
|
||||
<caret line="210" column="41" selection-start-line="210" selection-start-column="41" selection-end-line="210" selection-end-column="41" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -178,14 +173,14 @@
|
||||
<option name="changedFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/list.lua" />
|
||||
<option value="$PROJECT_DIR$/buy.xml" />
|
||||
<option value="$PROJECT_DIR$/buy.lua" />
|
||||
<option value="$PROJECT_DIR$/stack.lua" />
|
||||
<option value="$PROJECT_DIR$/info.lua" />
|
||||
<option value="$PROJECT_DIR$/core.lua" />
|
||||
<option value="$PROJECT_DIR$/core.xml" />
|
||||
<option value="$PROJECT_DIR$/sell.xml" />
|
||||
<option value="$PROJECT_DIR$/buy.xml" />
|
||||
<option value="$PROJECT_DIR$/buy.lua" />
|
||||
<option value="$PROJECT_DIR$/core.lua" />
|
||||
<option value="$PROJECT_DIR$/sell.lua" />
|
||||
<option value="$PROJECT_DIR$/sell.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@@ -375,7 +370,7 @@
|
||||
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32905984" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32905984" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
@@ -431,10 +426,26 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/core.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="2193" max-vertical-offset="3434">
|
||||
<caret line="170" column="69" selection-start-line="170" selection-start-column="69" selection-end-line="170" selection-end-column="69" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/core.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="615" max-vertical-offset="8840">
|
||||
<caret line="58" column="34" selection-start-line="58" selection-start-column="34" selection-end-line="58" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/buy.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="3.642857" vertical-offset="9826" max-vertical-offset="16541">
|
||||
<caret line="572" column="29" selection-start-line="572" selection-start-column="29" selection-end-line="572" selection-end-column="29" />
|
||||
<state vertical-scroll-proportion="-10.321428" vertical-offset="13498" max-vertical-offset="16235">
|
||||
<caret line="811" column="68" selection-start-line="811" selection-start-column="68" selection-end-line="811" selection-end-column="68" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@@ -449,48 +460,32 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/info.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="95" max-vertical-offset="2992">
|
||||
<caret line="40" column="43" selection-start-line="40" selection-start-column="43" selection-end-line="40" selection-end-column="43" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/core.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="4184" max-vertical-offset="8772">
|
||||
<caret line="265" column="17" selection-start-line="265" selection-start-column="17" selection-end-line="265" selection-end-column="17" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="172" max-vertical-offset="2992">
|
||||
<caret line="29" column="17" selection-start-line="29" selection-start-column="17" selection-end-line="29" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/buy.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="1687" max-vertical-offset="7956">
|
||||
<caret line="124" column="76" selection-start-line="124" selection-start-column="54" selection-end-line="124" selection-end-column="76" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/core.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="2193" max-vertical-offset="3434">
|
||||
<caret line="170" column="69" selection-start-line="170" selection-start-column="69" selection-end-line="170" selection-end-column="69" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/sell.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="7040" max-vertical-offset="8891">
|
||||
<caret line="426" column="58" selection-start-line="426" selection-start-column="58" selection-end-line="426" selection-end-column="58" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="3253" max-vertical-offset="7973">
|
||||
<caret line="210" column="41" selection-start-line="210" selection-start-column="41" selection-end-line="210" selection-end-column="41" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/sell.lua">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.3150838" vertical-offset="4580" max-vertical-offset="9639">
|
||||
<caret line="286" column="17" selection-start-line="286" selection-start-column="17" selection-end-line="286" selection-end-column="17" />
|
||||
<state vertical-scroll-proportion="0.0" vertical-offset="2676" max-vertical-offset="10336">
|
||||
<caret line="172" column="171" selection-start-line="172" selection-start-column="171" selection-end-line="172" selection-end-column="171" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/sell.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.505" vertical-offset="7670" max-vertical-offset="9588">
|
||||
<caret line="469" column="55" selection-start-line="469" selection-start-column="55" selection-end-line="469" selection-end-column="55" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
||||
@@ -468,7 +468,9 @@ function Aux.buy.exit()
|
||||
current_page = nil
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
function Aux.buy.on_open()
|
||||
|
||||
end
|
||||
|
||||
function Aux_AuctionFrameBid_Update()
|
||||
Aux.orig.AuctionFrameBid_Update()
|
||||
@@ -497,7 +499,7 @@ function show_sheet()
|
||||
AuxBuyBidList:Hide()
|
||||
AuxBuyFullList:Hide()
|
||||
|
||||
local mode = AuxBuyModeDropDown:GetValue()
|
||||
local mode = UIDropDownMenu_GetSelectedValue(AuxBuyModeDropDown)
|
||||
if mode == BUY then
|
||||
AuxBuyBuyList:Show()
|
||||
elseif mode == BID then
|
||||
@@ -807,6 +809,7 @@ end
|
||||
-----------------------------------------
|
||||
|
||||
function Aux_Buy_ScrollbarUpdate()
|
||||
local mode = UIDropDownMenu_GetSelectedValue(AuxBuyModeDropDown)
|
||||
if mode == BUY then
|
||||
Aux.list.populate(AuxBuyBuyList.sheet, auctions or {})
|
||||
elseif mode == BID then
|
||||
@@ -894,7 +897,7 @@ function AuxBuyQualityDropDown_Initialize()
|
||||
UIDropDownMenu_AddButton{
|
||||
text = getglobal("ITEM_QUALITY"..i.."_DESC"),
|
||||
value = i,
|
||||
func = function AuxBuyQualityDropDown_OnClick()
|
||||
func = function()
|
||||
UIDropDownMenu_SetSelectedValue(AuxBuyQualityDropDown, this.value)
|
||||
end,
|
||||
}
|
||||
@@ -938,7 +941,7 @@ function AuxBuyModeDropDown_Initialize()
|
||||
UIDropDownMenu_AddButton{
|
||||
text = mode.name,
|
||||
value = i,
|
||||
func = function AuxBuyQualityDropDown_OnClick()
|
||||
func = function()
|
||||
UIDropDownMenu_SetSelectedValue(AuxBuyModeDropDown, this.value)
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<Frame name="AuxBuySellList" hidden="true">
|
||||
<Frame name="AuxBuyBidList" hidden="true">
|
||||
<Size><AbsDimension x="615" y="326"/></Size>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="179" y="-94"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
@@ -103,6 +103,7 @@
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
UIDropDownMenu_Initialize(this, AuxBuyModeDropDown_Initialize)
|
||||
UIDropDownMenu_SetSelectedValue(this, 1)
|
||||
</OnLoad>
|
||||
<OnShow>
|
||||
UIDropDownMenu_Initialize(this, AuxBuyModeDropDown_Initialize)
|
||||
|
||||
@@ -54,6 +54,10 @@ function Aux_OnAddonLoaded()
|
||||
Aux_SetupHookFunctions()
|
||||
|
||||
Aux.tabs.sell.hiddenElements = {
|
||||
AuctionsPriceText,
|
||||
StartPrice,
|
||||
AuctionsBuyoutText,
|
||||
BuyoutPrice,
|
||||
AuctionsDurationText,
|
||||
AuctionsShortAuctionButton,
|
||||
AuctionsMediumAuctionButton,
|
||||
|
||||
@@ -10,9 +10,7 @@ local current_auction
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
local record_auction, undercut, item_class_index, item_subclass_index, set_message, report, select_entry, update_recommendation, refresh_entries, availability, charge_classes
|
||||
|
||||
-----------------------------------------
|
||||
local record_auction, undercut, item_class_index, item_subclass_index, set_message, report, select_entry, update_recommendation, refresh_entries, availability, charge_classes, get_stack_size_slider_value
|
||||
|
||||
function Aux.sell.on_open()
|
||||
AuxSellStackSizeSlider:SetValueStep(1)
|
||||
@@ -20,9 +18,29 @@ function Aux.sell.on_open()
|
||||
|
||||
AuxSellStackCountSlider:SetValueStep(1)
|
||||
AuxSellStackCountSliderText:SetText('Stack Count')
|
||||
|
||||
Aux.sell.validate_parameters()
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
function Aux.sell.duration_radio_button_on_click(index)
|
||||
AuxSellParametersShortDurationRadio:SetChecked(false)
|
||||
AuxSellParametersMediumDurationRadio:SetChecked(false)
|
||||
AuxSellParametersLongDurationRadio:SetChecked(false)
|
||||
if index == 1 then
|
||||
AuxSellParametersShortDurationRadio:SetChecked(true)
|
||||
AuctionFrameAuctions.duration = 120
|
||||
AUX_AUCTION_DURATION = 'short'
|
||||
elseif index == 2 then
|
||||
AuxSellParametersMediumDurationRadio:SetChecked(true)
|
||||
AuctionFrameAuctions.duration = 480
|
||||
AUX_AUCTION_DURATION = 'medium'
|
||||
else
|
||||
AuxSellParametersLongDurationRadio:SetChecked(true)
|
||||
AuctionFrameAuctions.duration = 1440
|
||||
AUX_AUCTION_DURATION = 'long'
|
||||
end
|
||||
update_recommendation()
|
||||
end
|
||||
|
||||
function Aux_Sell_AuctionFrameAuctions_OnShow()
|
||||
Aux.orig.AuctionFrameAuctions_OnShow()
|
||||
@@ -33,31 +51,16 @@ end
|
||||
|
||||
function Aux_Sell_SetAuctionDuration(duration)
|
||||
if duration == 'short' then
|
||||
Aux_Sell_AuctionsRadioButton_OnClick(1)
|
||||
Aux.sell.duration_radio_button_on_click(1)
|
||||
elseif duration == 'medium' then
|
||||
Aux_Sell_AuctionsRadioButton_OnClick(2)
|
||||
Aux.sell.duration_radio_button_on_click(2)
|
||||
elseif duration == 'long' then
|
||||
Aux_Sell_AuctionsRadioButton_OnClick(3)
|
||||
Aux.sell.duration_radio_button_on_click(3)
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
function Aux_Sell_AuctionsRadioButton_OnClick(index)
|
||||
if index == 1 then
|
||||
AUX_AUCTION_DURATION = 'short'
|
||||
elseif index == 2 then
|
||||
AUX_AUCTION_DURATION = 'medium'
|
||||
elseif index == 3 then
|
||||
AUX_AUCTION_DURATION = 'long'
|
||||
end
|
||||
|
||||
Aux.orig.AuctionsRadioButton_OnClick(index)
|
||||
update_recommendation()
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
function Aux_AuctionFrameAuctions_Update()
|
||||
Aux.orig.AuctionFrameAuctions_Update()
|
||||
if PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.sell.index and AuctionFrame:IsShown() then
|
||||
@@ -69,7 +72,7 @@ end
|
||||
|
||||
function Aux.sell.post_auctions()
|
||||
if current_auction and PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.sell.index then
|
||||
local name, stack_size, buyout_price, stack_count = current_auction.name, AuxSellStackSize:GetNumber(), MoneyInputFrame_GetCopper(BuyoutPrice), AuxSellStackCount:GetNumber()
|
||||
local name, stack_size, buyout_price, stack_count = current_auction.name, get_stack_size_slider_value(), MoneyInputFrame_GetCopper(AuxSellParametersBuyoutPrice), AuxSellStackCountSlider:GetValue()
|
||||
local duration
|
||||
if AuctionFrameAuctions.duration == 120 then
|
||||
duration = 2
|
||||
@@ -83,7 +86,7 @@ function Aux.sell.post_auctions()
|
||||
name,
|
||||
stack_size,
|
||||
AuctionFrameAuctions.duration,
|
||||
MoneyInputFrame_GetCopper(StartPrice),
|
||||
MoneyInputFrame_GetCopper(AuxSellParametersStartPrice),
|
||||
buyout_price,
|
||||
stack_count,
|
||||
function(posted)
|
||||
@@ -142,15 +145,43 @@ function select_entry()
|
||||
|
||||
auxSellEntries[current_auction.name].selected = absoluteBest
|
||||
|
||||
if bestPrice[AuxSellStackSize:GetNumber()] then
|
||||
auxSellEntries[current_auction.name].selected = bestPrice[AuxSellStackSize:GetNumber()]
|
||||
bestPriceOurStackSize = bestPrice[AuxSellStackSize:GetNumber()]
|
||||
if bestPrice[get_stack_size_slider_value()] then
|
||||
auxSellEntries[current_auction.name].selected = bestPrice[get_stack_size_slider_value()]
|
||||
bestPriceOurStackSize = bestPrice[get_stack_size_slider_value()]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------
|
||||
|
||||
function get_stack_size_slider_value()
|
||||
if current_auction.has_charges then
|
||||
return AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider:GetValue()]
|
||||
else
|
||||
return AuxSellStackSizeSlider:GetValue()
|
||||
end
|
||||
end
|
||||
|
||||
function Aux.sell.validate_parameters()
|
||||
AuxSellPostButton:Disable()
|
||||
AuxSellParametersBuyoutPriceErrorText:Hide()
|
||||
|
||||
if not current_auction then
|
||||
return
|
||||
end
|
||||
|
||||
if MoneyInputFrame_GetCopper(AuxSellParametersBuyoutPrice) > 0 and MoneyInputFrame_GetCopper(AuxSellParametersStartPrice) > MoneyInputFrame_GetCopper(AuxSellParametersBuyoutPrice) then
|
||||
AuxSellParametersBuyoutPriceErrorText:Show()
|
||||
return
|
||||
end
|
||||
|
||||
if MoneyInputFrame_GetCopper(AuxSellParametersStartPrice) < 1 then
|
||||
return
|
||||
end
|
||||
|
||||
AuxSellPostButton:Enable()
|
||||
end
|
||||
|
||||
function update_recommendation()
|
||||
AuxRecommendStaleText:Hide()
|
||||
|
||||
@@ -161,8 +192,8 @@ function update_recommendation()
|
||||
AuxSellItemName:SetText()
|
||||
AuxSellItemCount:SetText()
|
||||
|
||||
MoneyInputFrame_SetCopper(BuyoutPrice, 0)
|
||||
MoneyInputFrame_SetCopper(StartPrice, 0)
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0)
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 0)
|
||||
|
||||
AuxSellStackSizeSlider:SetMinMaxValues(0,0)
|
||||
AuxSellStackSize:SetNumber(0)
|
||||
@@ -176,8 +207,8 @@ function update_recommendation()
|
||||
|
||||
AuxSellItem:SetNormalTexture(current_auction.texture)
|
||||
AuxSellItemName:SetText(current_auction.name)
|
||||
if AuxSellStackSize:GetNumber() > 1 then
|
||||
AuxSellItemCount:SetText(AuxSellStackSize:GetNumber())
|
||||
if get_stack_size_slider_value() > 1 then
|
||||
AuxSellItemCount:SetText(get_stack_size_slider_value())
|
||||
AuxSellItemCount:Show()
|
||||
else
|
||||
AuxSellItemCount:Hide()
|
||||
@@ -185,7 +216,7 @@ function update_recommendation()
|
||||
|
||||
AuxSellRefreshButton:Enable()
|
||||
|
||||
MoneyFrame_Update("AuctionsDepositMoneyFrame", current_auction.base_deposit * AuxSellStackCount:GetNumber() * (current_auction.has_charges and 1 or AuxSellStackSize:GetNumber()) * AuctionFrameAuctions.duration / 120)
|
||||
MoneyFrame_Update("AuctionsDepositMoneyFrame", current_auction.base_deposit * AuxSellStackCountSlider:GetValue() * (current_auction.has_charges and 1 or get_stack_size_slider_value()) * AuctionFrameAuctions.duration / 120)
|
||||
|
||||
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
|
||||
@@ -193,7 +224,7 @@ function update_recommendation()
|
||||
AuxRecommendStaleText:Show()
|
||||
end
|
||||
|
||||
local newBuyoutPrice = auxSellEntries[current_auction.name].selected.itemPrice * AuxSellStackSize:GetNumber()
|
||||
local newBuyoutPrice = auxSellEntries[current_auction.name].selected.itemPrice * get_stack_size_slider_value()
|
||||
|
||||
if auxSellEntries[current_auction.name].selected.numYours == 0 then
|
||||
newBuyoutPrice = undercut(newBuyoutPrice)
|
||||
@@ -205,22 +236,22 @@ function update_recommendation()
|
||||
Aux_ShowElems(Aux.tabs.sell.recommendationElements)
|
||||
|
||||
AuxRecommendText:SetText("Recommended Buyout Price")
|
||||
AuxRecommendPerStackText:SetText("for a stack of "..AuxSellStackSize:GetNumber())
|
||||
AuxRecommendPerStackText:SetText("for a stack of "..get_stack_size_slider_value())
|
||||
|
||||
|
||||
AuxRecommendItemTex:SetNormalTexture(current_auction.texture)
|
||||
if AuxSellStackSize:GetNumber() > 1 then
|
||||
AuxRecommendItemTexCount:SetText(AuxSellStackSize:GetNumber())
|
||||
AuxRecommendItemTexCount:SetText(get_stack_size_slider_value())
|
||||
AuxRecommendItemTexCount:Show()
|
||||
else
|
||||
AuxRecommendItemTexCount:Hide()
|
||||
end
|
||||
|
||||
MoneyFrame_Update("AuxRecommendPerItemPrice", Aux_Round(AuxSellStackSize:GetNumber() > 0 and newBuyoutPrice / AuxSellStackSize:GetNumber() or 0))
|
||||
MoneyFrame_Update("AuxRecommendPerItemPrice", Aux_Round(get_stack_size_slider_value() > 0 and newBuyoutPrice / get_stack_size_slider_value() or 0))
|
||||
MoneyFrame_Update("AuxRecommendPerStackPrice", Aux_Round(newBuyoutPrice))
|
||||
|
||||
MoneyInputFrame_SetCopper(BuyoutPrice, Aux_Round(newBuyoutPrice))
|
||||
MoneyInputFrame_SetCopper(StartPrice, Aux_Round(newStartPrice))
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, Aux_Round(newBuyoutPrice))
|
||||
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, Aux_Round(newStartPrice))
|
||||
|
||||
if auxSellEntries[current_auction.name].selected.stackSize == auxSellEntries[current_auction.name][1].stackSize and auxSellEntries[current_auction.name].selected.buyoutPrice == auxSellEntries[current_auction.name][1].buyoutPrice then
|
||||
AuxRecommendBasisText:SetText("(based on cheapest)")
|
||||
@@ -242,7 +273,7 @@ end
|
||||
|
||||
function Aux.sell.quantity_update()
|
||||
if current_auction then
|
||||
AuxSellStackCountSlider:SetMinMaxValues(1, current_auction.has_charges and current_auction.availability[AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider.GetValue()]] or floor(current_auction.availability[0] / AuxSellStackSize:GetNumber()))
|
||||
AuxSellStackCountSlider:SetMinMaxValues(1, current_auction.has_charges and current_auction.availability[AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider.GetValue()]] or floor(current_auction.availability[0] / get_stack_size_slider_value()))
|
||||
end
|
||||
select_entry()
|
||||
update_recommendation()
|
||||
@@ -287,7 +318,7 @@ function Aux.sell.set_auction(bag, slot)
|
||||
}
|
||||
|
||||
AuxSellStackSizeSlider.charge_classes = charge_classes(current_auction.availability)
|
||||
AuxSellStackSizeSlider:SetMinMaxValues(1, current_auction.has_charges and getn(charge_classes(current_auction.availability)) or min(current_auction.max_stack, current_auction.availability[0]))
|
||||
AuxSellStackSizeSlider:SetMinMaxValues(1, current_auction.has_charges and getn(charge_classes(current_auction.availability)) or min(container_item.max_stack, current_auction.availability[0]))
|
||||
AuxSellStackSizeSlider:SetValue(current_auction.has_charges and Aux.util.index_of(container_item.charges, charge_classes(current_auction.availability)) or container_item.count)
|
||||
AuxSellStackCountSlider:SetValue(1)
|
||||
Aux.sell.quantity_update()
|
||||
@@ -425,7 +456,7 @@ function Aux.sell.scrollbar_update()
|
||||
lineEntry_time:SetText("Very Long")
|
||||
end
|
||||
|
||||
if entry.stackSize == AuxSellStackSize:GetNumber() then
|
||||
if entry.stackSize == get_stack_size_slider_value() then
|
||||
lineEntry_stacks:SetTextColor(0.2, 0.9, 0.2)
|
||||
else
|
||||
lineEntry_stacks:SetTextColor(1.0, 1.0, 1.0)
|
||||
|
||||
@@ -358,12 +358,12 @@
|
||||
|
||||
<frame name="AuxSellParameters">
|
||||
<Size>
|
||||
<AbsDimension x="1" y="1"/>
|
||||
<AbsDimension x="200" y="600"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="28" y="-202"/>
|
||||
<AbsDimension x="28" y="-153"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -373,7 +373,7 @@
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-60"/>
|
||||
<AbsDimension x="0" y="-49"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -381,45 +381,6 @@
|
||||
</layer>
|
||||
</layers>
|
||||
<frames>
|
||||
<CheckButton name="$parentShortAuctionRadio" inherits="SendMailRadioButtonTemplate" id="1">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parentDurationText" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="-4"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>getglobal(this:GetName().."Text"):SetText("2h");</OnLoad>
|
||||
<!--<OnClick>AuctionFramePo////st_DurationRadioButton_OnClick(this, this:GetID())</OnClick>-->
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentMediumAuctionRadio" inherits="SendMailRadioButtonTemplate" id="2">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentShortAuctionRadio" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="24" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>getglobal(this:GetName().."Text"):SetText("8h");</OnLoad>
|
||||
<!--<OnClick>AuctionFramePost_DurationRadioButton_OnClick(this, this:GetID())</OnClick>-->
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentLongAuctionRadio" inherits="SendMailRadioButtonTemplate" id="3">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentMediumAuctionRadio" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="24" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>getglobal(this:GetName().."Text"):SetText("24h");</OnLoad>
|
||||
<!--<OnClick>AuctionFramePost_DurationRadioButton_OnClick(this, this:GetID())</OnClick>-->
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<Slider name="AuxSellStackSizeSlider" inherits="AuxSliderTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
@@ -429,7 +390,7 @@
|
||||
</Scripts>
|
||||
</Slider>
|
||||
<Slider name="AuxSellStackCountSlider" inherits="AuxSliderTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-33"/></Offset></Anchor></Anchors>
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-30"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
<OnValueChanged>
|
||||
Aux.sell.quantity_update()
|
||||
@@ -459,7 +420,7 @@
|
||||
</OnEditFocusGained>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
<EditBox name="AuxSellStackCount" letters="2" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
|
||||
<EditBox name="AuxSellStackCount" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
|
||||
<Size><AbsDimension x="30" y="16"/></Size>
|
||||
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="AuxSellStackCountSlider"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors>
|
||||
<Scripts>
|
||||
@@ -489,6 +450,78 @@
|
||||
</OnEditFocusGained>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
<CheckButton name="$parentShortDurationRadio" inherits="SendMailRadioButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parentDurationText" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="3" y="-4"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>getglobal(this:GetName().."Text"):SetText("2h");</OnLoad>
|
||||
<OnClick>Aux.sell.duration_radio_button_on_click(1)</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentMediumDurationRadio" inherits="SendMailRadioButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentShortDurationRadio" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="44" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>getglobal(this:GetName().."Text"):SetText("8h");</OnLoad>
|
||||
<OnClick>Aux.sell.duration_radio_button_on_click(2)</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentLongDurationRadio" inherits="SendMailRadioButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentMediumDurationRadio" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="44" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>getglobal(this:GetName().."Text"):SetText("24h");</OnLoad>
|
||||
<OnClick>Aux.sell.duration_radio_button_on_click(3)</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<Frame name="$parentStartPrice" inherits="MoneyInputFrameTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="2" y="-94"/></Offset></Anchor></Anchors>
|
||||
<layers>
|
||||
<Layer level="ARTWORK">
|
||||
<FontString name="$parentText" inherits="GameFontHighlightSmall" text="STARTING_PRICE">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="12"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
MoneyInputFrame_SetOnvalueChangedFunc(this, Aux.sell.validate_parameters)
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<Frame name="$parentBuyoutPrice" inherits="MoneyInputFrameTemplate">
|
||||
<Anchors><Anchor point="TOPLEFT" relativeTo="AuctionsBuyoutText" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="2" y="-2"/></Offset></Anchor></Anchors>
|
||||
<layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString name="$parentText" inherits="GameFontHighlightSmall" text="Buyout Price |cff808080(optional)|r">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="12"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parentErrorText" inherits="GameFontRedSmall" text="AUCTION_BUYOUT_ERROR">
|
||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="23"/></Offset></Anchor></Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
MoneyInputFrame_SetOnvalueChangedFunc(this, Aux.sell.validate_parameters)
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</frames>
|
||||
</frame>
|
||||
<Frame name="AuxSellReport" frameStrata="FULLSCREEN_DIALOG" toplevel="true" parent="UIParent" enableMouse="true" hidden="true">
|
||||
|
||||
Reference in New Issue
Block a user