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"?>
<project version="4">
<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.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$/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>
<ignored path="Aux-Addon.iws" />
<ignored path=".idea/workspace.xml" />
@@ -66,11 +78,11 @@
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="core.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/core.lua">
<file leaf-file-name="util.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/util.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" />
<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>
@@ -79,78 +91,38 @@
<file leaf-file-name="info.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/info.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="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" />
<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>
</file>
<file leaf-file-name="scan.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/scan.lua">
<file leaf-file-name="post.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/post.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" />
<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>
</file>
<file leaf-file-name="buy.lua" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/buy.lua">
<file leaf-file-name="stack.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/stack.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6960894" vertical-offset="13674" max-vertical-offset="15232">
<caret line="841" column="27" selection-start-line="841" selection-start-column="27" selection-end-line="841" selection-end-column="27" />
<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>
</file>
<file leaf-file-name="util.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/util.lua">
<file leaf-file-name="core.lua" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/core.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1564" 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>
</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" />
<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>
@@ -159,8 +131,48 @@
<file leaf-file-name="core.xml" pinned="false" current="false" current-in-tab="false">
<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" />
<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>
</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 />
</state>
</provider>
@@ -179,17 +191,19 @@
<component name="IdeDocumentHistory">
<option name="changedFiles">
<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$/util.lua" />
<option value="$PROJECT_DIR$/stack.lua" />
<option value="$PROJECT_DIR$/sell.lua" />
<option value="$PROJECT_DIR$/core.xml" />
<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" />
<option value="$PROJECT_DIR$/.gitignore" />
</list>
</option>
</component>
@@ -226,7 +240,6 @@
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
@@ -247,6 +260,7 @@
</PATH>
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
@@ -256,12 +270,6 @@
<property name="MemberChooser.sorted" value="false" />
<property name="MemberChooser.showClasses" value="true" />
<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 name="RunManager">
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
@@ -270,6 +278,27 @@
<option name="PROGRAM_PARAMETERS" />
<method />
</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">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
@@ -352,6 +381,38 @@
<patterns />
<method />
</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" />
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
@@ -359,14 +420,11 @@
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false" />
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="3c1af1d3-ae57-470d-8daa-a9295703c6fc" name="Default" comment="" />
<created>1445044678361</created>
<updated>1445044678361</updated>
<changelist id="231796f5-1261-4550-a370-a9bf34182237" name="Default" comment="" />
<created>1445635607102</created>
<updated>1445635607102</updated>
</task>
<servers />
</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="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="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="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="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="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="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="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="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="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="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>
</component>
<component name="Vcs.Log.UiProperties">
@@ -419,194 +477,209 @@
<breakpoint-manager />
</component>
<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">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0" vertical-offset="1564" 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" />
<state vertical-scroll-proportion="0.0" vertical-offset="121" max-vertical-offset="5032">
<caret line="32" column="0" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
<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="4386" max-vertical-offset="4624">
<caret line="258" column="8" selection-start-line="258" selection-start-column="8" selection-end-line="258" selection-end-column="8" />
<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$/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>
<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" />
<state vertical-scroll-proportion="0.0" vertical-offset="3339" max-vertical-offset="5627">
<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$/sell.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-3.0" vertical-offset="3520" max-vertical-offset="10353">
<caret line="212" column="12" selection-start-line="212" selection-start-column="12" selection-end-line="212" selection-end-column="12" />
<state vertical-scroll-proportion="0.0" vertical-offset="6274" max-vertical-offset="12206">
<caret line="398" column="81" selection-start-line="398" selection-start-column="81" selection-end-line="398" selection-end-column="81" />
<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="3672" max-vertical-offset="6579">
<caret line="237" column="0" selection-start-line="237" selection-start-column="0" selection-end-line="249" selection-end-column="34" />
<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" />
<state vertical-scroll-proportion="0.0" vertical-offset="68" 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.lua">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6960894" vertical-offset="13674" max-vertical-offset="15232">
<caret line="841" column="27" selection-start-line="841" selection-start-column="27" selection-end-line="841" selection-end-column="27" />
<state vertical-scroll-proportion="0.0" vertical-offset="7742" max-vertical-offset="15147">
<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 />
</state>
</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 auctions
local selectedAuctions = {}
local search_query
local tooltip_patterns = {}
local current_page
@@ -426,23 +425,21 @@ Aux.buy.modes = {
},
}
function Aux.buy.exit()
Aux.buy.dialog_cancel()
function Aux.buy.on_close()
if AuxBuyConfirmation:IsVisible() then
Aux.buy.dialog_cancel()
end
current_page = nil
end
function Aux.buy.on_open()
AuxBuySearchButton:Show()
AuxBuyStopButton:Hide()
update_sheet()
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()
Aux.log('Canceled.')
Aux.scan.abort()
AuxBuyConfirmation:Hide()
update_sheet()
@@ -495,7 +492,6 @@ function Aux.buy.SearchButton_onclick()
AuxBuyStopButton:Show()
auctions = nil
selectedAuctions = {}
refresh = true
@@ -513,18 +509,16 @@ function Aux.buy.SearchButton_onclick()
usable = AuxBuyUsableCheckButton:GetChecked()
}
Aux.log('Starting scan')
Aux.log('Scanning auctions ...')
Aux.scan.start{
query = search_query,
page = AuxBuyAllPagesCheckButton:GetChecked() and 0 or AuxBuyPageEditBox:GetNumber(),
on_submit_query = function()
current_page = nil
end,
on_page_loaded = function(page)
current_page = page
end,
on_start_page = function(page, total_pages)
Aux.log('Scanning page ' .. page + 1 .. (total_pages > 0 and ' out of ' .. total_pages or ''))
on_page_loaded = function(page, total_pages)
Aux.log('Scanning page '..(page+1)..' out of '..total_pages..' ...')
current_page = page
end,
on_read_auction = function(i)
local auction_item = Aux.info.auction_item(i)
@@ -537,14 +531,15 @@ function Aux.buy.SearchButton_onclick()
end,
on_complete = function()
auctions = auctions or {}
Aux.log('Scan completed: '..getn(auctions)..' auctions found')
AuxBuyStopButton:Hide()
Aux.log('Scan complete: '..getn(auctions)..' '..Aux_PluralizeIf('auction', getn(auctions))..' found.')
AuxBuyStopButton:Hide()
AuxBuySearchButton:Show()
refresh = true
end,
on_abort = function()
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()
AuxBuySearchButton:Show()
refresh = true
@@ -565,8 +560,8 @@ function show_dialog(buyout_mode, entry, amount)
AuxBuyConfirmation.EnhTooltip_info = entry.EnhTooltip_info
AuxBuyConfirmationActionButton:Disable()
AuxBuyConfirmationItem:SetNormalTexture(entry.texture)
AuxBuyConfirmationItemName:SetText(entry.name)
AuxBuyConfirmationItemIconTexture:SetTexture(entry.texture)
AuxBuyConfirmationItemName:SetText(entry.tooltip[1][1].text)
local color = ITEM_QUALITY_COLORS[entry.quality]
AuxBuyConfirmationItemName:SetTextColor(color.r, color.g, color.b)
@@ -587,7 +582,6 @@ function show_dialog(buyout_mode, entry, amount)
AuxBuyConfirmationBuyoutPrice:Hide()
AuxBuyConfirmationBid:Show()
end
hide_sheet()
AuxBuyConfirmation:Show()
end
@@ -603,16 +597,16 @@ function find_auction(entry, buyout_mode, express_mode)
return
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()
local amount
if buyout_mode then
amount = entry.buyout_price
else
amount = entry.bid
end
if not express_mode then
show_dialog(buyout_mode, entry, amount)
end
@@ -645,23 +639,23 @@ function find_auction(entry, buyout_mode, express_mode)
if entry.signature == signature then
ctrl.suspend()
found = true
Aux.log('Matching auction found')
Aux.log('Matching auction found.'..(express_mode and '' or ' Awaiting confirmation ...'))
if express_mode then
if GetMoney() >= amount then
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
refresh = true
else
Aux.log('Not enough money.')
Aux.log((buyout_mode and 'Purchase' or 'Bid')..' failed: Not enough money.')
end
Aux.scan.abort()
else
Aux.buy.dialog_action = function()
if GetMoney() >= amount then
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
refresh = true
else
@@ -678,6 +672,7 @@ function find_auction(entry, buyout_mode, express_mode)
end,
on_complete = function()
if not found then
Aux.log('No matching auction found. Removing entry from the cache.')
entry.gone = true
refresh = true
Aux.buy.dialog_cancel()
@@ -723,7 +718,7 @@ function create_auction_record(auction_item, current_page)
elseif auction_item.high_bidder then
status = GREEN_FONT_COLOR_CODE..'Your Bid'..FONT_COLOR_CODE_CLOSE
else
status = RED_FONT_COLOR_CODE .. 'Other Bidder'..FONT_COLOR_CODE_CLOSE
status = RED_FONT_COLOR_CODE..'Other Bidder'..FONT_COLOR_CODE_CLOSE
end
return {
@@ -831,7 +826,7 @@ function AuxBuyQualityDropDown_Initialize()
end
UIDropDownMenu_AddButton{
text = ALL,
text = 'All',
value = -1,
func = on_click,
}
+401 -406
View File
@@ -39,66 +39,22 @@
<TexCoords left="0" right="1.0" top="0" bottom="0.578125"/>
</HighlightTexture>
</Button>
<Frame name="AuxBuyTemplate" virtual="true" hidden="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>
<Frame name="AuxBuyFrame" hidden="true" parent="AuxFrame" setAllPoints="true">
<Frames>
<Frame name="AuxBuyBuyList" hidden="true">
<Size><AbsDimension x="615" y="326"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="179" y="-94"/></Offset></Anchor></Anchors>
<Frame name="AuxBuyFilters" inherits="AuxFrameBoxTemplate">
<Size><AbsDimension x="180" y="326"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="-35"/></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].on_cell_click, Aux.buy.modes[1].on_cell_enter, Aux.buy.modes[1].on_cell_leave)
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
this:SetBackdropColor(0.15, 0.15, 0.15)
getglobal(this:GetName().."Title"):SetText('Filters')
</OnLoad>
</Scripts>
</Frame>
<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>
<Frames>
<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>
<OnLoad>
UIDropDownMenu_SetWidth(140)
@@ -110,225 +66,224 @@
</OnShow>
</Scripts>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Mode" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="20" y="8"/></Offset></Anchor></Anchors>
<Layer level="BACKGROUND">
<FontString name="$parentLabel" inherits="GameFontNormalSmall" text="Mode">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="21" y="0"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<EditBox name="AuxBuyNameInputBox" autoFocus="false" inherits="InputBoxTemplate">
<Size><AbsDimension x="119" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="1" y="-56"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Name" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="9"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
this.completor = Aux.completion.completor(this)
</OnLoad>
<OnTextChanged>
this.completor.suggest()
</OnTextChanged>
<OnTabPressed>
if IsShiftKeyDown() then
this.completor.previous()
else
this.completor.next()
end
</OnTabPressed>
<OnEnterPressed>
this.completor.close()
this:ClearFocus()
Aux.buy.SearchButton_onclick()
</OnEnterPressed>
<OnEscapePressed>
if this.completor.open() then
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>
<EditBox name="AuxBuyNameInputBox" autoFocus="false" inherits="AuxInputBoxTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="16" y="-71"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName()..'Label'):SetText('Name')
this.completor = Aux.completion.completor(this)
</OnLoad>
<OnTextChanged>
this.completor.suggest()
</OnTextChanged>
<OnTabPressed>
if IsShiftKeyDown() then
this.completor.previous()
else
this.completor.next()
end
</OnTabPressed>
<OnEnterPressed>
this.completor.close()
this:ClearFocus()
Aux.buy.SearchButton_onclick()
</OnEnterPressed>
<OnEscapePressed>
if this.completor.open() then
this.completor.close()
else
this:ClearFocus()
end
</OnEscapePressed>
</Scripts>
</EditBox>
<Frame name="AuxBuyQualityDropDown" inherits="UIDropDownMenuTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-23" y="-128" /></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="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>
<CheckButton name="AuxBuyExactCheckButton" inherits="UICheckButtonTemplate" checked="true">
<Size><AbsDimension x="22" y="22"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="138" y="-71" /></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontHighlightSmall" text="Page" justifyH="LEFT">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="-3" y="9"/></Offset></Anchor></Anchors>
<FontString inherits="GameFontNormalSmall" 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="-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>
</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">
<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:SetAlpha(0.5)
</OnLoad>
@@ -339,10 +294,10 @@
</EditBox>
<CheckButton name="AuxBuyAllPagesCheckButton" inherits="UICheckButtonTemplate" checked="true">
<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>
<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>
</FontString>
</Layer>
@@ -355,151 +310,191 @@
</OnClick>
</Scripts>
</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>
</Frame>
<Button name="AuxBuySearchButton" inherits="UIPanelButtonTemplate" text="Search">
<Size><AbsDimension x="166" y="22"/></Size>
<Anchors>
<Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="51" y="14"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnClick>
Aux.buy.SearchButton_onclick()
</OnClick>
</Scripts>
</Button>
<Button name="AuxBuyStopButton" inherits="UIPanelButtonTemplate" text="Stop" hidden="true">
<Size><AbsDimension x="166" y="22"/></Size>
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="51" y="14"/></Offset></Anchor>
</Anchors>
<Scripts>
<OnClick>
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>
</Frame>
<Button name="AuxBuySearchButton" inherits="UIPanelButtonTemplate" text="Search">
<Size><AbsDimension x="90" y="26"/></Size>
<Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxCloseButtonBottom"><Offset><AbsDimension x="-25" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
Aux.buy.SearchButton_onclick()
</OnClick>
</Scripts>
</Button>
<Button name="AuxBuyStopButton" inherits="UIPanelButtonTemplate" text="Stop" hidden="true">
<Size><AbsDimension x="90" y="26"/></Size>
<Anchors><Anchor point="RIGHT" relativePoint="LEFT" relativeTo="AuxCloseButtonBottom"><Offset><AbsDimension x="-25" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
Aux.buy.StopButton_onclick()
</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
</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)"
local lastRightClickAction = GetTime()
@@ -8,29 +8,21 @@ Aux = {
orig = {},
elements = {},
tabs = {
sell = {
index = 4
},
buy = {
browse = {
index = 1
}
},
post = {
index = 2
},
},
last_picked_up = {},
}
-----------------------------------------
local relevel
-----------------------------------------
function Aux_OnLoad()
Aux.log("Aux v"..AuxVersion.." loaded")
Aux.log('Aux v'..AuxVersion..' loaded.')
Aux.loaded = true
end
-----------------------------------------
function Aux_OnEvent()
if event == "VARIABLES_LOADED" then
Aux_OnLoad()
@@ -43,62 +35,17 @@ function Aux_OnEvent()
end
end
-----------------------------------------
function Aux_OnAddonLoaded()
if string.lower(arg1) == "blizzard_auctionui" then
Aux_AddTabs()
Aux_AddPanels()
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,
}
AuxButton:SetParent("AuctionFrame")
AuxButton:SetPoint("TOPRIGHT", "AuctionFrame", "TOPRIGHT", -26, -12)
Aux.tabs.sell.recommendationElements = {
AuxRecommendText,
AuxRecommendPerItemText,
AuxRecommendPerItemPrice,
AuxRecommendPerStackText,
AuxRecommendPerStackPrice,
AuxRecommendBasisText,
AuxRecommendItemTex,
}
Aux_SetupHookFunctions()
end
end
function Aux.log_frame_load()
this:SetFading(false)
this:EnableMouseWheel()
-- this.flashTimer = 0 TODO remove
end
@@ -108,7 +55,7 @@ function Aux.log_frame_update(elapsedSec)
return
end
local flash = getglobal(this:GetName().."BottomButtonFlash")
local flash = getglobal(this:GetName()..'BottomButtonFlash')
if not flash then
return
@@ -140,21 +87,15 @@ function Aux.log_frame_update(elapsedSec)
end
function Aux.log(msg)
local info = ChatTypeInfo["SYSTEM"]
AuxLogFrame:AddMessage(msg, 1, 1, 0)
if not AuxLogFrame:IsVisible() and DEFAULT_CHAT_FRAME then
local info = ChatTypeInfo['SYSTEM']
AuxLogFrameMessageFrame:AddMessage(msg, 1, 1, 0)
if not AuxLogFrameMessageFrame:IsVisible() and DEFAULT_CHAT_FRAME then
DEFAULT_CHAT_FRAME:AddMessage(msg, 1, 1, 0)
end
end
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:SetScript("OnMouseDown", Aux_AuctionsButton_OnMouseDown)
AuctionsButton2:RegisterForClicks("LeftButtonUp", "RightButtonDown")
@@ -173,255 +114,84 @@ function Aux_SetupHookFunctions()
AuctionsButton8:SetScript("OnMouseDown", Aux_AuctionsButton_OnMouseDown)
AuctionsButton9:RegisterForClicks("LeftButtonUp", "RightButtonDown")
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
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
ContainerFrameItemButton_OnClick = Aux_ContainerFrameItemButton_OnClick
Aux.orig.AuctionFrameBid_Update = AuctionFrameBid_Update
AuctionFrameBid_Update = Aux_AuctionFrameBid_Update
Aux.orig.AuctionFrameAuctions_Update = AuctionFrameAuctions_Update
AuctionFrameAuctions_Update = Aux_AuctionFrameAuctions_Update
Aux.orig.AuctionFrameAuctions_OnEvent = AuctionFrameAuctions_OnEvent
AuctionFrameAuctions_OnEvent = Aux.AuctionFrameAuctions_OnEvent
end
-----------------------------------------
function Aux.AuctionFrameAuctions_OnEvent()
if AuctionFrameAuctions:IsVisible() then
Aux.orig.AuctionFrameAuctions_OnEvent()
end
end
function Aux_OnAuctionHouseShow()
AuxOptionsButtonPanel:Show()
AuxButton:Show()
AuxFrame:Show()
Aux.on_tab_click(1)
if AUX_OPEN_SELL then
AuctionFrameTab_OnClick(Aux.tabs.sell.index)
Aux.on_tab_click(2)
elseif AUX_OPEN_BUY then
-- AuctionFrameTab_OnClick(Aux.tabs.buy.index)
end
end
-----------------------------------------
function Aux_OnAuctionHouseClosed()
Aux.post.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()
AuxSellPanel:Hide()
AuxBuyPanel:Hide()
if index == 2 then
Aux_ShowElems(Aux.tabs.buy.hiddenElements)
end
Aux.buy.on_close()
Aux.sell.on_close()
if index == 3 then
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
AuxFrame:Hide()
end
function Aux_AddPanels()
local sellFrame = CreateFrame("Frame", "AuxSellPanel", AuctionFrame, "AuxSellTemplate")
sellFrame:SetParent("AuctionFrame")
sellFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
relevel(sellFrame)
sellFrame:Hide()
local buyFrame = CreateFrame("Frame", "AuxBuyPanel", AuctionFrame, "AuxBuyTemplate")
buyFrame:SetParent("AuctionFrame")
buyFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
AuxLogFrame:SetParent(buyFrame)
AuxLogFrame:SetPoint('TOP', buyFrame, 100, -43)
relevel(buyFrame)
buyFrame:Hide()
local optionsFrame = CreateFrame("Frame", "AuxOptionsButtonPanel", AuctionFrame, "AuxOptionsButtonTemplate")
optionsFrame:SetParent("AuctionFrame")
optionsFrame:SetPoint("TOPLEFT", "AuctionFrame", "TOPLEFT")
relevel(optionsFrame)
optionsFrame:Hide()
function Aux.on_tab_click(index)
Aux.post.stop()
Aux.stack.stop()
Aux.scan.abort()
Aux.buy.on_close()
Aux.sell.on_close()
for i=1,5 do
getglobal('AuxTab'..i):SetAlpha(i == index and 1 or 0.5)
end
AuxSellFrame:Hide()
AuxBuyFrame:Hide()
if index == 1 then
AuxBuyFrame:Show()
Aux.buy.on_open()
elseif index == 2 then
AuxSellFrame:Show()
Aux.sell.on_open()
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)
return math.floor(v + 0.5)
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)
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_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()
if arg1 == "RightButton" and GetTime() - lastRightClickAction > 0.5 then
local index = this:GetID() + FauxScrollFrame_GetOffset(AuctionsScrollFrame)
@@ -435,15 +205,11 @@ function Aux_AuctionsButton_OnMouseDown()
end
end
-----------------------------------------
function Aux.PickupContainerItem(bag, item)
Aux.last_picked_up = { bag=bag, slot=item }
return Aux.orig.PickupContainerItem(bag, item)
end
-----------------------------------------
function Aux_ContainerFrameItemButton_OnClick(button)
local bag, slot = this:GetParent():GetID(), this:GetID()
local container_item = Aux.info.container_item(bag, slot)
@@ -452,21 +218,13 @@ function Aux_ContainerFrameItemButton_OnClick(button)
if IsShiftKeyDown()
and not ChatFrameEditBox:IsVisible()
and (PanelTemplates_GetSelectedTab(AuctionFrame) == 1 or PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.buy.index)
and AuxBuyFrame:IsVisible()
then
if PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.buy.index then
AuxBuyNameInputBox.completor.set_quietly(container_item.name)
end
AuxBuyNameInputBox.completor.set_quietly(container_item.name)
return
elseif AUX_SELL_SHORTCUT and IsAltKeyDown()then
Aux.sell.set_auction(bag, slot)
if PanelTemplates_GetSelectedTab(AuctionFrame) ~= Aux.tabs.sell.index then
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)
elseif AUX_BUY_SHORTCUT and IsAltKeyDown() then
if not AuxBuyFrame:IsVisible() then
Aux.on_tab_click(1)
end
AuxBuyNameInputBox.completor.set_quietly(container_item.name)
Aux.buy.SearchButton_onclick()
@@ -476,8 +234,6 @@ function Aux_ContainerFrameItemButton_OnClick(button)
return Aux.orig.ContainerFrameItemButton_OnClick(button)
end
-----------------------------------------
function Aux_QualityColor(code)
if code == 0 then
return "ff9d9d9d" -- poor, gray
@@ -494,8 +250,6 @@ function Aux_QualityColor(code)
end
end
-----------------------------------------
function Aux.auction_signature(hyperlink, stack_size, amount)
return hyperlink .. (stack_size or '0') .. '_' .. (amount or '0')
end
+334 -45
View File
@@ -16,64 +16,161 @@
</Scripts>
</Frame>
<ScrollingMessageFrame name="AuxLogFrame" hidden="false" maxLines="500">
<Size><AbsDimension x="400" y="45"/></Size>
<Button name="AuxTabTemplate" virtual="true">
<Size>
<AbsDimension x="64" y="32"/>
</Size>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentLeft" file="Interface\AuctionFrame\UI-AuctionItemNameFrame" hidden="true">
<Size><AbsDimension x="10" y="60"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="-3" y="-4"/></Offset></Anchor></Anchors>
<TexCoords left="0" right="0.078125" top="0" bottom="1.0"/>
</Texture>
<Texture name="$parentRight" file="Interface\AuctionFrame\UI-AuctionItemNameFrame" hidden="true">
<Size><AbsDimension x="10" y="60"/></Size>
<Anchors><Anchor point="RIGHT"><Offset><AbsDimension x="0" y="-4"/></Offset></Anchor>
<Texture name="$parentLeft" file="Interface\ChatFrame\ChatFrameTab">
<Size>
<AbsDimension x="16" y="32"/>
</Size>
<Anchors>
<Anchor point="LEFT"/>
</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 name="$parentMiddle" file="Interface\AuctionFrame\UI-AuctionItemNameFrame" hidden="true">
<Size><AbsDimension x="10" y="60"/></Size>
<Texture name="$parentRight" file="Interface\ChatFrame\ChatFrameTab">
<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>
<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"/>
<TexCoords left="0.25" right="0.75" top="0.0" bottom="1.0"/>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
Aux.log_frame_load()
</OnLoad>
<OnUpdate>
Aux.log_frame_update(arg1)
</OnUpdate>
<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>
<OnShow>
this:SetWidth(getglobal(this:GetName()..'Text'):GetStringWidth()+40)
</OnShow>
<OnClick>
Aux.on_tab_click(this:GetID())
</OnClick>
</Scripts>
<FontString inherits="ChatFontNormal" justifyH="CENTER"/>
</ScrollingMessageFrame>
<Slider name="AuxSliderTemplate" orientation="HORIZONTAL" virtual="true" enableMouse="true">
<NormalText name="$parentText" inherits="GameFontNormalSmall">
<Size>
<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>
<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>
<HitRectInsets>
<AbsInset left="0" right="0" top="-10" bottom="-10"/>
@@ -91,7 +188,7 @@
</Backdrop>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentText" inherits="GameFontHighlightSmall">
<FontString name="$parentText" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"/>
</Anchors>
@@ -104,4 +201,196 @@
</Size>
</ThumbTexture>
</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>
+22 -8
View File
@@ -2,7 +2,7 @@ local TOOLTIP_LENGTH = 30
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)
local hyperlink = GetContainerItemLink(bag, slot)
@@ -12,15 +12,16 @@ function Aux.info.container_item(bag, slot)
end
local container_item = hyperlink_item(hyperlink)
local texture, count, locked, quality, readable, lootable, hyperlink = GetContainerItemInfo(bag, slot)
container_item.item_signature = item_signature(hyperlink)
local texture, count, locked, quality, readable, lootable = GetContainerItemInfo(bag, slot)
container_item.texture = texture
container_item.count = count
container_item.locked = locked
container_item.readable = readable
container_item.lootable = lootable
container_item.hyperlink = hyperlink
container_item.tooltip = Aux.info.tooltip(function(tt) tt:SetBagItem(bag, slot) end)
container_item.charges = item_charges(container_item.tooltip)
@@ -32,8 +33,7 @@ function Aux.info.auction_sell_item()
if name then
local deposit_factor = CalculateAuctionDeposit(120) / vendor_price
local vendor_price_per_unit = vendor_price / stack_size
local unit_vendor_price = vendor_price / stack_size
auction_sell_item = {
name = name,
@@ -41,8 +41,7 @@ function Aux.info.auction_sell_item()
stack_size = stack_size,
quality = quality,
usable = usable,
vendor_price_per_unit = vendor_price_per_unit,
vendor_price = vendor_price,
unit_vendor_price = unit_vendor_price,
deposit_factor = deposit_factor,
}
@@ -154,11 +153,26 @@ function item_charges(tooltip)
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)
local _, _, id_string = strfind(hyperlink, "^.-:(%d*).*")
return tonumber(id_string)
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)
local name, itemstring, quality, level, type, subtype, max_stack = GetItemInfo(item_id(hyperlink))
return {
+5 -1
View File
@@ -44,6 +44,9 @@ function Aux.sheet.render(sheet)
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 datum = data[i + offset]
if sheet.row_setter then
sheet.row_setter(row, datum)
end
for j, column in sheet.columns do
local cell = row[j]
if datum then
@@ -57,7 +60,7 @@ function Aux.sheet.render(sheet)
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 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,
data = {},
sort_order = sort_order,
row_setter = row_setter,
on_cell_click = on_cell_click,
on_cell_enter = on_cell_enter,
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>
<Scripts>
<OnClick>
Aux.options.show()
if AuxFrame:IsVisible() then
AuxFrame:Hide()
else
AuxFrame:Show()
end
</OnClick>
</Scripts>
</Button>
+12 -12
View File
@@ -65,9 +65,12 @@ function wait_for_complete_results(k)
end, k)
end
function wait_for_callback(f, args, k)
function wait_for_callback(args)
local ok = true
local f = tremove(args, 1)
local k = tremove(args)
if f then
tinsert(args, {
suspend = function() ok = false end,
@@ -87,12 +90,10 @@ function scan()
submit_query(function()
local count, total_count = GetNumAuctionItems("list")
local count, _ = GetNumAuctionItems('list')
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)
if state.page then
@@ -112,7 +113,7 @@ function scan_auctions(count, k)
end
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
return k()
@@ -120,23 +121,22 @@ function scan_auctions_helper(i, n, k)
return scan_auctions_helper(i + 1, n, k)
end
end)
end}
end
function submit_query(k)
if state.page then
wait_for_callback(state.job.on_start_page, {state.page, state.total_pages or 0}, function()
controller().wait(CanSendAuctionQuery, function()
if state.job.on_submit_query then
state.job.on_submit_query()
end
wait_for_results(function()
--wait_for_complete_results(function()
if state.job.on_page_loaded then
state.job.on_page_loaded(state.page)
end
local _, total_count = GetNumAuctionItems('list')
state.total_pages = math.ceil(total_count / AUCTIONS_PER_PAGE)
wait_for_callback{state.job.on_page_loaded, state.page, state.total_pages, function()
k()
end)--end)
end}end)-- end)
QueryAuctionItems(
state.job.query.name,
state.job.query.min_level,
@@ -148,7 +148,7 @@ function submit_query(k)
state.job.query.usable,
state.job.query.quality
)
end)end)
end)
else
return k()
end
+407 -282
View File
@@ -2,24 +2,224 @@ Aux.sell = {}
auxSellEntries = {} -- persisted
-----------------------------------------
local inventory_data
local bestPriceOurStackSize
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()
UIDropDownMenu_SetSelectedValue(AuxSellParametersStrategyDropDown, LIVE)
Aux_Sell_SetAuctionDuration(AUX_AUCTION_DURATION)
AuxSellStackSizeSlider:SetValueStep(1)
AuxSellStackSizeSliderText:SetText('Stack Size')
AuxSellStackCountSlider:SetValueStep(1)
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()
update_inventory_data()
update_inventory_listing()
update_auction_listing()
end
function Aux.sell.on_close()
end
function Aux.sell.duration_radio_button_on_click(index)
@@ -42,13 +242,6 @@ function Aux.sell.duration_radio_button_on_click(index)
update_recommendation()
end
function Aux_Sell_AuctionFrameAuctions_OnShow()
Aux.orig.AuctionFrameAuctions_OnShow()
Aux_Sell_SetAuctionDuration(AUX_AUCTION_DURATION)
end
-----------------------------------------
function Aux_Sell_SetAuctionDuration(duration)
if duration == 'short' then
Aux.sell.duration_radio_button_on_click(1)
@@ -59,20 +252,9 @@ function Aux_Sell_SetAuctionDuration(duration)
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()
if current_auction and PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.sell.index then
local name, stack_size, buyout_price, stack_count = current_auction.name, get_stack_size_slider_value(), MoneyInputFrame_GetCopper(AuxSellParametersBuyoutPrice), AuxSellStackCountSlider:GetValue()
if current_auction then
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
if AuctionFrameAuctions.duration == 120 then
duration = 2
@@ -101,45 +283,28 @@ function Aux.sell.post_auctions()
end
end
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
)
else
Aux.orig.AuctionsCreateAuctionButton_OnClick()
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()
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
----- find the best price per stacksize and overall -----
for _,auxEntry in ipairs(auxSellEntries[current_auction.name]) do
if not bestPrice[auxEntry.stackSize] or bestPrice[auxEntry.stackSize].itemPrice >= auxEntry.itemPrice then
bestPrice[auxEntry.stackSize] = auxEntry
for _, auction_datum in ipairs(auxSellEntries[current_auction.name]) do
if not bestPrice[auction_datum.stack_size] or bestPrice[auction_datum.stack_size].unit_buyout_price >= auction_datum.unit_buyout_price then
bestPrice[auction_datum.stack_size] = auction_datum
end
if not absoluteBest or absoluteBest.itemPrice > auxEntry.itemPrice then
absoluteBest = auxEntry
if not absoluteBest or absoluteBest.unit_buyout_price > auction_datum.unit_buyout_price then
absoluteBest = auction_datum
end
end
@@ -152,10 +317,8 @@ function select_entry()
end
end
-----------------------------------------
function get_stack_size_slider_value()
if current_auction.has_charges then
if current_auction.charges then
return AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider:GetValue()]
else
return AuxSellStackSizeSlider:GetValue()
@@ -183,14 +346,14 @@ function Aux.sell.validate_parameters()
end
function update_recommendation()
AuxRecommendStaleText:Hide()
AuxSellParametersStrategyDropDownStaleWarning:SetText()
if not current_auction then
AuxSellRefreshButton:Disable()
AuxSellItem:SetNormalTexture(nil)
AuxSellItemName:SetText()
AuxSellItemCount:SetText()
AuxSellParametersItemIconTexture:SetTexture(nil)
AuxSellParametersItemCount:SetText()
AuxSellParametersItemName:SetText()
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0)
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 0)
@@ -199,81 +362,75 @@ function update_recommendation()
AuxSellStackSize:SetNumber(0)
AuxSellStackCountSlider:SetMinMaxValues(0,0)
AuxSellStackCount:SetNumber(0)
set_message("Drag an item to the Auction Item area\n\nto see recommended pricing information")
else
AuxSellStackSize:SetNumber(AuxSellStackSizeSlider:GetValue())
AuxSellStackSize:SetNumber(current_auction.charges and AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider:GetValue()] or AuxSellStackSizeSlider:GetValue())
AuxSellStackCount:SetNumber(AuxSellStackCountSlider:GetValue())
AuxSellItem:SetNormalTexture(current_auction.texture)
AuxSellItemName:SetText(current_auction.name)
if get_stack_size_slider_value() > 1 then
AuxSellItemCount:SetText(get_stack_size_slider_value())
AuxSellItemCount:Show()
AuxSellParametersItemIconTexture:SetTexture(current_auction.texture)
AuxSellParametersItemName:SetText(current_auction.name)
local color = ITEM_QUALITY_COLORS[current_auction.quality]
AuxSellParametersItemName:SetTextColor(color.r, color.g, color.b)
if current_auction.aux_quantity > 1 then
AuxSellParametersItemCount:SetText(current_auction.aux_quantity)
else
AuxSellItemCount:Hide()
AuxSellParametersItemCount:SetText()
end
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 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
AuxRecommendStaleText:Show()
AuxSellParametersStrategyDropDownStaleWarning:SetText('Stale data!') -- data older than half an hour marked as stale
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)
end
local newStartPrice = newBuyoutPrice * 0.95
AuxMessage:Hide()
Aux_ShowElems(Aux.tabs.sell.recommendationElements)
-- Aux_ShowElems(Aux.tabs.sell.recommendationElements)
AuxRecommendText:SetText("Recommended Buyout Price")
AuxRecommendPerStackText:SetText("for a stack of "..get_stack_size_slider_value())
-- AuxRecommendText:SetText("Recommended Buyout Price")
-- AuxRecommendPerStackText:SetText("for a stack of "..get_stack_size_slider_value())
AuxRecommendItemTex:SetNormalTexture(current_auction.texture)
if AuxSellStackSize:GetNumber() > 1 then
AuxRecommendItemTexCount:SetText(get_stack_size_slider_value())
AuxRecommendItemTexCount:Show()
else
AuxRecommendItemTexCount:Hide()
end
-- AuxRecommendItemTex:SetNormalTexture(current_auction.texture)
-- if AuxSellStackSize:GetNumber() > 1 then
-- AuxRecommendItemTexCount:SetText(get_stack_size_slider_value())
-- AuxRecommendItemTexCount:Show()
-- else
-- AuxRecommendItemTexCount:Hide()
-- end
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("AuxRecommendPerItemPrice", Aux_Round(get_stack_size_slider_value() > 0 and newBuyoutPrice / get_stack_size_slider_value() or 0))
-- MoneyFrame_Update("AuxRecommendPerStackPrice", Aux_Round(newBuyoutPrice))
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, Aux_Round(newBuyoutPrice))
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, Aux_Round(newStartPrice))
if auxSellEntries[current_auction.name].selected.stackSize == auxSellEntries[current_auction.name][1].stackSize and auxSellEntries[current_auction.name].selected.buyoutPrice == auxSellEntries[current_auction.name][1].buyoutPrice then
AuxRecommendBasisText:SetText("(based on cheapest)")
elseif bestPriceOurStackSize and auxSellEntries[current_auction.name].selected.stackSize == bestPriceOurStackSize.stackSize and auxSellEntries[current_auction.name].selected.buyoutPrice == bestPriceOurStackSize.buyoutPrice then
AuxRecommendBasisText:SetText("(based on cheapest stack of the same size)")
else
AuxRecommendBasisText:SetText("(based on auction selected below)")
end
elseif auxSellEntries[current_auction.name] then
set_message("No auctions were found for \n\n"..current_auction.name)
auxSellEntries[current_auction.name] = nil
else
Aux_HideElems(Aux.tabs.sell.shownElements)
end
-- 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)")
-- 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)")
-- else
-- AuxRecommendBasisText:SetText("(based on auction selected below)")
-- end
else
MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0)
MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 0)
end
end
Aux.sell.scrollbar_update()
end
function Aux.sell.quantity_update()
if current_auction then
AuxSellStackCountSlider:SetMinMaxValues(1, current_auction.has_charges and current_auction.availability[AuxSellStackSizeSlider.charge_classes[AuxSellStackSizeSlider.GetValue()]] or floor(current_auction.availability[0] / 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
select_entry()
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)
if container_item then
PlaySound("igMainMenuOptionCheckBoxOn")
ClearCursor()
PickupContainerItem(bag,slot)
ClickAuctionSellItemButton()
local auction_sell_item = Aux.info.auction_sell_item()
ClearCursor()
ClickAuctionSellItemButton()
ClearCursor()
Aux.scan.abort(function()
if auction_sell_item then
Aux.scan.abort(function()
current_auction = {
name = container_item.name,
texture = container_item.texture,
class = container_item.type,
subclass = container_item.subtype,
deposit_factor = auction_sell_item.deposit_factor,
vendor_price_per_unit = auction_sell_item.vendor_price_per_unit,
has_charges = container_item.charges ~= nil,
availability = availability(container_item.name)
}
current_auction = auction_candidate
update_inventory_listing()
local charge_classes = charge_classes(current_auction.availability)
AuxSellStackSizeSlider.charge_classes = current_auction.charges and charge_classes
local stack_size_slider_max = current_auction.charges and getn(charge_classes) or min(current_auction.max_stack, current_auction.availability[0])
AuxSellStackSizeSlider:SetMinMaxValues(1, stack_size_slider_max)
AuxSellStackSizeSlider:SetValue(stack_size_slider_max)
Aux.sell.quantity_update()
AuxSellStackCountSlider:SetValue(current_auction.aux_quantity) -- reduced to max possible
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
function charge_classes(availability)
@@ -345,20 +485,81 @@ function charge_classes(availability)
return charge_classes
end
function availability(name)
local availability = {}
for bag = 0, 4 do
if GetBagName(bag) then
for slot = 1, GetContainerNumSlots(bag) do
local item_info = Aux.info.container_item(bag, slot)
if item_info and item_info.name == name then
local charge_class = item_info.charges or 0
availability[charge_class] = (availability[charge_class] or 0) + item_info.count
end
end
function update_inventory_data()
inventory_data = {}
update_inventory_listing()
local auction_candidate_map = {}
local function process_inventory(inventory_iterator, k)
local slot = inventory_iterator()
if not slot then
return k()
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
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
function refresh_entries()
@@ -372,7 +573,7 @@ function refresh_entries()
-- local class_index = item_class_index(current_auction.class)
-- local subclass_index = item_subclass_index(class_index, current_auction.subclass)
set_message('Scanning auctions ...')
Aux.log('Starting scan.')
Aux.scan.start{
query = {
name = name,
@@ -380,24 +581,27 @@ function refresh_entries()
subclass = subclass_index,
},
page = 0,
on_start_page = function(page, total_pages)
set_message('Scanning auctions: page ' .. page + 1 .. (total_pages > 0 and ' out of ' .. total_pages or '') .. ' ...')
on_page_loaded = function(page, total_pages)
Aux.log('Scanning page '..(page + 1)..' out of '..total_pages..' ...')
end,
on_read_auction = function(i)
local auction_item = Aux.info.auction_item(i)
if auction_item and auction_item.name == name then
local stack_size = auction_item.charges or auction_item.count
record_auction(auction_item.name, stack_size, auction_item.buyout_price, auction_item.duration, auction_item.owner)
local aux_quantity = auction_item.charges or auction_item.count
record_auction(auction_item.name, aux_quantity, auction_item.buyout_price, auction_item.duration, auction_item.owner)
end
end,
on_abort = function()
auxSellEntries[name] = nil
Aux.log('Scan aborted.')
end,
on_complete = function()
auxSellEntries[name] = auxSellEntries[name] or { created = GetTime() }
select_entry()
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)
local last_page = max(total_pages - 1, 0)
if page < last_page then
@@ -408,103 +612,22 @@ function refresh_entries()
end
end
-----------------------------------------
function AuxSellEntry_OnClick(entry)
function Aux.sell.scrollbar_update()
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]
auxSellEntries[current_auction.name].selected = entry
update_auction_listing()
update_recommendation()
PlaySound("igMainMenuOptionCheckBoxOn")
end
-----------------------------------------
function AuxSellRefreshButton_OnClick()
Aux.scan.abort(function()
refresh_entries()
select_entry()
update_recommendation()
update_auction_listing()
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
auxSellEntries[name] = auxSellEntries[name] or { created = GetTime() }
local entry
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
end
end
if entry then
entry.count = entry.count + 1
entry.numYours = entry.numYours + (owner == UnitName("player") and 1 or 0)
entry.maxTimeLeft = max(entry.maxTimeLeft, duration)
entry.yours = entry.yours + (owner == UnitName("player") and 1 or 0)
entry.max_time_left = max(entry.max_time_left, duration)
else
entry = {
stackSize = stack_size,
buyoutPrice = buyout_price,
itemPrice = buyout_price / stack_size,
maxTimeLeft = duration,
count = 1,
numYours = owner == UnitName("player") and 1 or 0,
key = aux_quantity..':'..buyout_price,
stack_size = aux_quantity,
buyout_price = buyout_price,
unit_buyout_price = buyout_price / aux_quantity,
max_time_left = duration,
count = 1,
yours = owner == UnitName("player") and 1 or 0,
}
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
@@ -572,32 +697,32 @@ end
-- end
-- end
-----------------------------------------
function report(item_name, stack_size, buyout_price, posted)
AuxSellReportHTML:SetText(string.format(
[[
<html>
<body>
<h1>Aux Sell Report</h1>
<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)
function report(hyperlink, stack_size, buyout_price, posted)
Aux.log(string.format(
'%i %s of %s x %i posted at %s.',
posted,
Aux_PluralizeIf('auction', posted),
hyperlink,
stack_size,
Aux.util.money_string(buyout_price)
))
AuxSellReportHTML:SetSpacing(3)
AuxSellReport:Show()
end
function Aux.sell.initialize_strategy_dropdown()
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
+218 -444
View File
@@ -1,388 +1,101 @@
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="sell.lua"/>
<!-- Frame to handle all core events -->
<Frame>
<Scripts>
</Scripts>
</Frame>
<Script file="sell.lua"/>
<Button name="AuxSellEntryTemplate" virtual="true" hidden="true">
<Size><AbsDimension y="16" /></Size>
<Frame name="AuxSellFrame" parent="AuxFrame" 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>
<Frames>
<Frame>
<Size><AbsDimension x="120" y="16" /></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="22" y="0"/></Offset></Anchor></Anchors>
<Frames>
<Frame name="$parent_UnitPrice" 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>
<Frame>
<Size><AbsDimension x="100" y="16"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="185" y="-3"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parent_Stacks" inherits="GameFontHighlightSmall">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame>
<Size><AbsDimension x="100" y="16"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="340" y="-3"/></Offset></Anchor></Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="$parent_Time" inherits="GameFontHighlightSmall">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="0" y="0"/></Offset></Anchor></Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame>
<Size><AbsDimension x="120" y="16"/></Size>
<Anchors><Anchor point="LEFT"><Offset><AbsDimension x="440" y="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>
<Frame name="AuxSellInventory" inherits="AuxFrameBoxTemplate">
<Size><AbsDimension x="260" y="326"/></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="5" y="-35"/></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('Inventory')
</OnLoad>
</Scripts>
<Frames>
<Frame name="$parentListing">
<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 config = Aux.sell.inventory_listing_config
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)
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)
</OnLoad>
</Scripts>
</Frame>
</Frames>
</Frame>
<frame name="AuxSellParameters" inherits="AuxFrameBoxTemplate">
<Size><AbsDimension x="213" y="326"/></Size>
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxSellInventory"><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('Parameters')
</OnLoad>
</Scripts>
<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">
<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>
<OnValueChanged>
Aux.sell.quantity_update()
@@ -390,7 +103,7 @@
</Scripts>
</Slider>
<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>
<OnValueChanged>
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>
<Scripts>
<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()
</OnTextChanged>
<OnTabPressed>
@@ -450,50 +170,73 @@
</OnEditFocusGained>
</Scripts>
</EditBox>
<CheckButton name="$parentShortDurationRadio" inherits="SendMailRadioButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parentDurationText" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="3" y="-4"/>
</Offset>
</Anchor>
</Anchors>
<CheckButton name="$parentShortDurationRadio" inherits="AuxRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="11" y="-143"/></Offset></Anchor></Anchors>
<layers>
<layer level="BACKGROUND">
<FontString name="$parentDurationText" inherits="GameFontNormalSmall" text="Duration">
<Anchors><Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"><Offset><AbsDimension x="0" y="4"/></Offset></Anchor></Anchors>
</FontString>
</layer>
</layers>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("2h");</OnLoad>
<OnClick>Aux.sell.duration_radio_button_on_click(1)</OnClick>
<OnLoad>
getglobal(this:GetName().."Text"):SetText("2h")
</OnLoad>
<OnClick>
Aux.sell.duration_radio_button_on_click(1)
</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="$parentMediumDurationRadio" inherits="SendMailRadioButtonTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentShortDurationRadio" relativePoint="RIGHT">
<Offset>
<AbsDimension x="44" y="0"/>
</Offset>
</Anchor>
</Anchors>
<CheckButton name="$parentMediumDurationRadio" inherits="AuxRadioButtonTemplate">
<Anchors><Anchor point="LEFT" relativeTo="$parentShortDurationRadio" relativePoint="RIGHT"><Offset><AbsDimension x="30" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("8h");</OnLoad>
<OnClick>Aux.sell.duration_radio_button_on_click(2)</OnClick>
<OnLoad>
getglobal(this:GetName()..'Text'):SetText("8h")
</OnLoad>
<OnClick>
Aux.sell.duration_radio_button_on_click(2)
</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="$parentLongDurationRadio" inherits="SendMailRadioButtonTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentMediumDurationRadio" relativePoint="RIGHT">
<Offset>
<AbsDimension x="44" y="0"/>
</Offset>
</Anchor>
</Anchors>
<CheckButton name="$parentLongDurationRadio" inherits="AuxRadioButtonTemplate">
<Anchors><Anchor point="LEFT" relativeTo="$parentMediumDurationRadio" relativePoint="RIGHT"><Offset><AbsDimension x="30" y="0"/></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("24h");</OnLoad>
<OnClick>Aux.sell.duration_radio_button_on_click(3)</OnClick>
<OnLoad>
getglobal(this:GetName().."Text"):SetText("24h")
</OnLoad>
<OnClick>
Aux.sell.duration_radio_button_on_click(3)
</OnClick>
</Scripts>
</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">
<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>
<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>
</FontString>
</Layer>
@@ -505,10 +248,10 @@
</Scripts>
</Frame>
<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>
<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>
</FontString>
<FontString name="$parentErrorText" inherits="GameFontRedSmall" text="AUCTION_BUYOUT_ERROR">
@@ -521,38 +264,69 @@
MoneyInputFrame_SetOnvalueChangedFunc(this, Aux.sell.validate_parameters)
</OnLoad>
</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>
</frames>
</frame>
<Frame name="AuxSellReport" frameStrata="FULLSCREEN_DIALOG" toplevel="true" parent="UIParent" enableMouse="true" hidden="true">
<Size><AbsDimension x="400" y="180" /></Size>
<Anchors><Anchor point="TOP"><Offset><AbsDimension x="0" y="-90"/></Offset></Anchor></Anchors>
<Backdrop bgFile="Interface\CharacterFrame\UI-Party-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets><AbsInset left="11" right="12" top="12" bottom="11"/></BackgroundInsets>
<TileSize><AbsValue val="32"/></TileSize>
<EdgeSize><AbsValue val="32"/></EdgeSize>
</Backdrop>
<Frames>
<SimpleHTML name="AuxSellReportHTML">
<Size><AbsDimension x="420" y="1" /></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="30" y="-30"/></Offset></Anchor></Anchors>
<FontString inherits="GameFontHighlightSmall"/>
<FontStringHeader1 inherits="GameFontNormal"/>
</SimpleHTML>
<Button inherits="UIPanelButtonTemplate" text="Close">
<Size><AbsDimension x="100" y="22"/> </Size>
<Anchors><Anchor point="BOTTOMRIGHT"><Offset><AbsDimension x="-20" y="15"/></Offset></Anchor></Anchors>
<Scripts>
<OnClick>
AuxSellReport:Hide()
</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
<Frame name="AuxSellAuctions" inherits="AuxFrameBoxTemplate">
<Size><AbsDimension x="361" y="326"/></Size>
<Anchors><Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="AuxSellParameters"><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('Existing Auctions')
</OnLoad>
</Scripts>
<Frames>
<Frame name="$parentListing">
<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 config = Aux.sell.auction_listing_config
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)
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)
</OnLoad>
</Scripts>
</Frame>
</Frames>
</Frame>
<Button name="AuxSellRefreshButton" inherits="UIPanelButtonTemplate" text="Refresh">
<Size><AbsDimension x="90" y="26"/></Size>
<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>
</Frame>
</Ui>
+3 -23
View File
@@ -10,30 +10,10 @@ end)()
local state
local inventory, 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
local item_slots, find_empty_slot, locked, same_slot, move_item, item_name, stack_size, stop, process
function item_slots(name)
local slots = inventory()
local slots = Aux.util.inventory_iterator()
return function()
repeat
slot = slots()
@@ -43,7 +23,7 @@ function item_slots(name)
end
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
return slot
end
+56
View File
@@ -9,6 +9,62 @@ local merge, copy_array
function Aux.util.pass()
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)
local with_index = ipairs(array)
return function()