This commit is contained in:
Manuel Simon Hirsig
2015-10-25 03:02:18 +01:00
13 changed files with 1871 additions and 1808 deletions
+316 -243
View File
@@ -1,9 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="3c1af1d3-ae57-470d-8daa-a9295703c6fc" name="Default" comment=""> <list default="true" id="231796f5-1261-4550-a370-a9bf34182237" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/buy.lua" afterPath="$PROJECT_DIR$/buy.lua" /> <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$/list.lua" afterPath="$PROJECT_DIR$/list.lua" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/options.xml" afterPath="$PROJECT_DIR$/options.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/scan.lua" afterPath="$PROJECT_DIR$/scan.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" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/util.lua" afterPath="$PROJECT_DIR$/util.lua" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list> </list>
<ignored path="Aux-Addon.iws" /> <ignored path="Aux-Addon.iws" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@@ -66,11 +78,11 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf> <leaf>
<file leaf-file-name="core.lua" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="util.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/core.lua"> <entry file="file://$PROJECT_DIR$/util.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="2295" max-vertical-offset="8602"> <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="5372">
<caret line="150" column="0" selection-start-line="150" selection-start-column="0" selection-end-line="150" selection-end-column="0" /> <caret line="26" column="28" selection-start-line="26" selection-start-column="19" selection-end-line="26" selection-end-column="28" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@@ -79,78 +91,38 @@
<file leaf-file-name="info.lua" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="info.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/info.lua"> <entry file="file://$PROJECT_DIR$/info.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1833" max-vertical-offset="3060"> <state vertical-scroll-proportion="0.0" vertical-offset="302" max-vertical-offset="3298">
<caret line="134" column="49" selection-start-line="134" selection-start-column="49" selection-end-line="134" selection-end-column="49" /> <caret line="43" column="29" selection-start-line="43" selection-start-column="29" selection-end-line="43" selection-end-column="29" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="scan.lua" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="post.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scan.lua"> <entry file="file://$PROJECT_DIR$/post.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="2043" max-vertical-offset="2737"> <state vertical-scroll-proportion="0.0" vertical-offset="612" max-vertical-offset="1819">
<caret line="138" column="14" selection-start-line="138" selection-start-column="14" selection-end-line="138" selection-end-column="14" /> <caret line="75" column="17" selection-start-line="75" selection-start-column="17" selection-end-line="75" selection-end-column="17" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="buy.lua" pinned="false" current="true" current-in-tab="true"> <file leaf-file-name="stack.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/buy.lua"> <entry file="file://$PROJECT_DIR$/stack.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6960894" vertical-offset="13674" max-vertical-offset="15232"> <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3145">
<caret line="841" column="27" selection-start-line="841" selection-start-column="27" selection-end-line="841" selection-end-column="27" /> <caret line="25" column="45" selection-start-line="25" selection-start-column="45" selection-end-line="25" selection-end-column="45" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="util.lua" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="core.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/util.lua"> <entry file="file://$PROJECT_DIR$/core.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1564" max-vertical-offset="4420"> <state vertical-scroll-proportion="0.0" vertical-offset="1472" max-vertical-offset="4420">
<caret line="92" column="24" selection-start-line="92" selection-start-column="18" selection-end-line="92" selection-end-column="24" /> <caret line="130" column="47" selection-start-line="130" selection-start-column="47" selection-end-line="130" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="list.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/list.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="3716" max-vertical-offset="4624">
<caret line="256" column="31" selection-start-line="256" selection-start-column="31" selection-end-line="256" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="sell.xml" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/sell.xml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="7973" 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>
</entry>
</file>
<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="7537" max-vertical-offset="8687">
<caret line="90" column="87" selection-start-line="90" selection-start-column="87" selection-end-line="90" selection-end-column="87" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="options.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/options.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2040">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@@ -159,8 +131,48 @@
<file leaf-file-name="core.xml" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="core.xml" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/core.xml"> <entry file="file://$PROJECT_DIR$/core.xml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="182" max-vertical-offset="1904"> <state vertical-scroll-proportion="0.0" vertical-offset="3226" max-vertical-offset="6817">
<caret line="61" column="87" selection-start-line="61" selection-start-column="87" selection-end-line="61" selection-end-column="87" /> <caret line="204" column="87" selection-start-line="204" selection-start-column="87" selection-end-line="204" selection-end-column="87" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="scan.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scan.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2737">
<caret line="70" column="30" selection-start-line="70" selection-start-column="30" selection-end-line="70" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
</file>
<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.0" vertical-offset="8217" max-vertical-offset="12478">
<caret line="514" column="67" selection-start-line="514" selection-start-column="67" selection-end-line="514" selection-end-column="67" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name=".gitignore" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="883">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="sell.xml" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/sell.xml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1332" max-vertical-offset="5746">
<caret line="121" column="39" selection-start-line="121" selection-start-column="39" selection-end-line="121" selection-end-column="39" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@@ -179,17 +191,19 @@
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="changedFiles"> <option name="changedFiles">
<list> <list>
<option value="$PROJECT_DIR$/stack.lua" /> <option value="$PROJECT_DIR$/list.lua" />
<option value="$PROJECT_DIR$/options.xml" />
<option value="$PROJECT_DIR$/buy.xml" />
<option value="$PROJECT_DIR$/core.xml" />
<option value="$PROJECT_DIR$/scan.lua" />
<option value="$PROJECT_DIR$/buy.lua" />
<option value="$PROJECT_DIR$/info.lua" />
<option value="$PROJECT_DIR$/core.lua" />
<option value="$PROJECT_DIR$/sell.xml" /> <option value="$PROJECT_DIR$/sell.xml" />
<option value="$PROJECT_DIR$/util.lua" /> <option value="$PROJECT_DIR$/util.lua" />
<option value="$PROJECT_DIR$/stack.lua" />
<option value="$PROJECT_DIR$/sell.lua" /> <option value="$PROJECT_DIR$/sell.lua" />
<option value="$PROJECT_DIR$/core.xml" /> <option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/buy.xml" />
<option value="$PROJECT_DIR$/core.lua" />
<option value="$PROJECT_DIR$/scan.lua" />
<option value="$PROJECT_DIR$/info.lua" />
<option value="$PROJECT_DIR$/list.lua" />
<option value="$PROJECT_DIR$/buy.lua" />
</list> </list>
</option> </option>
</component> </component>
@@ -226,7 +240,6 @@
</navigator> </navigator>
<panes> <panes>
<pane id="PackagesPane" /> <pane id="PackagesPane" />
<pane id="Scope" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<PATH> <PATH>
@@ -247,6 +260,7 @@
</PATH> </PATH>
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
@@ -256,12 +270,6 @@
<property name="MemberChooser.sorted" value="false" /> <property name="MemberChooser.sorted" value="false" />
<property name="MemberChooser.showClasses" value="true" /> <property name="MemberChooser.showClasses" value="true" />
<property name="MemberChooser.copyJavadoc" value="false" /> <property name="MemberChooser.copyJavadoc" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="FullScreen" value="false" />
<property name="options.lastSelected" value="editor.preferences.appearance" />
<property name="options.splitter.main.proportions" value="0.3" />
<property name="options.splitter.details.proportions" value="0.2" />
<property name="options.searchVisible" value="true" />
</component> </component>
<component name="RunManager"> <component name="RunManager">
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin"> <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
@@ -270,6 +278,27 @@
<option name="PROGRAM_PARAMETERS" /> <option name="PROGRAM_PARAMETERS" />
<method /> <method />
</configuration> </configuration>
<configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
<module name="" />
<option name="TESTING_TYPE" value="0" />
<option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
<option name="METHOD_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="PACKAGE_NAME" value="" />
<option name="TARGET_SELECTION_MODE" value="EMULATOR" />
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
<option name="PREFERRED_AVD" value="" />
<option name="USE_COMMAND_LINE" value="true" />
<option name="COMMAND_LINE" value="" />
<option name="WIPE_USER_DATA" value="false" />
<option name="DISABLE_BOOT_ANIMATION" value="false" />
<option name="NETWORK_SPEED" value="full" />
<option name="NETWORK_LATENCY" value="none" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="FILTER_LOGCAT_AUTOMATICALLY" value="true" />
<method />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote"> <configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" /> <option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" /> <option name="SERVER_MODE" value="false" />
@@ -352,6 +381,38 @@
<patterns /> <patterns />
<method /> <method />
</configuration> </configuration>
<configuration default="true" type="#com.sylvanaar.idea.Lua.run.LuaConfigurationType" factoryName="Lua Script">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="INTERPRETER_PATH" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="ALTERNATE_INTERPRETER" value="false" />
<envs />
<module name="Aux-Addon" />
<option name="SCRIPT_NAME" value="" />
<option name="PARAMETERS" value="" />
<method />
</configuration>
<configuration default="true" type="AndroidRunConfigurationType" factoryName="Android Application">
<module name="" />
<option name="ACTIVITY_CLASS" value="" />
<option name="MODE" value="default_activity" />
<option name="DEPLOY" value="true" />
<option name="ARTIFACT_NAME" value="" />
<option name="TARGET_SELECTION_MODE" value="EMULATOR" />
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
<option name="PREFERRED_AVD" value="" />
<option name="USE_COMMAND_LINE" value="true" />
<option name="COMMAND_LINE" value="" />
<option name="WIPE_USER_DATA" value="false" />
<option name="DISABLE_BOOT_ANIMATION" value="false" />
<option name="NETWORK_SPEED" value="full" />
<option name="NETWORK_LATENCY" value="none" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
<option name="FILTER_LOGCAT_AUTOMATICALLY" value="true" />
<method />
</configuration>
<list size="0" /> <list size="0" />
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false"> <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host> <Host>localhost</Host>
@@ -359,14 +420,11 @@
</configuration> </configuration>
</component> </component>
<component name="ShelveChangesManager" show_recycled="false" /> <component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager"> <component name="TaskManager">
<task active="true" id="Default" summary="Default task"> <task active="true" id="Default" summary="Default task">
<changelist id="3c1af1d3-ae57-470d-8daa-a9295703c6fc" name="Default" comment="" /> <changelist id="231796f5-1261-4550-a370-a9bf34182237" name="Default" comment="" />
<created>1445044678361</created> <created>1445635607102</created>
<updated>1445044678361</updated> <updated>1445635607102</updated>
</task> </task>
<servers /> <servers />
</component> </component>
@@ -382,21 +440,21 @@
<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="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="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" /> <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" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" 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="Version Control" 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="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" 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="Maven Projects" 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="Maven Projects" 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="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Application Servers" 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="Application Servers" 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="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="LuaJ" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="LuaJ" 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="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" 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="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32941177" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
</layout> </layout>
</component> </component>
<component name="Vcs.Log.UiProperties"> <component name="Vcs.Log.UiProperties">
@@ -419,194 +477,209 @@
<breakpoint-manager /> <breakpoint-manager />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/core.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="8602">
<caret line="150" column="0" selection-start-line="150" selection-start-column="0" selection-end-line="150" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/info.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1833" max-vertical-offset="3060">
<caret line="134" column="49" selection-start-line="134" selection-start-column="49" selection-end-line="134" selection-end-column="49" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scan.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="2043" max-vertical-offset="2737">
<caret line="138" column="14" selection-start-line="138" selection-start-column="14" selection-end-line="138" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/buy.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="12111" max-vertical-offset="15198">
<caret line="725" column="77" selection-start-line="725" selection-start-column="77" selection-end-line="725" selection-end-column="77" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util.lua"> <entry file="file://$PROJECT_DIR$/util.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1564" max-vertical-offset="4420"> <state vertical-scroll-proportion="0.0" vertical-offset="121" max-vertical-offset="5032">
<caret line="92" column="24" selection-start-line="92" selection-start-column="18" selection-end-line="92" selection-end-column="24" /> <caret line="32" column="0" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/list.lua"> <entry file="file://$PROJECT_DIR$/list.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="4386" max-vertical-offset="4624"> <state vertical-scroll-proportion="0.0" vertical-offset="3784" max-vertical-offset="4692">
<caret line="258" column="8" selection-start-line="258" selection-start-column="8" selection-end-line="258" selection-end-column="8" /> <caret line="253" column="14" selection-start-line="253" selection-start-column="14" selection-end-line="253" selection-end-column="14" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/sell.xml"> <entry file="file://$PROJECT_DIR$/sell.xml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="7973" max-vertical-offset="9588"> <state vertical-scroll-proportion="0.0" vertical-offset="3339" max-vertical-offset="5627">
<caret line="469" column="55" selection-start-line="469" selection-start-column="55" selection-end-line="469" selection-end-column="55" /> <caret line="209" column="111" selection-start-line="209" selection-start-column="111" selection-end-line="209" selection-end-column="111" />
<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="1061" max-vertical-offset="8687">
<caret line="90" column="87" selection-start-line="90" selection-start-column="87" selection-end-line="90" selection-end-column="87" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/options.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2040">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<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="182" max-vertical-offset="1904">
<caret line="61" column="87" selection-start-line="61" selection-start-column="87" selection-end-line="61" selection-end-column="87" />
<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="0" max-vertical-offset="8075">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/stack.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-11.678572" vertical-offset="2155" max-vertical-offset="3485">
<caret line="146" column="20" selection-start-line="146" selection-start-column="20" selection-end-line="146" selection-end-column="20" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/sell.lua"> <entry file="file://$PROJECT_DIR$/sell.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-3.0" vertical-offset="3520" max-vertical-offset="10353"> <state vertical-scroll-proportion="0.0" vertical-offset="6274" max-vertical-offset="12206">
<caret line="212" column="12" selection-start-line="212" selection-start-column="12" selection-end-line="212" selection-end-column="12" /> <caret line="398" column="81" selection-start-line="398" selection-start-column="81" selection-end-line="398" selection-end-column="81" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/options.xml"> <entry file="file://$PROJECT_DIR$/options.xml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="3672" max-vertical-offset="6579"> <state vertical-scroll-proportion="0.0" vertical-offset="68" max-vertical-offset="6647">
<caret line="237" column="0" selection-start-line="237" selection-start-column="0" selection-end-line="249" selection-end-column="34" /> <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="30" selection-end-column="12" />
<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="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>
</entry>
<entry file="file://$PROJECT_DIR$/core.xml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="182" max-vertical-offset="1904">
<caret line="61" column="87" selection-start-line="61" selection-start-column="87" selection-end-line="61" selection-end-column="87" />
<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="2295" max-vertical-offset="8602">
<caret line="150" column="0" selection-start-line="150" selection-start-column="0" selection-end-line="150" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/options.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2040">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scan.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="2043" max-vertical-offset="2737">
<caret line="138" column="14" selection-start-line="138" selection-start-column="14" selection-end-line="138" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/info.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1833" max-vertical-offset="3060">
<caret line="134" column="49" selection-start-line="134" selection-start-column="49" selection-end-line="134" selection-end-column="49" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1224" max-vertical-offset="4420">
<caret line="92" column="24" selection-start-line="92" selection-start-column="18" selection-end-line="92" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/list.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="3716" max-vertical-offset="4624">
<caret line="256" column="31" selection-start-line="256" selection-start-column="31" selection-end-line="256" selection-end-column="31" />
<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="1061" max-vertical-offset="8687">
<caret line="90" column="87" selection-start-line="90" selection-start-column="87" selection-end-line="90" selection-end-column="87" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/buy.lua"> <entry file="file://$PROJECT_DIR$/buy.lua">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6960894" vertical-offset="13674" max-vertical-offset="15232"> <state vertical-scroll-proportion="0.0" vertical-offset="7742" max-vertical-offset="15147">
<caret line="841" column="27" selection-start-line="841" selection-start-column="27" selection-end-line="841" selection-end-column="27" /> <caret line="468" column="151" selection-start-line="468" selection-start-column="151" selection-end-line="468" selection-end-column="151" />
<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="4529" max-vertical-offset="8602">
<caret line="299" column="68" selection-start-line="299" selection-start-column="68" selection-end-line="299" selection-end-column="68" />
<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="3226" max-vertical-offset="6817">
<caret line="202" column="13" selection-start-line="202" selection-start-column="13" selection-end-line="202" selection-end-column="13" />
<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="3381" max-vertical-offset="4267">
<caret line="218" column="15" selection-start-line="218" selection-start-column="15" selection-end-line="218" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scan.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="870" max-vertical-offset="2737">
<caret line="70" column="30" selection-start-line="70" selection-start-column="30" selection-end-line="70" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Aux-Addon.toc">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="908">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/list.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="3784" max-vertical-offset="4692">
<caret line="253" column="14" selection-start-line="253" selection-start-column="14" selection-end-line="253" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/options.xml">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="6647">
<caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="30" selection-end-column="12" />
<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="4529" max-vertical-offset="8602">
<caret line="299" column="68" selection-start-line="299" selection-start-column="68" selection-end-line="299" selection-end-column="68" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/buy.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="8217" max-vertical-offset="15147">
<caret line="502" column="14" selection-start-line="502" selection-start-column="14" selection-end-line="502" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/control.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="265" max-vertical-offset="2601">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/info.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="302" max-vertical-offset="3298">
<caret line="43" column="29" selection-start-line="43" selection-start-column="29" selection-end-line="43" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/scan.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="870" max-vertical-offset="2737">
<caret line="70" column="30" selection-start-line="70" selection-start-column="30" selection-end-line="70" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/post.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="612" max-vertical-offset="1819">
<caret line="75" column="17" selection-start-line="75" selection-start-column="17" selection-end-line="75" selection-end-column="17" />
<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="3226" max-vertical-offset="6817">
<caret line="204" column="87" selection-start-line="204" selection-start-column="87" selection-end-line="204" selection-end-column="87" />
<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="1472" max-vertical-offset="4420">
<caret line="130" column="47" selection-start-line="130" selection-start-column="47" selection-end-line="130" selection-end-column="47" />
<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="1332" max-vertical-offset="5746">
<caret line="121" column="39" selection-start-line="121" selection-start-column="39" selection-end-line="121" selection-end-column="39" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/stack.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3145">
<caret line="25" column="45" selection-start-line="25" selection-start-column="45" selection-end-line="25" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/util.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="5372">
<caret line="26" column="28" selection-start-line="26" selection-start-column="19" selection-end-line="26" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/sell.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="8217" max-vertical-offset="12478">
<caret line="514" column="67" selection-start-line="514" selection-start-column="67" selection-end-line="514" selection-end-column="67" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="883">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
+32 -37
View File
@@ -2,7 +2,6 @@ Aux.buy = {}
local create_auction_record, show_dialog, find_auction, hide_sheet, update_sheet, auction_alpha_setter, group_alpha_setter local create_auction_record, show_dialog, find_auction, hide_sheet, update_sheet, auction_alpha_setter, group_alpha_setter
local auctions local auctions
local selectedAuctions = {}
local search_query local search_query
local tooltip_patterns = {} local tooltip_patterns = {}
local current_page local current_page
@@ -426,23 +425,21 @@ Aux.buy.modes = {
}, },
} }
function Aux.buy.exit() function Aux.buy.on_close()
Aux.buy.dialog_cancel() if AuxBuyConfirmation:IsVisible() then
Aux.buy.dialog_cancel()
end
current_page = nil current_page = nil
end end
function Aux.buy.on_open() function Aux.buy.on_open()
AuxBuySearchButton:Show()
AuxBuyStopButton:Hide()
update_sheet() update_sheet()
end end
function Aux_AuctionFrameBid_Update()
Aux.orig.AuctionFrameBid_Update()
if PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.buy.index and AuctionFrame:IsShown() then
Aux_HideElems(Aux.tabs.buy.hiddenElements)
end
end
function Aux.buy.dialog_cancel() function Aux.buy.dialog_cancel()
Aux.log('Canceled.')
Aux.scan.abort() Aux.scan.abort()
AuxBuyConfirmation:Hide() AuxBuyConfirmation:Hide()
update_sheet() update_sheet()
@@ -495,7 +492,6 @@ function Aux.buy.SearchButton_onclick()
AuxBuyStopButton:Show() AuxBuyStopButton:Show()
auctions = nil auctions = nil
selectedAuctions = {}
refresh = true refresh = true
@@ -513,18 +509,16 @@ function Aux.buy.SearchButton_onclick()
usable = AuxBuyUsableCheckButton:GetChecked() usable = AuxBuyUsableCheckButton:GetChecked()
} }
Aux.log('Starting scan') Aux.log('Scanning auctions ...')
Aux.scan.start{ Aux.scan.start{
query = search_query, query = search_query,
page = AuxBuyAllPagesCheckButton:GetChecked() and 0 or AuxBuyPageEditBox:GetNumber(), page = AuxBuyAllPagesCheckButton:GetChecked() and 0 or AuxBuyPageEditBox:GetNumber(),
on_submit_query = function() on_submit_query = function()
current_page = nil current_page = nil
end, end,
on_page_loaded = function(page) on_page_loaded = function(page, total_pages)
current_page = page Aux.log('Scanning page '..(page+1)..' out of '..total_pages..' ...')
end, current_page = page
on_start_page = function(page, total_pages)
Aux.log('Scanning page ' .. page + 1 .. (total_pages > 0 and ' out of ' .. total_pages or ''))
end, end,
on_read_auction = function(i) on_read_auction = function(i)
local auction_item = Aux.info.auction_item(i) local auction_item = Aux.info.auction_item(i)
@@ -537,14 +531,15 @@ function Aux.buy.SearchButton_onclick()
end, end,
on_complete = function() on_complete = function()
auctions = auctions or {} auctions = auctions or {}
Aux.log('Scan completed: '..getn(auctions)..' auctions found') Aux.log('Scan complete: '..getn(auctions)..' '..Aux_PluralizeIf('auction', getn(auctions))..' found.')
AuxBuyStopButton:Hide()
AuxBuyStopButton:Hide()
AuxBuySearchButton:Show() AuxBuySearchButton:Show()
refresh = true refresh = true
end, end,
on_abort = function() on_abort = function()
auctions = auctions or {} auctions = auctions or {}
Aux.log('Scan aborted: '..getn(auctions)..' auctions found') Aux.log('Scan aborted: '..getn(auctions)..' '..Aux_PluralizeIf('auction', getn(auctions))..' found.')
AuxBuyStopButton:Hide() AuxBuyStopButton:Hide()
AuxBuySearchButton:Show() AuxBuySearchButton:Show()
refresh = true refresh = true
@@ -565,8 +560,8 @@ function show_dialog(buyout_mode, entry, amount)
AuxBuyConfirmation.EnhTooltip_info = entry.EnhTooltip_info AuxBuyConfirmation.EnhTooltip_info = entry.EnhTooltip_info
AuxBuyConfirmationActionButton:Disable() AuxBuyConfirmationActionButton:Disable()
AuxBuyConfirmationItem:SetNormalTexture(entry.texture) AuxBuyConfirmationItemIconTexture:SetTexture(entry.texture)
AuxBuyConfirmationItemName:SetText(entry.name) AuxBuyConfirmationItemName:SetText(entry.tooltip[1][1].text)
local color = ITEM_QUALITY_COLORS[entry.quality] local color = ITEM_QUALITY_COLORS[entry.quality]
AuxBuyConfirmationItemName:SetTextColor(color.r, color.g, color.b) AuxBuyConfirmationItemName:SetTextColor(color.r, color.g, color.b)
@@ -587,7 +582,6 @@ function show_dialog(buyout_mode, entry, amount)
AuxBuyConfirmationBuyoutPrice:Hide() AuxBuyConfirmationBuyoutPrice:Hide()
AuxBuyConfirmationBid:Show() AuxBuyConfirmationBid:Show()
end end
hide_sheet()
AuxBuyConfirmation:Show() AuxBuyConfirmation:Show()
end end
@@ -603,16 +597,16 @@ function find_auction(entry, buyout_mode, express_mode)
return return
end end
Aux.log('Processing '..(buyout_mode and 'buyout' or 'bid')..' request') local amount
if buyout_mode then
amount = entry.buyout_price
else
amount = entry.bid
end
Aux.log('Processing '..(buyout_mode and 'buyout' or 'bid')..' request for '..entry.hyperlink..' x '..entry.stack_size..' at '..Aux.util.money_string(amount)..' ...')
AuxBuySearchButton:Disable() AuxBuySearchButton:Disable()
local amount
if buyout_mode then
amount = entry.buyout_price
else
amount = entry.bid
end
if not express_mode then if not express_mode then
show_dialog(buyout_mode, entry, amount) show_dialog(buyout_mode, entry, amount)
end end
@@ -645,23 +639,23 @@ function find_auction(entry, buyout_mode, express_mode)
if entry.signature == signature then if entry.signature == signature then
ctrl.suspend() ctrl.suspend()
found = true found = true
Aux.log('Matching auction found') Aux.log('Matching auction found.'..(express_mode and '' or ' Awaiting confirmation ...'))
if express_mode then if express_mode then
if GetMoney() >= amount then if GetMoney() >= amount then
PlaceAuctionBid("list", i, amount) PlaceAuctionBid("list", i, amount)
Aux.log((buyout_mode and 'Purchased ' or 'Bid on ')..entry.hyperlink..' x '..entry.stack_size) Aux.log((buyout_mode and 'Purchased ' or 'Bid on ')..entry.hyperlink..' x '..entry.stack_size..' at '..Aux.util.money_string(amount)..'.')
entry.gone = true entry.gone = true
refresh = true refresh = true
else else
Aux.log('Not enough money.') Aux.log((buyout_mode and 'Purchase' or 'Bid')..' failed: Not enough money.')
end end
Aux.scan.abort() Aux.scan.abort()
else else
Aux.buy.dialog_action = function() Aux.buy.dialog_action = function()
if GetMoney() >= amount then if GetMoney() >= amount then
PlaceAuctionBid("list", i, amount) PlaceAuctionBid("list", i, amount)
Aux.log((buyout_mode and 'Purchased ' or 'Bid on ')..entry.hyperlink..' x '..entry.stack_size) Aux.log((buyout_mode and 'Purchased ' or 'Bid on ')..entry.hyperlink..' x '..entry.stack_size..' at '..Aux.util.money_string(amount)..'.')
entry.gone = true entry.gone = true
refresh = true refresh = true
else else
@@ -678,6 +672,7 @@ function find_auction(entry, buyout_mode, express_mode)
end, end,
on_complete = function() on_complete = function()
if not found then if not found then
Aux.log('No matching auction found. Removing entry from the cache.')
entry.gone = true entry.gone = true
refresh = true refresh = true
Aux.buy.dialog_cancel() Aux.buy.dialog_cancel()
@@ -723,7 +718,7 @@ function create_auction_record(auction_item, current_page)
elseif auction_item.high_bidder then elseif auction_item.high_bidder then
status = GREEN_FONT_COLOR_CODE..'Your Bid'..FONT_COLOR_CODE_CLOSE status = GREEN_FONT_COLOR_CODE..'Your Bid'..FONT_COLOR_CODE_CLOSE
else else
status = RED_FONT_COLOR_CODE .. 'Other Bidder'..FONT_COLOR_CODE_CLOSE status = RED_FONT_COLOR_CODE..'Other Bidder'..FONT_COLOR_CODE_CLOSE
end end
return { return {
@@ -831,7 +826,7 @@ function AuxBuyQualityDropDown_Initialize()
end end
UIDropDownMenu_AddButton{ UIDropDownMenu_AddButton{
text = ALL, text = 'All',
value = -1, value = -1,
func = on_click, func = on_click,
} }
+401 -406
View File
@@ -39,66 +39,22 @@
<TexCoords left="0" right="1.0" top="0" bottom="0.578125"/> <TexCoords left="0" right="1.0" top="0" bottom="0.578125"/>
</HighlightTexture> </HighlightTexture>
</Button> </Button>
<Frame name="AuxBuyTemplate" virtual="true" hidden="true"> <Frame name="AuxBuyFrame" hidden="true" parent="AuxFrame" setAllPoints="true">
<Size><AbsDimension x="694" y="447"/></Size>
<Anchors><Anchor point="TOPLEFT"/></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="Aux Buy">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="20" y="-18"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<FontString inherits="GameFontHighlightSmall" text="Filters">
<Anchors>
<Anchor point="TOP" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="85" y="-85"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames> <Frames>
<Frame name="AuxBuyBuyList" hidden="true"> <Frame name="AuxBuyFilters" inherits="AuxFrameBoxTemplate">
<Size><AbsDimension x="615" y="326"/></Size> <Size><AbsDimension x="180" y="326"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="179" y="-94"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="-35"/></Offset></Anchor></Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
local sort_order = Aux.util.map(Aux.buy.modes[1].sort_order, function(column_order) return { column = Aux.buy.modes[1].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end) this:SetBackdropBorderColor(0.4, 0.4, 0.4)
this.sheet = Aux.sheet.create(this, Aux.buy.modes[1].columns, sort_order, Aux.buy.modes[1].on_cell_click, Aux.buy.modes[1].on_cell_enter, Aux.buy.modes[1].on_cell_leave) this:SetBackdropColor(0.15, 0.15, 0.15)
getglobal(this:GetName().."Title"):SetText('Filters')
</OnLoad> </OnLoad>
</Scripts> </Scripts>
</Frame> <Frames>
<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>
<OnLoad>
local sort_order = Aux.util.map(Aux.buy.modes[2].sort_order, function(column_order) return { column = Aux.buy.modes[2].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
this.sheet = Aux.sheet.create(this, Aux.buy.modes[2].columns, sort_order, Aux.buy.modes[2].on_cell_click, Aux.buy.modes[2].on_cell_enter, Aux.buy.modes[2].on_cell_leave)
</OnLoad>
</Scripts>
</Frame>
<Frame name="AuxBuyFullList" hidden="true">
<Size><AbsDimension x="615" y="326"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="179" y="-94"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
local sort_order = Aux.util.map(Aux.buy.modes[3].sort_order, function(column_order) return { column = Aux.buy.modes[3].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
this.sheet = Aux.sheet.create(this, Aux.buy.modes[3].columns, sort_order, Aux.buy.modes[3].on_cell_click, Aux.buy.modes[3].on_cell_enter, Aux.buy.modes[3].on_cell_leave)
</OnLoad>
</Scripts>
</Frame>
<Frame name="AuxBuyFilters">
<Size><AbsDimension x="1" y="1"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="28" y="-117"/></Offset></Anchor></Anchors>
<Frames>
<Frame name="AuxBuyModeDropDown" inherits="UIDropDownMenuTemplate"> <Frame name="AuxBuyModeDropDown" inherits="UIDropDownMenuTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="0" /></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-8" y="-15" /></Offset></Anchor></Anchors>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
UIDropDownMenu_SetWidth(140) UIDropDownMenu_SetWidth(140)
@@ -110,225 +66,224 @@
</OnShow> </OnShow>
</Scripts> </Scripts>
<Layers> <Layers>
<Layer level="OVERLAY"> <Layer level="BACKGROUND">
<FontString inherits="GameFontHighlightSmall" text="Mode" justifyH="LEFT"> <FontString name="$parentLabel" inherits="GameFontNormalSmall" text="Mode">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="20" y="8"/></Offset></Anchor></Anchors> <Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="21" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString> </FontString>
</Layer> </Layer>
</Layers> </Layers>
</Frame> </Frame>
<EditBox name="AuxBuyNameInputBox" autoFocus="false" inherits="InputBoxTemplate"> <EditBox name="AuxBuyNameInputBox" autoFocus="false" inherits="AuxInputBoxTemplate">
<Size><AbsDimension x="119" y="22"/></Size> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="16" y="-71"/></Offset></Anchor></Anchors>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="1" y="-56"/></Offset></Anchor></Anchors> <Scripts>
<Layers> <OnLoad>
<Layer level="OVERLAY"> getglobal(this:GetName()..'Label'):SetText('Name')
<FontString inherits="GameFontHighlightSmall" text="Name" justifyH="LEFT"> this.completor = Aux.completion.completor(this)
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="9"/></Offset></Anchor></Anchors> </OnLoad>
</FontString> <OnTextChanged>
</Layer> this.completor.suggest()
</Layers> </OnTextChanged>
<Scripts> <OnTabPressed>
<OnLoad> if IsShiftKeyDown() then
this.completor = Aux.completion.completor(this) this.completor.previous()
</OnLoad> else
<OnTextChanged> this.completor.next()
this.completor.suggest() end
</OnTextChanged> </OnTabPressed>
<OnTabPressed> <OnEnterPressed>
if IsShiftKeyDown() then this.completor.close()
this.completor.previous() this:ClearFocus()
else Aux.buy.SearchButton_onclick()
this.completor.next() </OnEnterPressed>
end <OnEscapePressed>
</OnTabPressed> if this.completor.open() then
<OnEnterPressed> this.completor.close()
this.completor.close() else
this:ClearFocus() this:ClearFocus()
Aux.buy.SearchButton_onclick() end
</OnEnterPressed> </OnEscapePressed>
<OnEscapePressed> </Scripts>
if this.completor.open() then </EditBox>
this.completor.close()
else
this:ClearFocus()
end
</OnEscapePressed>
</Scripts>
</EditBox>
<CheckButton name="AuxBuyExactCheckButton" inherits="UICheckButtonTemplate" checked="true">
<Size><AbsDimension x="22" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="123" y="-56" /></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Exact" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="9"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</CheckButton>
<Frame name="AuxBuyCategoryDropDown" inherits="UIDropDownMenuTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="-89" /></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Category" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="20" y="8"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
UIDropDownMenu_SetWidth(140)
UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize)
</OnLoad>
<OnShow>
UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize)
</OnShow>
</Scripts>
</Frame>
<Frame name="AuxBuyQualityDropDown" inherits="UIDropDownMenuTemplate"> <CheckButton name="AuxBuyExactCheckButton" inherits="UICheckButtonTemplate" checked="true">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="-128" /></Offset></Anchor></Anchors> <Size><AbsDimension x="22" y="22"/></Size>
<Scripts> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="138" y="-71" /></Offset></Anchor></Anchors>
<OnLoad>
UIDropDownMenu_SetWidth(140)
UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize)
</OnLoad>
<OnShow>
UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize)
</OnShow>
</Scripts>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Rarity" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="20" y="8"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<EditBox name="AuxBuyMinLevel" letters="2" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
<Size><AbsDimension x="30" y="22"/></Size>
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="1" y="-167"/></Offset></Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString inherits="GameFontHighlightSmall" text="-">
<Anchors><Anchor point="LEFT" relativePoint="RIGHT"><Offset><AbsDimension x="-1" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Level Range" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="9"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnEnterPressed>
this:ClearFocus()
</OnEnterPressed>
</Scripts>
</EditBox>
<EditBox name="AuxBuyMaxLevel" letters="2" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
<Size><AbsDimension x="30" y="22"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="AuxBuyMinLevel" relativePoint="RIGHT"><Offset><AbsDimension x="8" y="0"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnEnterPressed>
this:ClearFocus()
</OnEnterPressed>
</Scripts>
</EditBox>
<CheckButton name="AuxBuyUsableCheckButton" inherits="UICheckButtonTemplate">
<Size><AbsDimension x="22" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="72" y="-167" /></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Usable" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="9"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</CheckButton>
<EditBox name="AuxBuyTooltipInputBox" autoFocus="false" inherits="InputBoxTemplate">
<Size><AbsDimension x="110" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-201"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Tooltip" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="9"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnEnterPressed>
AuxBuyTooltipButton_OnClick(this)
</OnEnterPressed>
</Scripts>
</EditBox>
<Frame name="AuxBuyTooltipDropDown" inherits="UIDropDownMenuTemplate" hidden="true">
<Scripts>
<OnLoad>
UIDropDownMenu_Initialize(this, AuxBuyTooltipDropDown_Initialize)
</OnLoad>
</Scripts>
</Frame>
<Button name="AuxBuyTooltipArrow">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="AuxBuyTooltipInputBox"><Offset><AbsDimension x="-4" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
Aux.buy.toggle_tooltip_dropdown()
PlaySound("igMainMenuOptionCheckBoxOn")
</OnClick>
</Scripts>
<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="RIGHT"/></Anchors>
</NormalTexture>
<PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="RIGHT"/></Anchors>
</PushedTexture>
<DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="RIGHT"/></Anchors>
</DisabledTexture>
<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="RIGHT"/></Anchors>
</HighlightTexture>
</Button>
<Button name="AuxBuyTooltipButton" inherits="UIPanelButtonTemplate" text="+">
<Size><AbsDimension x="22" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="127" y="-201"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
AuxBuyTooltipButton_OnClick(this)
</OnClick>
</Scripts>
</Button>
<EditBox name="AuxBuyPageEditBox" numeric="true" autoFocus="false" inherits="InputBoxTemplate">
<Size><AbsDimension x="30" y="22"/></Size>
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="1" y="-235"/></Offset></Anchor>
</Anchors>
<Layers> <Layers>
<Layer level="OVERLAY"> <Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Page" justifyH="LEFT"> <FontString inherits="GameFontNormalSmall" text="Exact" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="9"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="9"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</CheckButton>
<Frame name="AuxBuyCategoryDropDown" inherits="UIDropDownMenuTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-8" y="-104" /></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="Category">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="21" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString> </FontString>
</Layer> </Layer>
</Layers> </Layers>
<Scripts> <Scripts>
<OnLoad> <OnLoad>
UIDropDownMenu_SetWidth(140)
UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize)
</OnLoad>
<OnShow>
UIDropDownMenu_Initialize(this, AuxBuyCategoryDropDown_Initialize)
</OnShow>
</Scripts>
</Frame>
<Frame name="AuxBuyQualityDropDown" inherits="UIDropDownMenuTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-8" y="-143" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
UIDropDownMenu_SetWidth(140)
UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize)
</OnLoad>
<OnShow>
UIDropDownMenu_Initialize(this, AuxBuyQualityDropDown_Initialize)
</OnShow>
</Scripts>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="Rarity">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="21" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<EditBox name="AuxBuyMinLevel" letters="2" numeric="true" autoFocus="false" inherits="AuxInputBoxTemplate">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="15" y="-182"/></Offset></Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString inherits="GameFontHighlightSmall" text="-">
<Anchors><Anchor point="LEFT" relativePoint="RIGHT"><Offset><AbsDimension x="-1" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
getglobal(this:GetName()..'Label'):SetText('Level Range')
this:SetWidth(30)
</OnLoad>
<OnEnterPressed>
this:ClearFocus()
</OnEnterPressed>
</Scripts>
</EditBox>
<EditBox name="AuxBuyMaxLevel" letters="2" numeric="true" autoFocus="false" inherits="AuxInputBoxTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="AuxBuyMinLevel" relativePoint="RIGHT"><Offset><AbsDimension x="8" y="0"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnLoad>
this:SetWidth(30)
</OnLoad>
<OnEnterPressed>
this:ClearFocus()
</OnEnterPressed>
</Scripts>
</EditBox>
<CheckButton name="AuxBuyUsableCheckButton" inherits="UICheckButtonTemplate">
<Size><AbsDimension x="22" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="87" y="-182" /></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="Usable" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="9"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</CheckButton>
<EditBox name="AuxBuyTooltipInputBox" autoFocus="false" inherits="AuxInputBoxTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="15" y="-216"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName()..'Label'):SetText('Tooltip')
this:SetWidth(110)
</OnLoad>
<OnEnterPressed>
AuxBuyTooltipButton_OnClick(this)
</OnEnterPressed>
</Scripts>
</EditBox>
<Frame name="AuxBuyTooltipDropDown" inherits="UIDropDownMenuTemplate" hidden="true">
<Scripts>
<OnLoad>
UIDropDownMenu_Initialize(this, AuxBuyTooltipDropDown_Initialize)
</OnLoad>
</Scripts>
</Frame>
<Button name="AuxBuyTooltipArrow">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="AuxBuyTooltipInputBox"><Offset><AbsDimension x="-4" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
Aux.buy.toggle_tooltip_dropdown()
PlaySound("igMainMenuOptionCheckBoxOn")
</OnClick>
</Scripts>
<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="RIGHT"/></Anchors>
</NormalTexture>
<PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="RIGHT"/></Anchors>
</PushedTexture>
<DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="RIGHT"/></Anchors>
</DisabledTexture>
<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD">
<Size><AbsDimension x="24" y="24"/></Size>
<Anchors><Anchor point="RIGHT"/></Anchors>
</HighlightTexture>
</Button>
<Button name="AuxBuyTooltipButton" inherits="UIPanelButtonTemplate" text="+">
<Size><AbsDimension x="22" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="143" y="-216"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
AuxBuyTooltipButton_OnClick(this)
</OnClick>
</Scripts>
</Button>
<EditBox name="AuxBuyPageEditBox" numeric="true" autoFocus="false" inherits="AuxInputBoxTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="16" y="-250"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName()..'Label'):SetText('Page')
this:SetWidth(30)
this:EnableMouse(false) this:EnableMouse(false)
this:SetAlpha(0.5) this:SetAlpha(0.5)
</OnLoad> </OnLoad>
@@ -339,10 +294,10 @@
</EditBox> </EditBox>
<CheckButton name="AuxBuyAllPagesCheckButton" inherits="UICheckButtonTemplate" checked="true"> <CheckButton name="AuxBuyAllPagesCheckButton" inherits="UICheckButtonTemplate" checked="true">
<Size><AbsDimension x="22" y="22"/></Size> <Size><AbsDimension x="22" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="34" y="-235" /></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="49" y="-250" /></Offset></Anchor></Anchors>
<Layers> <Layers>
<Layer level="OVERLAY"> <Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="All" justifyH="LEFT"> <FontString inherits="GameFontNormalSmall" text="All" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="9"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="9"/></Offset></Anchor></Anchors>
</FontString> </FontString>
</Layer> </Layer>
@@ -355,151 +310,191 @@
</OnClick> </OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<Frame name="AuxBuySheetFrame" inherits="AuxFrameBoxTemplate">
<Size>
<AbsDimension x="655" y="326"/>
</Size>
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxBuyFilters"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
this:SetBackdropColor(0.15, 0.15, 0.15)
getglobal(this:GetName().."Title"):SetText('Search Results')
</OnLoad>
</Scripts>
<Frames>
<Frame name="AuxBuyBuyList" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-40" y="0"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnLoad>
local sort_order = Aux.util.map(Aux.buy.modes[1].sort_order, function(column_order) return { column = Aux.buy.modes[1].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
this.sheet = Aux.sheet.create(this, Aux.buy.modes[1].columns, sort_order, Aux.buy.modes[1].row_setter, Aux.buy.modes[1].on_cell_click, Aux.buy.modes[1].on_cell_enter, Aux.buy.modes[1].on_cell_leave)
</OnLoad>
</Scripts>
</Frame>
<Frame name="AuxBuyBidList" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-40" y="0"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnLoad>
local sort_order = Aux.util.map(Aux.buy.modes[2].sort_order, function(column_order) return { column = Aux.buy.modes[2].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
this.sheet = Aux.sheet.create(this, Aux.buy.modes[2].columns, sort_order, Aux.buy.modes[2].row_setter, Aux.buy.modes[2].on_cell_click, Aux.buy.modes[2].on_cell_enter, Aux.buy.modes[2].on_cell_leave)
</OnLoad>
</Scripts>
</Frame>
<Frame name="AuxBuyFullList" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-40" y="0"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnLoad>
local sort_order = Aux.util.map(Aux.buy.modes[3].sort_order, function(column_order) return { column = Aux.buy.modes[3].columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
this.sheet = Aux.sheet.create(this, Aux.buy.modes[3].columns, sort_order, Aux.buy.modes[3].row_setter, Aux.buy.modes[3].on_cell_click, Aux.buy.modes[3].on_cell_enter, Aux.buy.modes[3].on_cell_leave)
</OnLoad>
</Scripts>
</Frame>
<Frame name="AuxBuyConfirmation" enableMouse="true" frameStrata="FULLSCREEN_DIALOG" inherits="OptionFrameBoxTemplate" hidden="true" enableMouseWheel="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnMouseWheel></OnMouseWheel>
</Scripts>
<Frames>
<Frame name="$parentItem">
<Size><AbsDimension x="193" y="37"/></Size>
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="0" y="-100"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BORDER">
<Texture name="$parentIconTexture">
<Size><AbsDimension x="32" y="32"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="2" y="0"/></Offset></Anchor></Anchors>
</Texture>
<Texture file="Interface\Buttons\UI-Quickslot2">
<Size><AbsDimension x="60" y="60"/></Size>
<Anchors><Anchor point="CENTER" relativeTo="$parentIconTexture"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</Texture>
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT">
<Anchors><Anchor point="BOTTOMRIGHT" relativeTo="$parentIconTexture"><Offset><AbsDimension x="-5" y="2"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="$parentName" inherits="GameFontNormal" justifyH="LEFT">
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentIconTexture"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor>
<Anchor point="RIGHT"><Offset><AbsDimension x="-10" y="0"/></Offset></Anchor>
<Anchor point="TOP"><Offset><AbsDimension x="0" y="-5"/></Offset></Anchor>
<Anchor point="BOTTOM"><Offset><AbsDimension x="0" y="5"/></Offset></Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="BACKGROUND">
<Texture name="$parentLeft" file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="37"/></Size>
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentIconTexture"><Offset><AbsDimension x="2" y="0"/></Offset></Anchor></Anchors>
<TexCoords left="0" right="0.078125" top="0" bottom="1.0"/>
</Texture>
<Texture name="$parentRight" file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="37"/></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<TexCoords left="0.75" right="0.828125" top="0" bottom="1.0"/>
</Texture>
<Texture file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="37"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<TexCoords left="0.078125" right="0.75" top="0" bottom="1.0"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnEnter>
Aux.info.set_game_tooltip(this, this:GetParent().tooltip, 'ANCHOR_LEFT', this:GetParent().EnhTooltip_info)
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
</Scripts>
<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
</Frame>
<Frame name="$parentBid" inherits="MoneyInputFrameTemplate">
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="30" y="148"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormal" text="Price:" justifyH="RIGHT">
<Anchors><Anchor point="RIGHT" relativePoint="LEFT"><Offset><AbsDimension x="-10" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame name="$parentBuyoutPrice" inherits="SmallMoneyFrameTemplate">
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="30" y="150"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
SmallMoneyFrame_OnLoad()
MoneyFrame_SetType("STATIC")
</OnLoad>
</Scripts>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormal" text="Price:" justifyH="RIGHT">
<Anchors><Anchor point="RIGHT" relativePoint="LEFT"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Button name="$parentActionButton" inherits="UIPanelButtonTemplate" text="Buy" disabled="true">
<Size><AbsDimension x="90" y="26"/> </Size>
<Anchors><Anchor point="BOTTOMLEFT"><Offset><AbsDimension x="229" y="110"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
Aux.buy.dialog_action()
</OnClick>
</Scripts>
</Button>
<Button name="$parentCancelButton" inherits="UIPanelButtonTemplate" text="Cancel">
<Size><AbsDimension x="90" y="26"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-229" y="110"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
Aux.buy.dialog_cancel()
</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
</Frames>
</Frame>
</Frames> </Frames>
</Frame> </Frame>
<Button name="AuxBuySearchButton" inherits="UIPanelButtonTemplate" text="Search">
<Button name="AuxBuySearchButton" inherits="UIPanelButtonTemplate" text="Search"> <Size><AbsDimension x="90" y="26"/></Size>
<Size><AbsDimension x="166" y="22"/></Size> <Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxCloseButtonBottom"><Offset><AbsDimension x="-25" y="0"/></Offset></Anchor></Anchors>
<Anchors> <Scripts>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="51" y="14"/></Offset></Anchor> <OnClick>
</Anchors> Aux.buy.SearchButton_onclick()
<Scripts> </OnClick>
<OnClick> </Scripts>
Aux.buy.SearchButton_onclick() </Button>
</OnClick>
</Scripts> <Button name="AuxBuyStopButton" inherits="UIPanelButtonTemplate" text="Stop" hidden="true">
</Button> <Size><AbsDimension x="90" y="26"/></Size>
<Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxCloseButtonBottom"><Offset><AbsDimension x="-25" y="0"/></Offset></Anchor></Anchors>
<Button name="AuxBuyStopButton" inherits="UIPanelButtonTemplate" text="Stop" hidden="true"> <Scripts>
<Size><AbsDimension x="166" y="22"/></Size> <OnClick>
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="51" y="14"/></Offset></Anchor> Aux.buy.StopButton_onclick()
</Anchors> </OnClick>
<Scripts> </Scripts>
<OnClick> </Button>
Aux.buy.StopButton_onclick()
</OnClick>
</Scripts>
</Button>
<Button name="AuxBuyCloseButton" inherits="UIPanelButtonTemplate" text="CLOSE">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="130" y="14"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
HideUIPanel(this:GetParent():GetParent())
</OnClick>
</Scripts>
</Button>
<Frame name="AuxBuyConfirmation" hidden="true">
<Size><AbsDimension x="634" y="306"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="188" y="-103"/></Offset></Anchor></Anchors>
<Frames>
<Button name="$parentItem">
<Size><AbsDimension x="54" y="54"/></Size>
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="-102" y="-80"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentName" inherits="GameFontHighlightLarge" justifyH="LEFT">
<Size><AbsDimension x="172" y="46"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="70" y="0"/></Offset></Anchor></Anchors>
</FontString>
<Texture name="$parentLeft" file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="54"/></Size>
<Anchors><Anchor point="LEFT" relativePoint="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<TexCoords left="0" right="0.078125" top="0" bottom="1.0"/>
</Texture>
<Texture name="$parentRight" file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="54"/></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="204" y="0"/></Offset></Anchor>
</Anchors>
<TexCoords left="0.75" right="0.828125" top="0" bottom="1.0"/>
</Texture>
<Texture file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="54"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<TexCoords left="0.078125" right="0.75" top="0" bottom="1.0"/>
</Texture>
</Layer>
<Layer level="OVERLAY">
<FontString name="$parentCount" inherits="NumberFontNormalLarge" justifyH="RIGHT" hidden="true">
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-9" y="3"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnEnter>
Aux.info.set_game_tooltip(this, this:GetParent().tooltip, 'ANCHOR_LEFT', this:GetParent().EnhTooltip_info)
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
</Scripts>
<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
</Button>
<Frame name="$parentBid" inherits="MoneyInputFrameTemplate">
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="30" y="115"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalLarge" text="Price:" justifyH="RIGHT">
<Anchors><Anchor point="RIGHT" relativePoint="LEFT"><Offset><AbsDimension x="-10" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame name="$parentBuyoutPrice" inherits="MoneyFrameTemplate">
<Anchors><Anchor point="BOTTOM"><Offset><AbsDimension x="30" y="108"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
MoneyFrame_OnLoad()
MoneyFrame_SetType("STATIC")
</OnLoad>
</Scripts>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalLarge" text="Price:" justifyH="RIGHT">
<Anchors><Anchor point="RIGHT" relativePoint="LEFT"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Button name="$parentActionButton" inherits="UIPanelButtonTemplate" text="Buy" disabled="true">
<Size><AbsDimension x="110" y="30"/> </Size>
<Anchors><Anchor point="BOTTOMLEFT"><Offset><AbsDimension x="190" y="60"/></Offset></Anchor></Anchors>
<NormalText inherits="GameFontNormalLarge"/>
<DisabledText inherits="GameFontDisableLarge"/>
<HighlightText inherits="GameFontHighlightLarge"/>
<Scripts>
<OnClick>
Aux.buy.dialog_action()
</OnClick>
</Scripts>
</Button>
<Button name="$parentCancelButton" inherits="UIPanelButtonTemplate" text="Cancel">
<Size><AbsDimension x="110" y="30"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-190" y="60"/></Offset></Anchor></Anchors>
<NormalText inherits="GameFontNormalLarge"/>
<DisabledText inherits="GameFontDisableLarge"/>
<HighlightText inherits="GameFontHighlightLarge"/>
<Scripts>
<OnClick>
Aux.buy.dialog_cancel()
</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
</Frames> </Frames>
</Frame> </Frame>
</Ui> </Ui>
+60 -306
View File
@@ -1,4 +1,4 @@
AuxVersion = "1.6.0" AuxVersion = "2.0.0"
AuxAuthors = "shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)" AuxAuthors = "shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)"
local lastRightClickAction = GetTime() local lastRightClickAction = GetTime()
@@ -8,29 +8,21 @@ Aux = {
orig = {}, orig = {},
elements = {}, elements = {},
tabs = { tabs = {
sell = { browse = {
index = 4
},
buy = {
index = 1 index = 1
} },
post = {
index = 2
},
}, },
last_picked_up = {}, last_picked_up = {},
} }
-----------------------------------------
local relevel
-----------------------------------------
function Aux_OnLoad() function Aux_OnLoad()
Aux.log("Aux v"..AuxVersion.." loaded") Aux.log('Aux v'..AuxVersion..' loaded.')
Aux.loaded = true Aux.loaded = true
end end
-----------------------------------------
function Aux_OnEvent() function Aux_OnEvent()
if event == "VARIABLES_LOADED" then if event == "VARIABLES_LOADED" then
Aux_OnLoad() Aux_OnLoad()
@@ -43,62 +35,17 @@ function Aux_OnEvent()
end end
end end
-----------------------------------------
function Aux_OnAddonLoaded() function Aux_OnAddonLoaded()
if string.lower(arg1) == "blizzard_auctionui" then if string.lower(arg1) == "blizzard_auctionui" then
Aux_AddTabs() AuxButton:SetParent("AuctionFrame")
Aux_AddPanels() AuxButton:SetPoint("TOPRIGHT", "AuctionFrame", "TOPRIGHT", -26, -12)
Aux_SetupHookFunctions()
Aux.tabs.sell.hiddenElements = {
AuctionsPriceText,
StartPrice,
AuctionsBuyoutText,
BuyoutPrice,
AuctionsDurationText,
AuctionsShortAuctionButton,
AuctionsMediumAuctionButton,
AuctionsLongAuctionButton,
AuctionsCreateAuctionButton,
AuctionsItemButton,
AuctionsTitle,
AuctionsScrollFrame,
AuctionsButton1,
AuctionsButton2,
AuctionsButton3,
AuctionsButton4,
AuctionsButton5,
AuctionsButton6,
AuctionsButton7,
AuctionsButton8,
AuctionsButton9,
AuctionsQualitySort,
AuctionsDurationSort,
AuctionsHighBidderSort,
AuctionsBidSort,
AuctionsCancelAuctionButton
}
Aux.tabs.buy.hiddenElements = {
AuctionFrameBrowse,
}
Aux.tabs.sell.recommendationElements = { Aux_SetupHookFunctions()
AuxRecommendText,
AuxRecommendPerItemText,
AuxRecommendPerItemPrice,
AuxRecommendPerStackText,
AuxRecommendPerStackPrice,
AuxRecommendBasisText,
AuxRecommendItemTex,
}
end end
end end
function Aux.log_frame_load() function Aux.log_frame_load()
this:SetFading(false)
this:EnableMouseWheel() this:EnableMouseWheel()
-- this.flashTimer = 0 TODO remove -- this.flashTimer = 0 TODO remove
end end
@@ -108,7 +55,7 @@ function Aux.log_frame_update(elapsedSec)
return return
end end
local flash = getglobal(this:GetName().."BottomButtonFlash") local flash = getglobal(this:GetName()..'BottomButtonFlash')
if not flash then if not flash then
return return
@@ -140,21 +87,15 @@ function Aux.log_frame_update(elapsedSec)
end end
function Aux.log(msg) function Aux.log(msg)
local info = ChatTypeInfo["SYSTEM"] local info = ChatTypeInfo['SYSTEM']
AuxLogFrame:AddMessage(msg, 1, 1, 0) AuxLogFrameMessageFrame:AddMessage(msg, 1, 1, 0)
if not AuxLogFrame:IsVisible() and DEFAULT_CHAT_FRAME then if not AuxLogFrameMessageFrame:IsVisible() and DEFAULT_CHAT_FRAME then
DEFAULT_CHAT_FRAME:AddMessage(msg, 1, 1, 0) DEFAULT_CHAT_FRAME:AddMessage(msg, 1, 1, 0)
end end
end end
function Aux_SetupHookFunctions() function Aux_SetupHookFunctions()
Aux.orig.AuctionFrameAuctions_OnShow = AuctionFrameAuctions_OnShow
AuctionFrameAuctions_OnShow = Aux_Sell_AuctionFrameAuctions_OnShow
Aux.orig.BrowseButton_OnClick = BrowseButton_OnClick
BrowseButton_OnClick = Aux_BrowseButton_OnClick
AuctionsButton1:RegisterForClicks("LeftButtonUp", "RightButtonDown") AuctionsButton1:RegisterForClicks("LeftButtonUp", "RightButtonDown")
AuctionsButton1:SetScript("OnMouseDown", Aux_AuctionsButton_OnMouseDown) AuctionsButton1:SetScript("OnMouseDown", Aux_AuctionsButton_OnMouseDown)
AuctionsButton2:RegisterForClicks("LeftButtonUp", "RightButtonDown") AuctionsButton2:RegisterForClicks("LeftButtonUp", "RightButtonDown")
@@ -173,255 +114,84 @@ function Aux_SetupHookFunctions()
AuctionsButton8:SetScript("OnMouseDown", Aux_AuctionsButton_OnMouseDown) AuctionsButton8:SetScript("OnMouseDown", Aux_AuctionsButton_OnMouseDown)
AuctionsButton9:RegisterForClicks("LeftButtonUp", "RightButtonDown") AuctionsButton9:RegisterForClicks("LeftButtonUp", "RightButtonDown")
AuctionsButton9:SetScript("OnMouseDown", Aux_AuctionsButton_OnMouseDown) AuctionsButton9:SetScript("OnMouseDown", Aux_AuctionsButton_OnMouseDown)
BrowseButton1:RegisterForClicks("LeftButtonUp", "RightButtonDown")
BrowseButton1:SetScript("OnMouseDown", Aux_BrowseButton_OnMouseDown)
BrowseButton2:RegisterForClicks("LeftButtonUp", "RightButtonDown")
BrowseButton2:SetScript("OnMouseDown", Aux_BrowseButton_OnMouseDown)
BrowseButton3:RegisterForClicks("LeftButtonUp", "RightButtonDown")
BrowseButton3:SetScript("OnMouseDown", Aux_BrowseButton_OnMouseDown)
BrowseButton4:RegisterForClicks("LeftButtonUp", "RightButtonDown")
BrowseButton4:SetScript("OnMouseDown", Aux_BrowseButton_OnMouseDown)
BrowseButton5:RegisterForClicks("LeftButtonUp", "RightButtonDown")
BrowseButton5:SetScript("OnMouseDown", Aux_BrowseButton_OnMouseDown)
BrowseButton6:RegisterForClicks("LeftButtonUp", "RightButtonDown")
BrowseButton6:SetScript("OnMouseDown", Aux_BrowseButton_OnMouseDown)
BrowseButton7:RegisterForClicks("LeftButtonUp", "RightButtonDown")
BrowseButton7:SetScript("OnMouseDown", Aux_BrowseButton_OnMouseDown)
BrowseButton8:RegisterForClicks("LeftButtonUp", "RightButtonDown")
BrowseButton8:SetScript("OnMouseDown", Aux_BrowseButton_OnMouseDown)
Aux.orig.PickupContainerItem = PickupContainerItem Aux.orig.PickupContainerItem = PickupContainerItem
PickupContainerItem = Aux.PickupContainerItem PickupContainerItem = Aux.PickupContainerItem
Aux.orig.AuctionSellItemButton_OnEvent = AuctionSellItemButton_OnEvent
AuctionSellItemButton_OnEvent = Aux.sell.AuctionSellItemButton_OnEvent
Aux.orig.AuctionFrameTab_OnClick = AuctionFrameTab_OnClick
AuctionFrameTab_OnClick = Aux_AuctionFrameTab_OnClick
Aux.orig.ContainerFrameItemButton_OnClick = ContainerFrameItemButton_OnClick Aux.orig.ContainerFrameItemButton_OnClick = ContainerFrameItemButton_OnClick
ContainerFrameItemButton_OnClick = Aux_ContainerFrameItemButton_OnClick ContainerFrameItemButton_OnClick = Aux_ContainerFrameItemButton_OnClick
Aux.orig.AuctionFrameBid_Update = AuctionFrameBid_Update Aux.orig.AuctionFrameAuctions_OnEvent = AuctionFrameAuctions_OnEvent
AuctionFrameBid_Update = Aux_AuctionFrameBid_Update AuctionFrameAuctions_OnEvent = Aux.AuctionFrameAuctions_OnEvent
Aux.orig.AuctionFrameAuctions_Update = AuctionFrameAuctions_Update
AuctionFrameAuctions_Update = Aux_AuctionFrameAuctions_Update
end end
----------------------------------------- function Aux.AuctionFrameAuctions_OnEvent()
if AuctionFrameAuctions:IsVisible() then
Aux.orig.AuctionFrameAuctions_OnEvent()
end
end
function Aux_OnAuctionHouseShow() function Aux_OnAuctionHouseShow()
AuxOptionsButtonPanel:Show() AuxButton:Show()
AuxFrame:Show()
Aux.on_tab_click(1)
if AUX_OPEN_SELL then if AUX_OPEN_SELL then
AuctionFrameTab_OnClick(Aux.tabs.sell.index) Aux.on_tab_click(2)
elseif AUX_OPEN_BUY then elseif AUX_OPEN_BUY then
-- AuctionFrameTab_OnClick(Aux.tabs.buy.index)
end end
end end
-----------------------------------------
function Aux_OnAuctionHouseClosed() function Aux_OnAuctionHouseClosed()
Aux.post.stop() Aux.post.stop()
Aux.stack.stop() Aux.stack.stop()
Aux.buy.exit()
Aux.scan.abort()
AuxOptionsButtonPanel:Hide()
AuxOptionsFrame:Hide()
AuxAboutFrame:Hide()
AuxSellPanel:Hide()
AuxBuyPanel:Hide()
end
function Aux_AuctionFrameTab_OnClick(index)
if not index then
index = this:GetID()
end
Aux.post.stop()
Aux.stack.stop()
Aux.buy.exit()
Aux.scan.abort() Aux.scan.abort()
AuxSellPanel:Hide() Aux.buy.on_close()
AuxBuyPanel:Hide() Aux.sell.on_close()
if index == 2 then
Aux_ShowElems(Aux.tabs.buy.hiddenElements)
end
if index == 3 then AuxFrame:Hide()
Aux_ShowElems(Aux.tabs.sell.hiddenElements)
end
if index == Aux.tabs.sell.index then
AuctionFrameTab_OnClick(3)
Aux.sell.on_open()
PanelTemplates_SetTab(AuctionFrame, Aux.tabs.sell.index)
Aux_HideElems(Aux.tabs.sell.hiddenElements)
AuxSellPanel:Show()
AuctionFrame:EnableMouse(false)
elseif index == Aux.tabs.buy.index then
Aux.orig.AuctionFrameTab_OnClick(1)
PanelTemplates_SetTab(AuctionFrame, Aux.tabs.buy.index)
Aux_HideElems(Aux.tabs.buy.hiddenElements)
AuxBuyPanel:Show()
AuctionFrame:EnableMouse(false)
Aux.buy.on_open()
else
Aux.orig.AuctionFrameTab_OnClick(index)
lastItemPosted = nil
end
end end
function Aux_AddPanels() function Aux.on_tab_click(index)
Aux.post.stop()
local sellFrame = CreateFrame("Frame", "AuxSellPanel", AuctionFrame, "AuxSellTemplate") Aux.stack.stop()
sellFrame:SetParent("AuctionFrame") Aux.scan.abort()
sellFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
relevel(sellFrame) Aux.buy.on_close()
sellFrame:Hide() Aux.sell.on_close()
local buyFrame = CreateFrame("Frame", "AuxBuyPanel", AuctionFrame, "AuxBuyTemplate") for i=1,5 do
buyFrame:SetParent("AuctionFrame") getglobal('AuxTab'..i):SetAlpha(i == index and 1 or 0.5)
buyFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT") end
AuxLogFrame:SetParent(buyFrame)
AuxLogFrame:SetPoint('TOP', buyFrame, 100, -43) AuxSellFrame:Hide()
relevel(buyFrame) AuxBuyFrame:Hide()
buyFrame:Hide()
if index == 1 then
local optionsFrame = CreateFrame("Frame", "AuxOptionsButtonPanel", AuctionFrame, "AuxOptionsButtonTemplate") AuxBuyFrame:Show()
optionsFrame:SetParent("AuctionFrame") Aux.buy.on_open()
optionsFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT") elseif index == 2 then
relevel(optionsFrame) AuxSellFrame:Show()
optionsFrame:Hide() Aux.sell.on_open()
end
end end
-----------------------------------------
function Aux_AddTabs()
AuctionFrameTab1:SetText('Buy')
Aux.tabs.sell.index = AuctionFrame.numTabs + 1
local sellTabName = "AuctionFrameTab"..Aux.tabs.sell.index
local sellTab = CreateFrame("Button", sellTabName, AuctionFrame, "AuctionTabTemplate")
setglobal(sellTabName, sellTab)
sellTab:SetID(Aux.tabs.sell.index)
sellTab:SetText("Sell")
sellTab:SetPoint("LEFT", getglobal("AuctionFrameTab"..AuctionFrame.numTabs), "RIGHT", -8, 0)
PanelTemplates_SetNumTabs(AuctionFrame, Aux.tabs.sell.index)
PanelTemplates_EnableTab(AuctionFrame, Aux.tabs.sell.index)
end
-----------------------------------------
function Aux_HideElems(tt)
if not tt then
return;
end
for i,x in ipairs(tt) do
x:Hide()
end
end
-----------------------------------------
function Aux_ShowElems(tt)
for i,x in ipairs(tt) do
x:Show()
end
end
-----------------------------------------
function Aux_PluralizeIf(word, count)
if count and count == 1 then
return word
else
return word.."s"
end
end
-----------------------------------------
function Aux_Round(v) function Aux_Round(v)
return math.floor(v + 0.5) return math.floor(v + 0.5)
end end
-----------------------------------------
function relevel(frame)
local myLevel = frame:GetFrameLevel() + 1
local children = { frame:GetChildren() }
for _,child in pairs(children) do
child:SetFrameLevel(myLevel)
relevel(child)
end
end
-----------------------------------------
function Aux_BrowseButton_OnClick(button)
if arg1 == "LeftButton" then -- because we additionally registered right clicks we only let left ones pass here
Aux.orig.BrowseButton_OnClick(button)
end
end
-----------------------------------------
function Aux_AuctionsButton_OnClick(button) function Aux_AuctionsButton_OnClick(button)
if arg1 == "LeftButton" then -- because we additionally registered right clicks we only let left ones pass here if arg1 == "LeftButton" then -- because we additionally registered right clicks we only let left ones pass here
Aux.orig.BrowseButton_OnClick(button) Aux.orig.BrowseButton_OnClick(button)
end end
end end
-----------------------------------------
function Aux_BrowseButton_OnMouseDown()
if arg1 == "RightButton" and AUX_INSTANT_BUYOUT and GetTime() - lastRightClickAction > 0.5 then
local index = this:GetID() + FauxScrollFrame_GetOffset(BrowseScrollFrame)
SetSelectedAuctionItem("list", index)
local auction_item = Aux.info.auction_item(index)
if auction_item.buyout_price > 0 then
PlaceAuctionBid("list", index, auction_item.buyout_price)
end
AuctionFrameBrowse_Update()
lastRightClickAction = GetTime()
end
end
-----------------------------------------
function Aux_AuctionsButton_OnMouseDown() function Aux_AuctionsButton_OnMouseDown()
if arg1 == "RightButton" and GetTime() - lastRightClickAction > 0.5 then if arg1 == "RightButton" and GetTime() - lastRightClickAction > 0.5 then
local index = this:GetID() + FauxScrollFrame_GetOffset(AuctionsScrollFrame) local index = this:GetID() + FauxScrollFrame_GetOffset(AuctionsScrollFrame)
@@ -435,15 +205,11 @@ function Aux_AuctionsButton_OnMouseDown()
end end
end end
-----------------------------------------
function Aux.PickupContainerItem(bag, item) function Aux.PickupContainerItem(bag, item)
Aux.last_picked_up = { bag=bag, slot=item } Aux.last_picked_up = { bag=bag, slot=item }
return Aux.orig.PickupContainerItem(bag, item) return Aux.orig.PickupContainerItem(bag, item)
end end
-----------------------------------------
function Aux_ContainerFrameItemButton_OnClick(button) function Aux_ContainerFrameItemButton_OnClick(button)
local bag, slot = this:GetParent():GetID(), this:GetID() local bag, slot = this:GetParent():GetID(), this:GetID()
local container_item = Aux.info.container_item(bag, slot) local container_item = Aux.info.container_item(bag, slot)
@@ -452,21 +218,13 @@ function Aux_ContainerFrameItemButton_OnClick(button)
if IsShiftKeyDown() if IsShiftKeyDown()
and not ChatFrameEditBox:IsVisible() and not ChatFrameEditBox:IsVisible()
and (PanelTemplates_GetSelectedTab(AuctionFrame) == 1 or PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.buy.index) and AuxBuyFrame:IsVisible()
then then
if PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.buy.index then AuxBuyNameInputBox.completor.set_quietly(container_item.name)
AuxBuyNameInputBox.completor.set_quietly(container_item.name)
end
return return
elseif AUX_SELL_SHORTCUT and IsAltKeyDown()then elseif AUX_BUY_SHORTCUT and IsAltKeyDown() then
Aux.sell.set_auction(bag, slot) if not AuxBuyFrame:IsVisible() then
if PanelTemplates_GetSelectedTab(AuctionFrame) ~= Aux.tabs.sell.index then Aux.on_tab_click(1)
AuctionFrameTab_OnClick(Aux.tabs.sell.index)
end
return
elseif AUX_BUY_SHORTCUT and IsControlKeyDown() then
if PanelTemplates_GetSelectedTab(AuctionFrame) ~= Aux.tabs.buy.index then
AuctionFrameTab_OnClick(Aux.tabs.buy.index)
end end
AuxBuyNameInputBox.completor.set_quietly(container_item.name) AuxBuyNameInputBox.completor.set_quietly(container_item.name)
Aux.buy.SearchButton_onclick() Aux.buy.SearchButton_onclick()
@@ -476,8 +234,6 @@ function Aux_ContainerFrameItemButton_OnClick(button)
return Aux.orig.ContainerFrameItemButton_OnClick(button) return Aux.orig.ContainerFrameItemButton_OnClick(button)
end end
-----------------------------------------
function Aux_QualityColor(code) function Aux_QualityColor(code)
if code == 0 then if code == 0 then
return "ff9d9d9d" -- poor, gray return "ff9d9d9d" -- poor, gray
@@ -494,8 +250,6 @@ function Aux_QualityColor(code)
end end
end end
-----------------------------------------
function Aux.auction_signature(hyperlink, stack_size, amount) function Aux.auction_signature(hyperlink, stack_size, amount)
return hyperlink .. (stack_size or '0') .. '_' .. (amount or '0') return hyperlink .. (stack_size or '0') .. '_' .. (amount or '0')
end end
+334 -45
View File
@@ -16,64 +16,161 @@
</Scripts> </Scripts>
</Frame> </Frame>
<ScrollingMessageFrame name="AuxLogFrame" hidden="false" maxLines="500"> <Button name="AuxTabTemplate" virtual="true">
<Size><AbsDimension x="400" y="45"/></Size> <Size>
<AbsDimension x="64" y="32"/>
</Size>
<Layers> <Layers>
<Layer level="BACKGROUND"> <Layer level="BACKGROUND">
<Texture name="$parentLeft" file="Interface\AuctionFrame\UI-AuctionItemNameFrame" hidden="true"> <Texture name="$parentLeft" file="Interface\ChatFrame\ChatFrameTab">
<Size><AbsDimension x="10" y="60"/></Size> <Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="-3" y="-4"/></Offset></Anchor></Anchors> <AbsDimension x="16" y="32"/>
<TexCoords left="0" right="0.078125" top="0" bottom="1.0"/> </Size>
</Texture> <Anchors>
<Texture name="$parentRight" file="Interface\AuctionFrame\UI-AuctionItemNameFrame" hidden="true"> <Anchor point="LEFT"/>
<Size><AbsDimension x="10" y="60"/></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="-4"/></Offset></Anchor>
</Anchors> </Anchors>
<TexCoords left="0.75" right="0.828125" top="0" bottom="1.0"/> <TexCoords left="0.0" right="0.25" top="0.0" bottom="1.0"/>
</Texture> </Texture>
<Texture name="$parentMiddle" file="Interface\AuctionFrame\UI-AuctionItemNameFrame" hidden="true"> <Texture name="$parentRight" file="Interface\ChatFrame\ChatFrameTab">
<Size><AbsDimension x="10" y="60"/></Size> <Size>
<AbsDimension x="16" y="32"/>
</Size>
<Anchors>
<Anchor point="RIGHT"/>
</Anchors>
<TexCoords left="0.75" right="1.0" top="0.0" bottom="1.0"/>
</Texture>
<Texture name="$parentMiddle" file="Interface\ChatFrame\ChatFrameTab">
<Size>
<AbsDimension x="44" y="32"/>
</Size>
<Anchors> <Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor> <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor> <Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors> </Anchors>
<TexCoords left="0.078125" right="0.75" top="0" bottom="1.0"/> <TexCoords left="0.25" right="0.75" top="0.0" bottom="1.0"/>
</Texture> </Texture>
</Layer> </Layer>
</Layers> </Layers>
<Scripts> <Scripts>
<OnLoad> <OnShow>
Aux.log_frame_load() this:SetWidth(getglobal(this:GetName()..'Text'):GetStringWidth()+40)
</OnLoad> </OnShow>
<OnUpdate> <OnClick>
Aux.log_frame_update(arg1) Aux.on_tab_click(this:GetID())
</OnUpdate> </OnClick>
<OnEnter>
getglobal(this:GetName()..'Left'):Show()
getglobal(this:GetName()..'Right'):Show()
getglobal(this:GetName()..'Middle'):Show()
</OnEnter>
<OnLeave>
getglobal(this:GetName()..'Left'):Hide()
getglobal(this:GetName()..'Right'):Hide()
getglobal(this:GetName()..'Middle'):Hide()
</OnLeave>
<OnHyperlinkClick>
<!--ChatFrame_OnHyperlinkShow(arg1) TODO not working because of center -->
</OnHyperlinkClick>
<OnMouseWheel>
if arg1 == 1 then
this:ScrollUp()
elseif arg1 == -1 then
this:ScrollDown()
end
</OnMouseWheel>
</Scripts> </Scripts>
<FontString inherits="ChatFontNormal" justifyH="CENTER"/> <NormalText name="$parentText" inherits="GameFontNormalSmall">
</ScrollingMessageFrame> <Size>
<Slider name="AuxSliderTemplate" orientation="HORIZONTAL" virtual="true" enableMouse="true"> <AbsDimension x="50" y="8"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="-5"/>
</Offset>
</Anchor>
</Anchors>
</NormalText>
<HighlightTexture name="$parentHighlight" file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD" setAllPoints="true">
<Size>
<AbsDimension x="5" y="32"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft">
<Offset>
<AbsDimension x="0" y="-7"/>
</Offset>
</Anchor>
<Anchor point="RIGHT" relativeTo="$parentRight">
<Offset>
<AbsDimension x="0" y="-7"/>
</Offset>
</Anchor>
</Anchors>
</HighlightTexture>
</Button>
<CheckButton name="AuxRadioButtonTemplate" virtual="true">
<Size> <Size>
<AbsDimension x="128" y="17"/> <AbsDimension x="16" y="16"/>
</Size>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentText" inherits="GameFontHighlightSmall">
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
SendMailRadioButton_OnClick(this:GetID());
</OnClick>
</Scripts>
<NormalTexture file="Interface\Buttons\UI-RadioButton">
<TexCoords left="0" right="0.25" top="0" bottom="1"/>
</NormalTexture>
<HighlightTexture file="Interface\Buttons\UI-RadioButton" alphaMode="ADD">
<TexCoords left="0.5" right="0.75" top="0" bottom="1"/>
</HighlightTexture>
<CheckedTexture file="Interface\Buttons\UI-RadioButton">
<TexCoords left="0.25" right="0.5" top="0" bottom="1"/>
</CheckedTexture>
</CheckButton>
<Frame name="AuxFrameBoxTemplate" virtual="true">
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentTitle" inherits="GameFontHighlight">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="9" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
<TileSize>
<AbsValue val="16"/>
</TileSize>
<BackgroundInsets>
<AbsInset left="5" right="5" top="5" bottom="5"/>
</BackgroundInsets>
</Backdrop>
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
this:SetBackdropColor(0.15, 0.15, 0.15)
</OnLoad>
</Scripts>
</Frame>
<EditBox name="AuxInputBoxTemplate" autoFocus="false" inherits="InputBoxTemplate" virtual="true">
<Size><AbsDimension x="119" y="22"/></Size>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentLabel" inherits="GameFontNormalSmall" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="9"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</EditBox>
<Slider name="AuxSliderTemplate" orientation="HORIZONTAL" enableMouse="true" virtual="true">
<Size>
<AbsDimension x="150" y="17"/>
</Size> </Size>
<HitRectInsets> <HitRectInsets>
<AbsInset left="0" right="0" top="-10" bottom="-10"/> <AbsInset left="0" right="0" top="-10" bottom="-10"/>
@@ -91,7 +188,7 @@
</Backdrop> </Backdrop>
<Layers> <Layers>
<Layer level="ARTWORK"> <Layer level="ARTWORK">
<FontString name="$parentText" inherits="GameFontHighlightSmall"> <FontString name="$parentText" inherits="GameFontNormalSmall">
<Anchors> <Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"/> <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"/>
</Anchors> </Anchors>
@@ -104,4 +201,196 @@
</Size> </Size>
</ThumbTexture> </ThumbTexture>
</Slider> </Slider>
<Button name="AuxButton" inherits="UIPanelButtonTemplate" text="Aux" hidden="true">
<Size><AbsDimension x="50" y="22"/></Size>
<Scripts>
<OnClick>
if AuxFrame:IsVisible() then
AuxFrame:Hide()
else
AuxFrame:Show()
end
</OnClick>
</Scripts>
</Button>
<Frame name="AuxFrame" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent">
<Size>
<AbsDimension x="850" y="445"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
this:RegisterForDrag('LeftButton')
</OnLoad>
<OnDragStart>
this:StartMoving()
</OnDragStart>
<OnDragStop>
this:StopMovingOrSizing()
</OnDragStop>
</Scripts>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<BackgroundInsets>
<AbsInset left="4" right="4" top="4" bottom="4"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="32"/>
</TileSize>
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
</Backdrop>
<Frames>
<Button name="AuxCloseButtonTop" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="AuxCloseButtonBottom" inherits="UIPanelButtonTemplate" text="Close">
<Size><AbsDimension x="90" y="26"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-10" y="10"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
HideUIPanel(this:GetParent())
</OnClick>
</Scripts>
</Button>
<Button name="AuxTab1" inherits="AuxTabTemplate" id="1">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="7" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText('Search')
</OnLoad>
</Scripts>
</Button>
<Button name="AuxTab2" inherits="AuxTabTemplate" id="2">
<Anchors>
<Anchor point="LEFT" relativeTo="AuxTab1" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText('Post')
</OnLoad>
</Scripts>
</Button>
<Button name="AuxTab3" inherits="AuxTabTemplate" id="3">
<Anchors>
<Anchor point="LEFT" relativeTo="AuxTab2" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText('Auctions')
</OnLoad>
</Scripts>
</Button>
<Button name="AuxTab4" inherits="AuxTabTemplate" id="4">
<Anchors>
<Anchor point="LEFT" relativeTo="AuxTab3" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText('Bids')
</OnLoad>
</Scripts>
</Button>
<Button name="AuxTab5" inherits="AuxTabTemplate" id="5">
<Anchors>
<Anchor point="LEFT" relativeTo="AuxTab4" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText('Scan')
</OnLoad>
</Scripts>
</Button>
<Frame name="AuxLogFrame" inherits="OptionFrameBoxTemplate">
<Size><AbsDimension x="400" y="71"/></Size>
<Anchors>
<Anchor point="LEFT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
<Anchor point="BOTTOM">
<Offset>
<AbsDimension x="0" y="10"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
this:SetWidth(floor(this:GetParent():GetWidth()/2))
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
this:SetBackdropColor(0.15, 0.15, 0.15)
</OnLoad>
</Scripts>
<Frames>
<ScrollingMessageFrame name="$parentMessageFrame" maxLines="500">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="8" y="-5"/>
</Offset>
</Anchor>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-8" y="9"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
Aux.log_frame_load()
</OnLoad>
<OnUpdate>
Aux.log_frame_update(arg1)
</OnUpdate>
<OnHyperlinkClick>
ChatFrame_OnHyperlinkShow(arg1)
</OnHyperlinkClick>
<OnMouseWheel>
if arg1 == 1 then
this:ScrollUp()
elseif arg1 == -1 then
this:ScrollDown()
end
</OnMouseWheel>
</Scripts>
<FontString inherits="ChatFontNormal" justifyH="LEFT"/>
</ScrollingMessageFrame>
</Frames>
</Frame>
</Frames>
</Frame>
</Ui> </Ui>
+22 -8
View File
@@ -2,7 +2,7 @@ local TOOLTIP_LENGTH = 30
Aux.info = {} Aux.info = {}
local hyperlink_item, item_id, item_charges local hyperlink_item, item_id, item_charges, item_signature, parse_item_signature, parse_hyperlink
function Aux.info.container_item(bag, slot) function Aux.info.container_item(bag, slot)
local hyperlink = GetContainerItemLink(bag, slot) local hyperlink = GetContainerItemLink(bag, slot)
@@ -12,15 +12,16 @@ function Aux.info.container_item(bag, slot)
end end
local container_item = hyperlink_item(hyperlink) local container_item = hyperlink_item(hyperlink)
container_item.item_signature = item_signature(hyperlink)
local texture, count, locked, quality, readable, lootable, hyperlink = GetContainerItemInfo(bag, slot)
local texture, count, locked, quality, readable, lootable = GetContainerItemInfo(bag, slot)
container_item.texture = texture container_item.texture = texture
container_item.count = count container_item.count = count
container_item.locked = locked container_item.locked = locked
container_item.readable = readable container_item.readable = readable
container_item.lootable = lootable container_item.lootable = lootable
container_item.hyperlink = hyperlink container_item.hyperlink = hyperlink
container_item.tooltip = Aux.info.tooltip(function(tt) tt:SetBagItem(bag, slot) end) container_item.tooltip = Aux.info.tooltip(function(tt) tt:SetBagItem(bag, slot) end)
container_item.charges = item_charges(container_item.tooltip) container_item.charges = item_charges(container_item.tooltip)
@@ -32,8 +33,7 @@ function Aux.info.auction_sell_item()
if name then if name then
local deposit_factor = CalculateAuctionDeposit(120) / vendor_price local unit_vendor_price = vendor_price / stack_size
local vendor_price_per_unit = vendor_price / stack_size
auction_sell_item = { auction_sell_item = {
name = name, name = name,
@@ -41,8 +41,7 @@ function Aux.info.auction_sell_item()
stack_size = stack_size, stack_size = stack_size,
quality = quality, quality = quality,
usable = usable, usable = usable,
vendor_price_per_unit = vendor_price_per_unit, unit_vendor_price = unit_vendor_price,
vendor_price = vendor_price,
deposit_factor = deposit_factor, deposit_factor = deposit_factor,
} }
@@ -154,11 +153,26 @@ function item_charges(tooltip)
end end
end end
function item_signature(hyperlink)
local item_id, suffix_id = parse_hyperlink(hyperlink)
return item_id..':'..suffix_id
end
function parse_item_signature(item_signature)
local _, _, item_id, suffix_id = strfind(item_signature, '^(%d+):(%d+)$')
return item_id, suffix_id
end
function item_id(hyperlink) function item_id(hyperlink)
local _, _, id_string = strfind(hyperlink, "^.-:(%d*).*") local _, _, id_string = strfind(hyperlink, "^.-:(%d*).*")
return tonumber(id_string) return tonumber(id_string)
end end
function parse_hyperlink(hyperlink)
local _, _, item_id, enchant_id, suffix_id, unique_id, name = strfind(hyperlink, '|Hitem:(%d+):(%d+):(%d+):(%d+)|h[[]([^]]+)[]]|h')
return tonumber(item_id) or 0, tonumber(suffix_id) or 0, tonumber(enchant_id) or 0, tonumber(unique_id) or 0, name
end
function hyperlink_item(hyperlink) function hyperlink_item(hyperlink)
local name, itemstring, quality, level, type, subtype, max_stack = GetItemInfo(item_id(hyperlink)) local name, itemstring, quality, level, type, subtype, max_stack = GetItemInfo(item_id(hyperlink))
return { return {
+5 -1
View File
@@ -44,6 +44,9 @@ function Aux.sheet.render(sheet)
for i, row in ipairs(rows) do for i, row in ipairs(rows) do
local direction, rowR, rowG, rowB, rowA1, rowA2 = "Horizontal", 1, 1, 1, 0, 0 --row level coloring used for gradients local direction, rowR, rowG, rowB, rowA1, rowA2 = "Horizontal", 1, 1, 1, 0, 0 --row level coloring used for gradients
local datum = data[i + offset] local datum = data[i + offset]
if sheet.row_setter then
sheet.row_setter(row, datum)
end
for j, column in sheet.columns do for j, column in sheet.columns do
local cell = row[j] local cell = row[j]
if datum then if datum then
@@ -57,7 +60,7 @@ function Aux.sheet.render(sheet)
end end
end end
function Aux.sheet.create(frame, columns, sort_order, on_cell_click, on_cell_enter, on_cell_leave) function Aux.sheet.create(frame, columns, sort_order, row_setter, on_cell_click, on_cell_enter, on_cell_leave)
local sheet local sheet
local name = (frame:GetName() or '')..'ScrollSheet' local name = (frame:GetName() or '')..'ScrollSheet'
@@ -192,6 +195,7 @@ function Aux.sheet.create(frame, columns, sort_order, on_cell_click, on_cell_ent
columns = columns, columns = columns,
data = {}, data = {},
sort_order = sort_order, sort_order = sort_order,
row_setter = row_setter,
on_cell_click = on_cell_click, on_cell_click = on_cell_click,
on_cell_enter = on_cell_enter, on_cell_enter = on_cell_enter,
on_cell_leave = on_cell_leave, on_cell_leave = on_cell_leave,
+5 -1
View File
@@ -19,7 +19,11 @@
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="758" y="-12"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="758" y="-12"/></Offset></Anchor></Anchors>
<Scripts> <Scripts>
<OnClick> <OnClick>
Aux.options.show() if AuxFrame:IsVisible() then
AuxFrame:Hide()
else
AuxFrame:Show()
end
</OnClick> </OnClick>
</Scripts> </Scripts>
</Button> </Button>
+12 -12
View File
@@ -65,9 +65,12 @@ function wait_for_complete_results(k)
end, k) end, k)
end end
function wait_for_callback(f, args, k) function wait_for_callback(args)
local ok = true local ok = true
local f = tremove(args, 1)
local k = tremove(args)
if f then if f then
tinsert(args, { tinsert(args, {
suspend = function() ok = false end, suspend = function() ok = false end,
@@ -87,12 +90,10 @@ function scan()
submit_query(function() submit_query(function()
local count, total_count = GetNumAuctionItems("list") local count, _ = GetNumAuctionItems('list')
scan_auctions(count, function() scan_auctions(count, function()
state.total_pages = math.ceil(total_count / AUCTIONS_PER_PAGE)
state.page = state.job.next_page and state.job.next_page(state.page, state.total_pages) state.page = state.job.next_page and state.job.next_page(state.page, state.total_pages)
if state.page then if state.page then
@@ -112,7 +113,7 @@ function scan_auctions(count, k)
end end
function scan_auctions_helper(i, n, k) function scan_auctions_helper(i, n, k)
wait_for_callback(state.job.on_read_auction, {i}, function() wait_for_callback{state.job.on_read_auction, i, function()
if i >= n then if i >= n then
return k() return k()
@@ -120,23 +121,22 @@ function scan_auctions_helper(i, n, k)
return scan_auctions_helper(i + 1, n, k) return scan_auctions_helper(i + 1, n, k)
end end
end) end}
end end
function submit_query(k) function submit_query(k)
if state.page then if state.page then
wait_for_callback(state.job.on_start_page, {state.page, state.total_pages or 0}, function()
controller().wait(CanSendAuctionQuery, function() controller().wait(CanSendAuctionQuery, function()
if state.job.on_submit_query then if state.job.on_submit_query then
state.job.on_submit_query() state.job.on_submit_query()
end end
wait_for_results(function() wait_for_results(function()
--wait_for_complete_results(function() --wait_for_complete_results(function()
if state.job.on_page_loaded then local _, total_count = GetNumAuctionItems('list')
state.job.on_page_loaded(state.page) state.total_pages = math.ceil(total_count / AUCTIONS_PER_PAGE)
end wait_for_callback{state.job.on_page_loaded, state.page, state.total_pages, function()
k() k()
end)--end) end}end)-- end)
QueryAuctionItems( QueryAuctionItems(
state.job.query.name, state.job.query.name,
state.job.query.min_level, state.job.query.min_level,
@@ -148,7 +148,7 @@ function submit_query(k)
state.job.query.usable, state.job.query.usable,
state.job.query.quality state.job.query.quality
) )
end)end) end)
else else
return k() return k()
end end
+407 -282
View File
@@ -2,24 +2,224 @@ Aux.sell = {}
auxSellEntries = {} -- persisted auxSellEntries = {} -- persisted
----------------------------------------- local inventory_data
local bestPriceOurStackSize local bestPriceOurStackSize
local current_auction local current_auction
----------------------------------------- local set_auction, update_auction_listing, update_inventory_listing, record_auction, undercut, item_class_index, item_subclass_index, report, select_entry, update_recommendation, refresh_entries, auction_candidates, charge_classes, get_stack_size_slider_value
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 local LIVE, HISTORICAL = 1, 2
Aux.sell.inventory_listing_config = {
on_cell_click = function (sheet, row_index, column_index)
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
set_auction(sheet.data[data_index])
end,
on_cell_enter = function (sheet, row_index, column_index)
sheet.rows[row_index].highlight:SetAlpha(.5)
end,
on_cell_leave = function (sheet, row_index, column_index)
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
if not (current_auction and sheet.data[data_index] == current_auction) then
sheet.rows[row_index].highlight:SetAlpha(0)
end
end,
row_setter = function(row, datum)
if current_auction and datum == current_auction then
row.highlight:SetAlpha(.5)
else
row.highlight:SetAlpha(0)
end
end,
columns = {
{
title = 'Qty',
width = 23,
comparator = function(datum1, datum2) return Aux.util.compare(datum1.aux_quantity, datum2.aux_quantity, Aux.util.LT) end,
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
cell_setter = function(cell, datum)
cell.text:SetText(datum.aux_quantity)
end,
},
{
title = 'Item',
width = 186,
comparator = function(row1, row2) return Aux.util.compare(row1.name, row2.name, Aux.util.GT) end,
cell_initializer = function(cell)
local icon = CreateFrame('Button', nil, cell)
local icon_texture = icon:CreateTexture(nil, 'BORDER')
icon_texture:SetAllPoints(icon)
icon.icon_texture = icon_texture
local normal_texture = icon:CreateTexture(nil)
normal_texture:SetPoint('CENTER', 0, 0)
normal_texture:SetWidth(22)
normal_texture:SetHeight(22)
normal_texture:SetTexture('Interface\\Buttons\\UI-Quickslot2')
icon:SetNormalTexture(normal_texture)
icon:SetPoint('LEFT', cell)
icon:SetWidth(12)
icon:SetHeight(12)
icon:SetNormalTexture('Interface\\Buttons\\UI-Quickslot2')
icon:SetPushedTexture('Interface\\Buttons\\UI-Quickslot-Depress')
icon:SetHighlightTexture('Interface\\Buttons\\ButtonHilight-Square')
local text = cell:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
text:SetPoint("LEFT", icon, "RIGHT", 1, 0)
text:SetPoint('TOPRIGHT', cell)
text:SetPoint('BOTTOMRIGHT', cell)
text:SetJustifyV('TOP')
text:SetJustifyH('LEFT')
text:SetTextColor(0.8, 0.8, 0.8)
cell.text = text
cell.icon = icon
end,
cell_setter = function(cell, datum)
cell.icon.icon_texture:SetTexture(datum.texture)
cell.text:SetText('['..datum.name..']')
local color = ITEM_QUALITY_COLORS[datum.quality]
cell.text:SetTextColor(color.r, color.g, color.b)
end,
},
},
sort_order = {{column = 2, order = 'ascending' }},
}
Aux.sell.auction_listing_config = {
on_cell_click = function (sheet, row_index, column_index)
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
AuxSellEntry_OnClick(sheet.data[data_index])
end,
on_cell_enter = function (sheet, row_index, column_index)
sheet.rows[row_index].highlight:SetAlpha(.5)
end,
on_cell_leave = function (sheet, row_index, column_index)
local data_index = row_index + FauxScrollFrame_GetOffset(sheet.scroll_frame)
local datum = sheet.data[data_index]
if not (datum and current_auction and Aux.util.safe_index{auxSellEntries, current_auction.name, 'selected', 'key'} == datum.key) then
sheet.rows[row_index].highlight:SetAlpha(0)
end
end,
row_setter = function(row, datum)
if datum and current_auction and Aux.util.safe_index{auxSellEntries, current_auction.name, 'selected', 'key'} == datum.key then
row.highlight:SetAlpha(.5)
else
row.highlight:SetAlpha(0)
end
end,
columns = {
{
title = 'Avail',
width = 40,
comparator = function(row1, row2) return Aux.util.compare(row1.count, row2.count, Aux.util.LT) end,
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
cell_setter = function(cell, row)
cell.text:SetText(row.count)
end,
},
{
title = 'Yours',
width = 40,
comparator = function(row1, row2) return Aux.util.compare(row1.yours, row2.yours, Aux.util.LT) end,
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
cell_setter = function(cell, row)
cell.text:SetText(row.yours)
end,
},
{
title = 'Max Left',
width = 55,
comparator = function(row1, row2) return Aux.util.compare(row1.max_time_left, row2.max_time_left, Aux.util.GT) end,
cell_initializer = Aux.sheet.default_cell_initializer('CENTER'),
cell_setter = function(cell, datum)
local text
if datum.max_time_left == 1 then
text = '30m'
elseif datum.max_time_left == 2 then
text = '2h'
elseif datum.max_time_left == 3 then
text = '8h'
elseif datum.max_time_left == 4 then
text = '24h'
end
cell.text:SetText(text)
end,
},
{
title = 'Buy/ea',
width = 70,
comparator = function(row1, row2) return Aux.util.compare(row1.unit_buyout_price, row2.unit_buyout_price, Aux.util.GT) end,
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
cell_setter = function(cell, row)
cell.text:SetText(Aux.util.money_string(row.unit_buyout_price))
end,
},
{
title = 'Qty',
width = 23,
comparator = function(row1, row2) return Aux.util.compare(row1.stack_size, row2.stack_size, Aux.util.LT) end,
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
cell_setter = function(cell, row)
cell.text:SetText(row.stack_size)
end,
},
{
title = 'Buy',
width = 70,
comparator = function(row1, row2) return Aux.util.compare(row1.buyout_price, row2.buyout_price, Aux.util.GT) end,
cell_initializer = Aux.sheet.default_cell_initializer('RIGHT'),
cell_setter = function(cell, row)
cell.text:SetText(Aux.util.money_string(row.buyout_price))
end,
},
},
sort_order = {{column = 4, order = 'ascending' }, {column = 4, order = 'ascending'}},
}
function update_inventory_listing()
Aux.list.populate(AuxSellInventoryListing.sheet, inventory_data)
end
function update_auction_listing()
Aux.list.populate(AuxSellAuctionsListing.sheet, current_auction and auxSellEntries[current_auction.name] or {})
end
function Aux.sell.on_open() function Aux.sell.on_open()
UIDropDownMenu_SetSelectedValue(AuxSellParametersStrategyDropDown, LIVE)
Aux_Sell_SetAuctionDuration(AUX_AUCTION_DURATION)
AuxSellStackSizeSlider:SetValueStep(1) AuxSellStackSizeSlider:SetValueStep(1)
AuxSellStackSizeSliderText:SetText('Stack Size') AuxSellStackSizeSliderText:SetText('Stack Size')
AuxSellStackCountSlider:SetValueStep(1) AuxSellStackCountSlider:SetValueStep(1)
AuxSellStackCountSliderText:SetText('Stack Count') AuxSellStackCountSliderText:SetText('Stack Count')
-- so that it's initialized with zeroes, not sometimes zero, sometimes empty
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 100000)
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 100000)
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 1000)
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 1000)
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 1)
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 1)
Aux.sell.validate_parameters() Aux.sell.validate_parameters()
update_inventory_data()
update_inventory_listing()
update_auction_listing()
end
function Aux.sell.on_close()
end end
function Aux.sell.duration_radio_button_on_click(index) function Aux.sell.duration_radio_button_on_click(index)
@@ -42,13 +242,6 @@ function Aux.sell.duration_radio_button_on_click(index)
update_recommendation() update_recommendation()
end end
function Aux_Sell_AuctionFrameAuctions_OnShow()
Aux.orig.AuctionFrameAuctions_OnShow()
Aux_Sell_SetAuctionDuration(AUX_AUCTION_DURATION)
end
-----------------------------------------
function Aux_Sell_SetAuctionDuration(duration) function Aux_Sell_SetAuctionDuration(duration)
if duration == 'short' then if duration == 'short' then
Aux.sell.duration_radio_button_on_click(1) Aux.sell.duration_radio_button_on_click(1)
@@ -59,20 +252,9 @@ function Aux_Sell_SetAuctionDuration(duration)
end end
end end
-----------------------------------------
function Aux_AuctionFrameAuctions_Update()
Aux.orig.AuctionFrameAuctions_Update()
if PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.sell.index and AuctionFrame:IsShown() then
Aux_HideElems(Aux.tabs.sell.hiddenElements)
end
end
-----------------------------------------
function Aux.sell.post_auctions() function Aux.sell.post_auctions()
if current_auction and PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.sell.index then if current_auction then
local name, stack_size, buyout_price, stack_count = current_auction.name, get_stack_size_slider_value(), MoneyInputFrame_GetCopper(AuxSellParametersBuyoutPrice), AuxSellStackCountSlider:GetValue() local name, hyperlink, stack_size, buyout_price, stack_count = current_auction.name, current_auction.hyperlink, get_stack_size_slider_value(), MoneyInputFrame_GetCopper(AuxSellParametersBuyoutPrice), AuxSellStackCountSlider:GetValue()
local duration local duration
if AuctionFrameAuctions.duration == 120 then if AuctionFrameAuctions.duration == 120 then
duration = 2 duration = 2
@@ -101,45 +283,28 @@ function Aux.sell.post_auctions()
end end
end end
Aux.sell.clear_auction() Aux.sell.clear_auction()
report(name, stack_size, buyout_price, posted) update_inventory_data()
update_inventory_listing()
report(hyperlink, stack_size, buyout_price, posted)
end end
) )
else
Aux.orig.AuctionsCreateAuctionButton_OnClick()
end end
end end
-----------------------------------------
function Aux.sell.AuctionSellItemButton_OnEvent()
Aux.orig.AuctionSellItemButton_OnEvent()
end
-----------------------------------------
function set_message(msg)
Aux_HideElems(Aux.tabs.sell.recommendationElements)
AuxMessage:SetText(msg)
AuxMessage:Show()
end
-----------------------------------------
function select_entry() function select_entry()
if current_auction and auxSellEntries[current_auction.name] and not auxSellEntries[current_auction.name].selected then if current_auction and auxSellEntries[current_auction.name] and not auxSellEntries[current_auction.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 stack_size that is the cheapest auction for that particular stack_size
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[current_auction.name]) do for _, auction_datum in ipairs(auxSellEntries[current_auction.name]) do
if not bestPrice[auxEntry.stackSize] or bestPrice[auxEntry.stackSize].itemPrice >= auxEntry.itemPrice then if not bestPrice[auction_datum.stack_size] or bestPrice[auction_datum.stack_size].unit_buyout_price >= auction_datum.unit_buyout_price then
bestPrice[auxEntry.stackSize] = auxEntry bestPrice[auction_datum.stack_size] = auction_datum
end end
if not absoluteBest or absoluteBest.itemPrice > auxEntry.itemPrice then if not absoluteBest or absoluteBest.unit_buyout_price > auction_datum.unit_buyout_price then
absoluteBest = auxEntry absoluteBest = auction_datum
end end
end end
@@ -152,10 +317,8 @@ function select_entry()
end end
end end
-----------------------------------------
function get_stack_size_slider_value() function get_stack_size_slider_value()
if current_auction.has_charges then if current_auction.charges then
return AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider:GetValue()] return AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider:GetValue()]
else else
return AuxSellStackSizeSlider:GetValue() return AuxSellStackSizeSlider:GetValue()
@@ -183,14 +346,14 @@ function Aux.sell.validate_parameters()
end end
function update_recommendation() function update_recommendation()
AuxRecommendStaleText:Hide() AuxSellParametersStrategyDropDownStaleWarning:SetText()
if not current_auction then if not current_auction then
AuxSellRefreshButton:Disable() AuxSellRefreshButton:Disable()
AuxSellItem:SetNormalTexture(nil) AuxSellParametersItemIconTexture:SetTexture(nil)
AuxSellItemName:SetText() AuxSellParametersItemCount:SetText()
AuxSellItemCount:SetText() AuxSellParametersItemName:SetText()
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0) MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0)
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 0) MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 0)
@@ -199,81 +362,75 @@ function update_recommendation()
AuxSellStackSize:SetNumber(0) AuxSellStackSize:SetNumber(0)
AuxSellStackCountSlider:SetMinMaxValues(0,0) AuxSellStackCountSlider:SetMinMaxValues(0,0)
AuxSellStackCount:SetNumber(0) AuxSellStackCount:SetNumber(0)
set_message("Drag an item to the Auction Item area\n\nto see recommended pricing information")
else else
AuxSellStackSize:SetNumber(AuxSellStackSizeSlider:GetValue()) AuxSellStackSize:SetNumber(current_auction.charges and AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider:GetValue()] or AuxSellStackSizeSlider:GetValue())
AuxSellStackCount:SetNumber(AuxSellStackCountSlider:GetValue()) AuxSellStackCount:SetNumber(AuxSellStackCountSlider:GetValue())
AuxSellItem:SetNormalTexture(current_auction.texture) AuxSellParametersItemIconTexture:SetTexture(current_auction.texture)
AuxSellItemName:SetText(current_auction.name) AuxSellParametersItemName:SetText(current_auction.name)
if get_stack_size_slider_value() > 1 then local color = ITEM_QUALITY_COLORS[current_auction.quality]
AuxSellItemCount:SetText(get_stack_size_slider_value()) AuxSellParametersItemName:SetTextColor(color.r, color.g, color.b)
AuxSellItemCount:Show() if current_auction.aux_quantity > 1 then
AuxSellParametersItemCount:SetText(current_auction.aux_quantity)
else else
AuxSellItemCount:Hide() AuxSellParametersItemCount:SetText()
end end
AuxSellRefreshButton:Enable() AuxSellRefreshButton:Enable()
MoneyFrame_Update("AuctionsDepositMoneyFrame", floor(current_auction.vendor_price_per_unit * current_auction.deposit_factor * (current_auction.has_charges and 1 or get_stack_size_slider_value())) * AuxSellStackCountSlider:GetValue() * AuctionFrameAuctions.duration / 120) -- TODO neutral AH deposit formula
MoneyFrame_Update('AuxSellParametersDepositMoneyFrame', floor(current_auction.unit_vendor_price * 0.05 * (current_auction.charges and 1 or get_stack_size_slider_value())) * AuxSellStackCountSlider:GetValue() * AuctionFrameAuctions.duration / 120)
if auxSellEntries[current_auction.name] and auxSellEntries[current_auction.name].selected then 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 if not auxSellEntries[current_auction.name].created or GetTime() - auxSellEntries[current_auction.name].created > 1800 then
AuxRecommendStaleText:SetText("STALE DATA") -- data older than half an hour marked as stale AuxSellParametersStrategyDropDownStaleWarning:SetText('Stale data!') -- data older than half an hour marked as stale
AuxRecommendStaleText:Show()
end end
local newBuyoutPrice = auxSellEntries[current_auction.name].selected.itemPrice * get_stack_size_slider_value() local newBuyoutPrice = auxSellEntries[current_auction.name].selected.unit_buyout_price * get_stack_size_slider_value()
if auxSellEntries[current_auction.name].selected.numYours == 0 then if auxSellEntries[current_auction.name].selected.yours == 0 then
newBuyoutPrice = undercut(newBuyoutPrice) newBuyoutPrice = undercut(newBuyoutPrice)
end end
local newStartPrice = newBuyoutPrice * 0.95 local newStartPrice = newBuyoutPrice * 0.95
AuxMessage:Hide() -- 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 a stack of "..get_stack_size_slider_value()) -- AuxRecommendPerStackText:SetText("for a stack of "..get_stack_size_slider_value())
AuxRecommendItemTex:SetNormalTexture(current_auction.texture) -- AuxRecommendItemTex:SetNormalTexture(current_auction.texture)
if AuxSellStackSize:GetNumber() > 1 then -- if AuxSellStackSize:GetNumber() > 1 then
AuxRecommendItemTexCount:SetText(get_stack_size_slider_value()) -- AuxRecommendItemTexCount:SetText(get_stack_size_slider_value())
AuxRecommendItemTexCount:Show() -- AuxRecommendItemTexCount:Show()
else -- else
AuxRecommendItemTexCount:Hide() -- AuxRecommendItemTexCount:Hide()
end -- end
MoneyFrame_Update("AuxRecommendPerItemPrice", Aux_Round(get_stack_size_slider_value() > 0 and newBuyoutPrice / get_stack_size_slider_value() 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)) -- MoneyFrame_Update("AuxRecommendPerStackPrice", Aux_Round(newBuyoutPrice))
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, Aux_Round(newBuyoutPrice)) MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, Aux_Round(newBuyoutPrice))
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, Aux_Round(newStartPrice)) 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 -- if auxSellEntries[current_auction.name].selected.stack_size == auxSellEntries[current_auction.name][1].stack_size and auxSellEntries[current_auction.name].selected.buyout_price == auxSellEntries[current_auction.name][1].buyout_price then
AuxRecommendBasisText:SetText("(based on cheapest)") -- AuxRecommendBasisText:SetText("(based on cheapest)")
elseif bestPriceOurStackSize and auxSellEntries[current_auction.name].selected.stackSize == bestPriceOurStackSize.stackSize and auxSellEntries[current_auction.name].selected.buyoutPrice == bestPriceOurStackSize.buyoutPrice then -- elseif bestPriceOurStackSize and auxSellEntries[current_auction.name].selected.stack_size == bestPriceOurStackSize.stack_size and auxSellEntries[current_auction.name].selected.buyout_price == bestPriceOurStackSize.buyout_price 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[current_auction.name] then else
set_message("No auctions were found for \n\n"..current_auction.name) MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0)
auxSellEntries[current_auction.name] = nil MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 0)
else end
Aux_HideElems(Aux.tabs.sell.shownElements)
end
end end
Aux.sell.scrollbar_update()
end end
function Aux.sell.quantity_update() function Aux.sell.quantity_update()
if current_auction then 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] / get_stack_size_slider_value())) AuxSellStackCountSlider:SetMinMaxValues(1, current_auction.charges and current_auction.availability[AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider:GetValue()]] or floor(current_auction.availability[0] / get_stack_size_slider_value()))
end end
select_entry() select_entry()
update_recommendation() update_recommendation()
@@ -289,51 +446,34 @@ end
----------------------------------------- -----------------------------------------
function Aux.sell.set_auction(bag, slot) function set_auction(auction_candidate)
local container_item = Aux.info.container_item(bag, slot) PlaySound("igMainMenuOptionCheckBoxOn")
if container_item then
ClearCursor() Aux.scan.abort(function()
PickupContainerItem(bag,slot)
ClickAuctionSellItemButton()
local auction_sell_item = Aux.info.auction_sell_item()
ClearCursor()
ClickAuctionSellItemButton()
ClearCursor()
if auction_sell_item then current_auction = auction_candidate
update_inventory_listing()
Aux.scan.abort(function()
local charge_classes = charge_classes(current_auction.availability)
current_auction = { AuxSellStackSizeSlider.charge_classes = current_auction.charges and charge_classes
name = container_item.name, local stack_size_slider_max = current_auction.charges and getn(charge_classes) or min(current_auction.max_stack, current_auction.availability[0])
texture = container_item.texture, AuxSellStackSizeSlider:SetMinMaxValues(1, stack_size_slider_max)
class = container_item.type,
subclass = container_item.subtype, AuxSellStackSizeSlider:SetValue(stack_size_slider_max)
deposit_factor = auction_sell_item.deposit_factor, Aux.sell.quantity_update()
vendor_price_per_unit = auction_sell_item.vendor_price_per_unit, AuxSellStackCountSlider:SetValue(current_auction.aux_quantity) -- reduced to max possible
has_charges = container_item.charges ~= nil,
availability = availability(container_item.name) if not auxSellEntries[current_auction.name] then
} refresh_entries()
end
select_entry()
update_recommendation()
update_auction_listing()
end)
AuxSellStackSizeSlider.charge_classes = charge_classes(current_auction.availability)
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()
if not auxSellEntries[current_auction.name] then
refresh_entries()
end
select_entry()
update_recommendation()
end)
end
end
end end
function charge_classes(availability) function charge_classes(availability)
@@ -345,20 +485,81 @@ function charge_classes(availability)
return charge_classes return charge_classes
end end
function availability(name) function update_inventory_data()
local availability = {} inventory_data = {}
for bag = 0, 4 do update_inventory_listing()
if GetBagName(bag) then
for slot = 1, GetContainerNumSlots(bag) do local auction_candidate_map = {}
local item_info = Aux.info.container_item(bag, slot)
if item_info and item_info.name == name then local function process_inventory(inventory_iterator, k)
local charge_class = item_info.charges or 0 local slot = inventory_iterator()
availability[charge_class] = (availability[charge_class] or 0) + item_info.count
end if not slot then
end return k()
end end
local item_info = Aux.info.container_item(slot.bag, slot.bag_slot)
if item_info then
return Aux.control.on_next_update(function()
local charge_class = item_info.charges or 0
local auction_sell_item
Aux.util.without_sound(function()
Aux.util.without_errors(function()
ClearCursor()
PickupContainerItem(slot.bag, slot.bag_slot)
ClickAuctionSellItemButton()
auction_sell_item = Aux.info.auction_sell_item()
ClearCursor()
ClickAuctionSellItemButton()
ClearCursor()
end)
end)
if auction_sell_item then
if not auction_candidate_map[item_info.item_signature] then
auction_candidate_map[item_info.item_signature] = {
hyperlink = item_info.hyperlink,
name = item_info.name,
texture = item_info.texture,
quality = item_info.quality,
class = item_info.type,
subclass = item_info.subtype,
unit_vendor_price = auction_sell_item.unit_vendor_price,
charges = item_info.charges,
aux_quantity = item_info.charges or item_info.count,
max_stack = item_info.max_stack,
availability = { [charge_class]=item_info.count },
}
else
local candidate = auction_candidate_map[item_info.item_signature]
candidate.availability[charge_class] = (candidate.availability[charge_class] or 0) + item_info.count
candidate.aux_quantity = candidate.aux_quantity + (item_info.charges or item_info.count)
end
end
return process_inventory(inventory_iterator, k)
end)
end
return process_inventory(inventory_iterator, k)
end end
return availability
process_inventory(Aux.util.inventory_iterator(), function()
local auction_candidates = {}
for _, auction_candidate in pairs(auction_candidate_map) do
tinsert(auction_candidates, auction_candidate)
end
inventory_data = auction_candidates
update_inventory_listing()
end)
end end
function refresh_entries() function refresh_entries()
@@ -372,7 +573,7 @@ function refresh_entries()
-- local class_index = item_class_index(current_auction.class) -- local class_index = item_class_index(current_auction.class)
-- local subclass_index = item_subclass_index(class_index, current_auction.subclass) -- local subclass_index = item_subclass_index(class_index, current_auction.subclass)
set_message('Scanning auctions ...') Aux.log('Starting scan.')
Aux.scan.start{ Aux.scan.start{
query = { query = {
name = name, name = name,
@@ -380,24 +581,27 @@ function refresh_entries()
subclass = subclass_index, subclass = subclass_index,
}, },
page = 0, page = 0,
on_start_page = function(page, total_pages) on_page_loaded = function(page, total_pages)
set_message('Scanning auctions: page ' .. page + 1 .. (total_pages > 0 and ' out of ' .. total_pages or '') .. ' ...') Aux.log('Scanning page '..(page + 1)..' out of '..total_pages..' ...')
end, end,
on_read_auction = function(i) on_read_auction = function(i)
local auction_item = Aux.info.auction_item(i) local auction_item = Aux.info.auction_item(i)
if auction_item and auction_item.name == name then if auction_item and auction_item.name == name then
local stack_size = auction_item.charges or auction_item.count local aux_quantity = auction_item.charges or auction_item.count
record_auction(auction_item.name, stack_size, auction_item.buyout_price, auction_item.duration, auction_item.owner) record_auction(auction_item.name, aux_quantity, auction_item.buyout_price, auction_item.duration, auction_item.owner)
end end
end, end,
on_abort = function() on_abort = function()
auxSellEntries[name] = nil auxSellEntries[name] = nil
Aux.log('Scan aborted.')
end, end,
on_complete = function() on_complete = function()
auxSellEntries[name] = auxSellEntries[name] or { created = GetTime() } auxSellEntries[name] = auxSellEntries[name] or { created = GetTime() }
select_entry() select_entry()
update_recommendation() update_recommendation()
end, update_auction_listing()
Aux.log('Scan complete: '..getn(auxSellEntries[name])..' '..Aux_PluralizeIf('auction', getn(auxSellEntries[name]))..' of '..current_auction.hyperlink..' found.')
end,
next_page = function(page, total_pages) next_page = function(page, total_pages)
local last_page = max(total_pages - 1, 0) local last_page = max(total_pages - 1, 0)
if page < last_page then if page < last_page then
@@ -408,103 +612,22 @@ function refresh_entries()
end end
end end
----------------------------------------- function AuxSellEntry_OnClick(entry)
function Aux.sell.scrollbar_update() auxSellEntries[current_auction.name].selected = entry
local numrows
if not current_auction or not auxSellEntries[current_auction.name] then
numrows = 0
else
numrows = getn(auxSellEntries[current_auction.name])
end
FauxScrollFrame_Update(AuxScrollFrame, numrows, 12, 16)
for line = 1, 12 do
local dataOffset = line + FauxScrollFrame_GetOffset(AuxScrollFrame)
local lineEntry = getglobal("AuxSellEntry"..line)
if numrows <= 12 then
lineEntry:SetWidth(603)
else
lineEntry:SetWidth(585)
end
lineEntry:SetID(dataOffset)
if current_auction and dataOffset <= numrows and auxSellEntries[current_auction.name] then
local entry = auxSellEntries[current_auction.name][dataOffset]
if auxSellEntries[current_auction.name].selected and entry.itemPrice == auxSellEntries[current_auction.name].selected.itemPrice and entry.stackSize == auxSellEntries[current_auction.name].selected.stackSize then
lineEntry:LockHighlight()
else
lineEntry:UnlockHighlight()
end
local lineEntry_stacks = getglobal("AuxSellEntry"..line.."_Stacks")
local lineEntry_time = getglobal("AuxSellEntry"..line.."_Time")
if entry.maxTimeLeft == 1 then
lineEntry_time:SetText("Short")
elseif entry.maxTimeLeft == 2 then
lineEntry_time:SetText("Medium")
elseif entry.maxTimeLeft == 3 then
lineEntry_time:SetText("Long")
elseif entry.maxTimeLeft == 4 then
lineEntry_time:SetText("Very Long")
end
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)
end
local own
if entry.numYours == 0 then
own = ""
elseif
entry.numYours == entry.count then
own = "(yours)"
else
own = "(yours: "..entry.numYours..")"
end
local tx = string.format("%i %s of %i %s", entry.count, Aux_PluralizeIf("stack", entry.count), entry.stackSize, own)
lineEntry_stacks:SetText(tx)
MoneyFrame_Update("AuxSellEntry"..line.."_UnitPrice", Aux_Round(entry.buyoutPrice/entry.stackSize))
MoneyFrame_Update("AuxSellEntry"..line.."_TotalPrice", Aux_Round(entry.buyoutPrice))
lineEntry:Show()
else
lineEntry:Hide()
end
end
end
-----------------------------------------
function AuxSellEntry_OnClick()
local entryIndex = this:GetID()
auxSellEntries[current_auction.name].selected = auxSellEntries[current_auction.name][entryIndex]
update_auction_listing()
update_recommendation() update_recommendation()
PlaySound("igMainMenuOptionCheckBoxOn") PlaySound("igMainMenuOptionCheckBoxOn")
end end
-----------------------------------------
function AuxSellRefreshButton_OnClick() function AuxSellRefreshButton_OnClick()
Aux.scan.abort(function() Aux.scan.abort(function()
refresh_entries() refresh_entries()
select_entry() select_entry()
update_recommendation() update_recommendation()
update_auction_listing()
end) end)
end end
@@ -518,30 +641,32 @@ end
----------------------------------------- -----------------------------------------
function record_auction(name, stack_size, buyout_price, duration, owner) function record_auction(name, aux_quantity, buyout_price, duration, owner)
if buyout_price > 0 then if buyout_price > 0 then
auxSellEntries[name] = auxSellEntries[name] or { created = GetTime() } auxSellEntries[name] = auxSellEntries[name] or { created = GetTime() }
local entry local entry
for _, existingEntry in ipairs(auxSellEntries[name]) do for _, existingEntry in ipairs(auxSellEntries[name]) do
if existingEntry.buyoutPrice == buyout_price and existingEntry.stackSize == stack_size then if existingEntry.buyout_price == buyout_price and existingEntry.stack_size == aux_quantity then
entry = existingEntry entry = existingEntry
end end
end end
if entry then if entry then
entry.count = entry.count + 1 entry.count = entry.count + 1
entry.numYours = entry.numYours + (owner == UnitName("player") and 1 or 0) entry.yours = entry.yours + (owner == UnitName("player") and 1 or 0)
entry.maxTimeLeft = max(entry.maxTimeLeft, duration) entry.max_time_left = max(entry.max_time_left, duration)
else else
entry = { entry = {
stackSize = stack_size, key = aux_quantity..':'..buyout_price,
buyoutPrice = buyout_price,
itemPrice = buyout_price / stack_size, stack_size = aux_quantity,
maxTimeLeft = duration, buyout_price = buyout_price,
count = 1, unit_buyout_price = buyout_price / aux_quantity,
numYours = owner == UnitName("player") and 1 or 0, max_time_left = duration,
count = 1,
yours = owner == UnitName("player") and 1 or 0,
} }
tinsert(auxSellEntries[name], entry) tinsert(auxSellEntries[name], entry)
table.sort(auxSellEntries[name], function(a,b) return a.itemPrice < b.itemPrice end) table.sort(auxSellEntries[name], function(a,b) return a.unit_buyout_price < b.unit_buyout_price end)
end end
end end
end end
@@ -572,32 +697,32 @@ end
-- end -- end
-- end -- end
----------------------------------------- function report(hyperlink, stack_size, buyout_price, posted)
Aux.log(string.format(
function report(item_name, stack_size, buyout_price, posted) '%i %s of %s x %i posted at %s.',
AuxSellReportHTML:SetText(string.format( posted,
[[ Aux_PluralizeIf('auction', posted),
<html> hyperlink,
<body> stack_size,
<h1>Aux Sell Report</h1> Aux.util.money_string(buyout_price)
<br/>
<p>
%i auctions of %s posted
<br/><br/>
Stack size: %i
<br/>
Stack price: %s
</p>
</body>
</html>
]],
posted,
item_name,
stack_size,
Aux.util.format_money(buyout_price)
)) ))
end
AuxSellReportHTML:SetSpacing(3)
function Aux.sell.initialize_strategy_dropdown()
AuxSellReport:Show()
local function on_click()
UIDropDownMenu_SetSelectedValue(AuxSellParametersStrategyDropDown, this.value)
end
UIDropDownMenu_AddButton{
text = 'Live scan',
value = LIVE,
func = on_click,
}
-- UIDropDownMenu_AddButton{
-- text = 'Historical price',
-- value = HISTORICAL,
-- func = on_click,
-- }
end end
+218 -444
View File
@@ -1,388 +1,101 @@
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/"> <Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="sell.lua"/> <Script file="sell.lua"/>
<!-- Frame to handle all core events -->
<Frame>
<Scripts>
</Scripts>
</Frame>
<Button name="AuxSellEntryTemplate" virtual="true" hidden="true"> <Frame name="AuxSellFrame" parent="AuxFrame" hidden="true">
<Size><AbsDimension y="16" /></Size> <Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<Frames> <Frames>
<Frame> <Frame name="AuxSellInventory" inherits="AuxFrameBoxTemplate">
<Size><AbsDimension x="120" y="16" /></Size> <Size><AbsDimension x="260" y="326"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="22" y="0"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="-35"/></Offset></Anchor></Anchors>
<Frames> <Scripts>
<Frame name="$parent_UnitPrice" inherits="SmallMoneyFrameTemplate"> <OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors> this:SetBackdropColor(0.15, 0.15, 0.15)
<Scripts> getglobal(this:GetName().."Title"):SetText('Inventory')
<OnLoad> </OnLoad>
SmallMoneyFrame_OnLoad() </Scripts>
MoneyFrame_SetType("STATIC") <Frames>
</OnLoad> <Frame name="$parentListing">
</Scripts> <Anchors>
</Frame> <Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Frames> <Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-40" y="0"/></Offset></Anchor>
</Frame> </Anchors>
<Scripts>
<Frame> <OnLoad>
<Size><AbsDimension x="100" y="16"/></Size> local config = Aux.sell.inventory_listing_config
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="185" y="-3"/></Offset></Anchor></Anchors> local sort_order = Aux.util.map(config.sort_order, function(column_order) return { column = config.columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
<Layers> this.sheet = Aux.sheet.create(this, config.columns, sort_order, config.row_setter, config.on_cell_click, config.on_cell_enter, config.on_cell_leave)
<Layer level="BACKGROUND"> </OnLoad>
<FontString name="$parent_Stacks" inherits="GameFontHighlightSmall"> </Scripts>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors> </Frame>
</FontString> </Frames>
</Layer> </Frame>
</Layers> <frame name="AuxSellParameters" inherits="AuxFrameBoxTemplate">
</Frame> <Size><AbsDimension x="213" y="326"/></Size>
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxSellInventory"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Frame> <Scripts>
<Size><AbsDimension x="100" y="16"/></Size> <OnLoad>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="340" y="-3"/></Offset></Anchor></Anchors> this:SetBackdropBorderColor(0.4, 0.4, 0.4)
<Layers> this:SetBackdropColor(0.15, 0.15, 0.15)
<Layer level="BACKGROUND"> getglobal(this:GetName().."Title"):SetText('Parameters')
<FontString name="$parent_Time" inherits="GameFontHighlightSmall"> </OnLoad>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors> </Scripts>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame>
<Size><AbsDimension x="120" y="16"/></Size>
<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>
<HighlightTexture file="Interface\HelpFrame\HelpFrameButton-Highlight" alphaMode="ADD">
<TexCoords left="0" right="1.0" top="0.0" bottom="0.6"/>
</HighlightTexture>
<Scripts>
<OnClick>
AuxSellEntry_OnClick()
</OnClick>
</Scripts>
</Button>
<Frame name="AuxSellTemplate" virtual="true" hidden="true">
<Size>
<AbsDimension x="694" y="447"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="210" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="Aux Sell">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="20" y="-18"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="AuxMessage" inherits="GameFontNormal">
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="170" y="-100"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="AuxRecommendText" inherits="GameFontNormal" text="Recommended buyout price">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="287" y="-98"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="AuxRecommendBasisText" inherits="GameFontHighlightSmall" text="based on">
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="AuxRecommendText"><Offset><AbsDimension x="20" y="-2"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="AuxRecommendPerStackText" inherits="GameFontHighlightSmall" text="per stack">
<Anchors><Anchor point="TOPLEFT" relativeTo="AuxRecommendText"><Offset><AbsDimension x="152" y="-28"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="AuxRecommendPerItemText" inherits="GameFontHighlightSmall" text="per item">
<Anchors><Anchor point="TOPLEFT" relativeTo="AuxRecommendText"><Offset><AbsDimension x="152" y="-51"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="AuxRecommendStaleText" inherits="GameFontRedLarge">
<Anchors><Anchor point="TOPLEFT" relativeTo="AuxRecommendText"><Offset><AbsDimension x="430" y="-65"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
<Size><AbsDimension x="606" y="64"/></Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="216" y="-167"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.1953125" right="0.8046875" top="0" bottom="1"/>
</Texture>
<FontString inherits="GameFontHighlightSmall" text="Unit Price">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="80" y="1"/></Offset></Anchor></Anchors>
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Stacks">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="189" y="1"/></Offset></Anchor></Anchors>
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Max Time Left">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="341" y="1"/></Offset></Anchor></Anchors>
</FontString>
<FontString inherits="GameFontHighlightSmall" text="Total Price">
<Anchors><Anchor point="LEFT" relativePoint="LEFT" relativeTo="$parentMiddle"><Offset><AbsDimension x="496" y="1"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Button name="AuxSellItem">
<Size>
<AbsDimension x="37" y="37"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="28" y="-98"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentName" inherits="GameFontNormal">
<Size>
<AbsDimension x="124" y="30"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="OVERLAY">
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-5" y="2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Button>
<Button name="AuxSellPostButton" inherits="UIPanelButtonTemplate" text="Post Auctions">
<Size>
<AbsDimension x="191" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset>
<AbsDimension x="18" y="39"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
Aux.sell.post_auctions()
</OnClick>
</Scripts>
</Button>
<Button>
<Size><AbsDimension x="612" y="118"/></Size>
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="213" y="-70"/></Offset></Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND"></Layer>
</Layers>
<Scripts>
<OnLoad>
this:RegisterEvent("NEW_AUCTION_UPDATE")
this:RegisterForDrag("LeftButton")
</OnLoad>
<OnEvent>
if event == "NEW_AUCTION_UPDATE" then
Aux_Hilite1:Hide()
end
</OnEvent>
<OnClick>
if CursorHasItem() then
Aux.sell.set_auction(Aux.last_picked_up.bag, Aux.last_picked_up.slot)
else
Aux.sell.clear_auction()
end
</OnClick>
<OnReceiveDrag>
Aux.sell.set_auction(Aux.last_picked_up.bag, Aux.last_picked_up.slot)
ClearCursor()
</OnReceiveDrag>
<OnEnter>
Aux_Hilite1:Show()
</OnEnter>
<OnLeave>
Aux_Hilite1:Hide()
</OnLeave>
</Scripts>
<Frames>
<Frame name="Aux_Hilite1" hidden="true">
<Anchors>
<Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border">
<EdgeSize>
<AbsValue val="16"/>
</EdgeSize>
</Backdrop>
</Frame>
</Frames>
</Button>
<Button name="AuxRecommendItemTex">
<Size><AbsDimension x="37" y="37"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="234" y="-87"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-5" y="2"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Button>
<Frame>
<Size><AbsDimension x="120" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="AuxRecommendText">
<Offset><AbsDimension x="32" y="-24"/></Offset>
</Anchor>
</Anchors>
<Frames>
<Frame name="AuxRecommendPerStackPrice" inherits="SmallMoneyFrameTemplate">
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>AuxMoneyFrame_OnLoad()</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<Frame>
<Size><AbsDimension x="120" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="AuxRecommendText">
<Offset><AbsDimension x="32" y="-46"/></Offset>
</Anchor>
</Anchors>
<Frames>
<Frame name="AuxRecommendPerItemPrice" inherits="SmallMoneyFrameTemplate">
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Scripts><OnLoad>AuxMoneyFrame_OnLoad()</OnLoad></Scripts>
</Frame>
</Frames>
</Frame>
<Button name="AuxSellRefreshButton" inherits="UIPanelButtonTemplate" text="Refresh">
<Size><AbsDimension x="126" y="22"/></Size>
<Anchors>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="51" y="14"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
AuxSellRefreshButton_OnClick()
</OnClick>
</Scripts>
</Button>
<ScrollFrame name="AuxScrollFrame" inherits="FauxScrollFrameTemplate">
<Size><AbsDimension x="588" y="194"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="210" y="-213"/></Offset></Anchor></Anchors>
<Scripts>
<OnVerticalScroll>
FauxScrollFrame_OnVerticalScroll(16, Aux.sell.scrollbar_update)
</OnVerticalScroll>
<OnShow>
<!--Aux.sell.scrollbar_update();-->
</OnShow>
</Scripts>
</ScrollFrame>
<Button name="AuxSellEntry1" inherits="AuxSellEntryTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="AuxScrollFrame" relativePoint="TOPLEFT"><Offset><AbsDimension x="8" y="0"/></Offset></Anchor></Anchors>
</Button>
<Button name="AuxSellEntry2" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry1" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuxSellEntry3" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry2" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuxSellEntry4" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry3" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuxSellEntry5" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry4" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuxSellEntry6" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry5" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuxSellEntry7" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry6" relativePoint="BOTTOMLEFT"/></Anchors></Button>
<Button name="AuxSellEntry8" inherits="AuxSellEntryTemplate"><Anchors><Anchor point="TOPLEFT" relativeTo="AuxSellEntry7" 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="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>
<frame name="AuxSellParameters">
<Size>
<AbsDimension x="200" y="600"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="28" y="-153"/>
</Offset>
</Anchor>
</Anchors>
<layers>
<layer level="BACKGROUND">
<FontString name="$parentDurationText" inherits="GameFontHighlightSmall" text="Duration">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-49"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</layer>
</layers>
<frames> <frames>
<Frame name="$parentItem">
<Size><AbsDimension x="193" y="37"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-10"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BORDER">
<Texture name="$parentIconTexture">
<Size><AbsDimension x="32" y="32"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="2" y="0"/></Offset></Anchor></Anchors>
</Texture>
<Texture file="Interface\Buttons\UI-Quickslot2">
<Size><AbsDimension x="60" y="60"/></Size>
<Anchors><Anchor point="CENTER" relativeTo="$parentIconTexture"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</Texture>
<FontString name="$parentCount" inherits="NumberFontNormal" justifyH="RIGHT">
<Anchors><Anchor point="BOTTOMRIGHT" relativeTo="$parentIconTexture"><Offset><AbsDimension x="-5" y="2"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="$parentName" inherits="GameFontNormal" justifyH="LEFT">
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentIconTexture"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor>
<Anchor point="RIGHT"><Offset><AbsDimension x="-10" y="0"/></Offset></Anchor>
<Anchor point="TOP"><Offset><AbsDimension x="0" y="-5"/></Offset></Anchor>
<Anchor point="BOTTOM"><Offset><AbsDimension x="0" y="5"/></Offset></Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="BACKGROUND">
<Texture name="$parentLeft" file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="37"/></Size>
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentIconTexture"><Offset><AbsDimension x="2" y="0"/></Offset></Anchor></Anchors>
<TexCoords left="0" right="0.078125" top="0" bottom="1.0"/>
</Texture>
<Texture name="$parentRight" file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="37"/></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<TexCoords left="0.75" right="0.828125" top="0" bottom="1.0"/>
</Texture>
<Texture file="Interface\AuctionFrame\UI-AuctionItemNameFrame">
<Size><AbsDimension x="10" y="37"/></Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<Anchor point="RIGHT" relativeTo="$parentRight" relativePoint="LEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
</Anchors>
<TexCoords left="0.078125" right="0.75" top="0" bottom="1.0"/>
</Texture>
</Layer>
</Layers>
<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
</Frame>
<Slider name="AuxSellStackSizeSlider" inherits="AuxSliderTemplate"> <Slider name="AuxSellStackSizeSlider" inherits="AuxSliderTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-70"/></Offset></Anchor></Anchors>
<Scripts> <Scripts>
<OnValueChanged> <OnValueChanged>
Aux.sell.quantity_update() Aux.sell.quantity_update()
@@ -390,7 +103,7 @@
</Scripts> </Scripts>
</Slider> </Slider>
<Slider name="AuxSellStackCountSlider" inherits="AuxSliderTemplate"> <Slider name="AuxSellStackCountSlider" inherits="AuxSliderTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="-30"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="10" y="-100"/></Offset></Anchor></Anchors>
<Scripts> <Scripts>
<OnValueChanged> <OnValueChanged>
Aux.sell.quantity_update() Aux.sell.quantity_update()
@@ -402,7 +115,14 @@
<Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="AuxSellStackSizeSlider"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors> <Anchors><Anchor point="LEFT" relativePoint="RIGHT" relativeTo="AuxSellStackSizeSlider"><Offset><AbsDimension x="10" y="0"/></Offset></Anchor></Anchors>
<Scripts> <Scripts>
<OnTextChanged> <OnTextChanged>
AuxSellStackSizeSlider:SetValue(this.charge_classes and this.charge_classes[this:GetNumber()] or this:GetNumber()) if AuxSellStackSizeSlider.charge_classes then
local charge_slider_value = Aux.util.index_of(this:GetNumber(), AuxSellStackSizeSlider.charge_classes)
if charge_slider_value then
AuxSellStackSizeSlider:SetValue(charge_slider_value)
end
else
AuxSellStackSizeSlider:SetValue(this:GetNumber())
end
Aux.sell.quantity_update() Aux.sell.quantity_update()
</OnTextChanged> </OnTextChanged>
<OnTabPressed> <OnTabPressed>
@@ -450,50 +170,73 @@
</OnEditFocusGained> </OnEditFocusGained>
</Scripts> </Scripts>
</EditBox> </EditBox>
<CheckButton name="$parentShortDurationRadio" inherits="SendMailRadioButtonTemplate"> <CheckButton name="$parentShortDurationRadio" inherits="AuxRadioButtonTemplate">
<Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="11" y="-143"/></Offset></Anchor></Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentDurationText" relativePoint="BOTTOMLEFT"> <layers>
<Offset> <layer level="BACKGROUND">
<AbsDimension x="3" y="-4"/> <FontString name="$parentDurationText" inherits="GameFontNormalSmall" text="Duration">
</Offset> <Anchors><Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="0" y="4"/></Offset></Anchor></Anchors>
</Anchor> </FontString>
</Anchors> </layer>
</layers>
<Scripts> <Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("2h");</OnLoad> <OnLoad>
<OnClick>Aux.sell.duration_radio_button_on_click(1)</OnClick> getglobal(this:GetName().."Text"):SetText("2h")
</OnLoad>
<OnClick>
Aux.sell.duration_radio_button_on_click(1)
</OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<CheckButton name="$parentMediumDurationRadio" inherits="SendMailRadioButtonTemplate"> <CheckButton name="$parentMediumDurationRadio" inherits="AuxRadioButtonTemplate">
<Anchors> <Anchors><Anchor point="LEFT" relativeTo="$parentShortDurationRadio" relativePoint="RIGHT"><Offset><AbsDimension x="30" y="0"/></Offset></Anchor></Anchors>
<Anchor point="LEFT" relativeTo="$parentShortDurationRadio" relativePoint="RIGHT">
<Offset>
<AbsDimension x="44" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts> <Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("8h");</OnLoad> <OnLoad>
<OnClick>Aux.sell.duration_radio_button_on_click(2)</OnClick> getglobal(this:GetName()..'Text'):SetText("8h")
</OnLoad>
<OnClick>
Aux.sell.duration_radio_button_on_click(2)
</OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<CheckButton name="$parentLongDurationRadio" inherits="SendMailRadioButtonTemplate"> <CheckButton name="$parentLongDurationRadio" inherits="AuxRadioButtonTemplate">
<Anchors> <Anchors><Anchor point="LEFT" relativeTo="$parentMediumDurationRadio" relativePoint="RIGHT"><Offset><AbsDimension x="30" y="0"/></Offset></Anchor></Anchors>
<Anchor point="LEFT" relativeTo="$parentMediumDurationRadio" relativePoint="RIGHT">
<Offset>
<AbsDimension x="44" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts> <Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("24h");</OnLoad> <OnLoad>
<OnClick>Aux.sell.duration_radio_button_on_click(3)</OnClick> getglobal(this:GetName().."Text"):SetText("24h")
</OnLoad>
<OnClick>
Aux.sell.duration_radio_button_on_click(3)
</OnClick>
</Scripts> </Scripts>
</CheckButton> </CheckButton>
<Frame name="$parentStrategyDropDown" inherits="UIDropDownMenuTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-11" y="-180" /></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="Suggestion Based On">
<Anchors><Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="21" y="0"/></Offset></Anchor></Anchors>
</FontString>
<FontString name="$parentStaleWarning" inherits="GameFontRedSmall">
<Anchors><Anchor point="LEFT" relativePoint="RIGHT"><Offset><AbsDimension x="-6" y="3"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
UIDropDownMenu_SetWidth(100)
UIDropDownMenu_Initialize(this, Aux.sell.initialize_strategy_dropdown)
</OnLoad>
<OnShow>
UIDropDownMenu_Initialize(this, Aux.sell.initialize_strategy_dropdown)
</OnShow>
</Scripts>
</Frame>
<Frame name="$parentStartPrice" inherits="MoneyInputFrameTemplate"> <Frame name="$parentStartPrice" inherits="MoneyInputFrameTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="2" y="-94"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="12" y="-221"/></Offset></Anchor></Anchors>
<layers> <layers>
<Layer level="ARTWORK"> <Layer level="ARTWORK">
<FontString name="$parentText" inherits="GameFontHighlightSmall" text="STARTING_PRICE"> <FontString name="$parentText" inherits="GameFontNormalSmall" text="STARTING_PRICE">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="12"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="12"/></Offset></Anchor></Anchors>
</FontString> </FontString>
</Layer> </Layer>
@@ -505,10 +248,10 @@
</Scripts> </Scripts>
</Frame> </Frame>
<Frame name="$parentBuyoutPrice" inherits="MoneyInputFrameTemplate"> <Frame name="$parentBuyoutPrice" inherits="MoneyInputFrameTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="AuctionsBuyoutText" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="2" y="-2"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="12" y="-256"/></Offset></Anchor></Anchors>
<layers> <layers>
<Layer level="OVERLAY"> <Layer level="OVERLAY">
<FontString name="$parentText" inherits="GameFontHighlightSmall" text="Buyout Price |cff808080(optional)|r"> <FontString name="$parentText" inherits="GameFontNormalSmall" text="Buyout Price |cff808080(optional)|r">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="12"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="12"/></Offset></Anchor></Anchors>
</FontString> </FontString>
<FontString name="$parentErrorText" inherits="GameFontRedSmall" text="AUCTION_BUYOUT_ERROR"> <FontString name="$parentErrorText" inherits="GameFontRedSmall" text="AUCTION_BUYOUT_ERROR">
@@ -521,38 +264,69 @@
MoneyInputFrame_SetOnvalueChangedFunc(this, Aux.sell.validate_parameters) MoneyInputFrame_SetOnvalueChangedFunc(this, Aux.sell.validate_parameters)
</OnLoad> </OnLoad>
</Scripts> </Scripts>
</Frame>
<Frame name="$parentDepositMoneyFrame" inherits="SmallMoneyFrameTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="62" y="-295"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
SmallMoneyFrame_OnLoad();
MoneyFrame_SetType("AUCTION");
</OnLoad>
</Scripts>
<Layers>
<Layer level="BACKGROUND">
<FontString inherits="GameFontNormal" text="Deposit:">
<Anchors><Anchor point="RIGHT" relativePoint="LEFT"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame> </Frame>
</frames> </frames>
</frame> </frame>
<Frame name="AuxSellReport" frameStrata="FULLSCREEN_DIALOG" toplevel="true" parent="UIParent" enableMouse="true" hidden="true"> <Frame name="AuxSellAuctions" inherits="AuxFrameBoxTemplate">
<Size><AbsDimension x="400" y="180" /></Size> <Size><AbsDimension x="361" y="326"/></Size>
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="0" y="-90"/></Offset></Anchor></Anchors> <Anchors><Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxSellParameters"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<Backdrop bgFile="Interface\CharacterFrame\UI-Party-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true"> <OnLoad>
<BackgroundInsets><AbsInset left="11" right="12" top="12" bottom="11"/></BackgroundInsets> this:SetBackdropBorderColor(0.4, 0.4, 0.4)
<TileSize><AbsValue val="32"/></TileSize> this:SetBackdropColor(0.15, 0.15, 0.15)
<EdgeSize><AbsValue val="32"/></EdgeSize> getglobal(this:GetName().."Title"):SetText('Existing Auctions')
</Backdrop> </OnLoad>
</Scripts>
<Frames> <Frames>
<SimpleHTML name="AuxSellReportHTML"> <Frame name="$parentListing">
<Size><AbsDimension x="420" y="1" /></Size> <Anchors>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="30" y="-30"/></Offset></Anchor></Anchors> <Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor>
<FontString inherits="GameFontHighlightSmall"/> <Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-40" y="0"/></Offset></Anchor>
<FontStringHeader1 inherits="GameFontNormal"/> </Anchors>
</SimpleHTML> <Scripts>
<OnLoad>
<Button inherits="UIPanelButtonTemplate" text="Close"> local config = Aux.sell.auction_listing_config
<Size><AbsDimension x="100" y="22"/> </Size> local sort_order = Aux.util.map(config.sort_order, function(column_order) return { column = config.columns[column_order.column], sort_ascending = column_order.order == 'ascending' } end)
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-20" y="15"/></Offset></Anchor></Anchors> this.sheet = Aux.sheet.create(this, config.columns, sort_order, config.row_setter, config.on_cell_click, config.on_cell_enter, config.on_cell_leave)
<Scripts> </OnLoad>
<OnClick> </Scripts>
AuxSellReport:Hide() </Frame>
</OnClick> </Frames>
</Scripts> </Frame>
</Button> <Button name="AuxSellRefreshButton" inherits="UIPanelButtonTemplate" text="Refresh">
</Frames> <Size><AbsDimension x="90" y="26"/></Size>
</Frame> <Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxCloseButtonBottom"><Offset><AbsDimension x="-25" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
AuxSellRefreshButton_OnClick()
</OnClick>
</Scripts>
</Button>
<Button name="AuxSellPostButton" inherits="UIPanelButtonTemplate" text="Post Auctions">
<Size><AbsDimension x="120" y="26"/></Size>
<Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxSellRefreshButton"><Offset><AbsDimension x="-5" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
Aux.sell.post_auctions()
</OnClick>
</Scripts>
</Button>
</Frames> </Frames>
</Frame> </Frame>
</Ui> </Ui>
+3 -23
View File
@@ -10,30 +10,10 @@ end)()
local state local state
local inventory, item_slots, find_empty_slot, locked, same_slot, move_item, item_name, stack_size, stop, process local item_slots, find_empty_slot, locked, same_slot, move_item, item_name, stack_size, stop, process
function inventory()
local inventory = {}
for bag = 0, 4 do
if GetBagName(bag) then
for bag_slot = 1, GetContainerNumSlots(bag) do
tinsert(inventory, { bag = bag, bag_slot = bag_slot })
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 item_slots(name) function item_slots(name)
local slots = inventory() local slots = Aux.util.inventory_iterator()
return function() return function()
repeat repeat
slot = slots() slot = slots()
@@ -43,7 +23,7 @@ function item_slots(name)
end end
function find_empty_slot() function find_empty_slot()
for slot in inventory() do for slot in Aux.util.inventory_iterator() do
if not GetContainerItemInfo(slot.bag, slot.bag_slot) then if not GetContainerItemInfo(slot.bag, slot.bag_slot) then
return slot return slot
end end
+56
View File
@@ -9,6 +9,62 @@ local merge, copy_array
function Aux.util.pass() function Aux.util.pass()
end end
function Aux.util.inventory_iterator()
local inventory = {}
for bag = 0, 4 do
if GetBagName(bag) then
for bag_slot = 1, GetContainerNumSlots(bag) do
tinsert(inventory, { bag = bag, bag_slot = bag_slot })
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 Aux.util.safe_index(chain)
local target = chain[1]
for i=2,getn(chain) do
if not target then
return
end
target = target[chain[i]]
end
return target
end
function Aux_PluralizeIf(word, count)
if count and count == 1 then
return word
else
return word.."s"
end
end
function Aux.util.without_sound(f)
local orig = UIErrorsFrame.AddMessage
UIErrorsFrame.AddMessage = Aux.util.pass
f()
UIErrorsFrame.AddMessage = orig
end
function Aux.util.without_errors(f)
local orig = GetCVar('MasterSoundEffects')
SetCVar('MasterSoundEffects', false)
f()
SetCVar('MasterSoundEffects', orig)
end
function Aux.util.iter(array) function Aux.util.iter(array)
local with_index = ipairs(array) local with_index = ipairs(array)
return function() return function()