refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-09-30 18:32:19 +02:00
parent 4414ccf084
commit f29cb9ae1d
36 changed files with 531 additions and 298 deletions
+12 -4
View File
@@ -1,4 +1,12 @@
aux 'auction_listing' local gui, sorting, money, info = aux.gui, aux.sorting, aux.money, aux.info
aux_auction_listing = module
include (green_t)
include (aux)
include (aux_util)
include (aux_control)
include (aux_util_color)
local gui, sorting, money, info = aux_gui, aux_sorting, aux_money, aux_info
aux_price_per_unit = false
@@ -521,7 +529,7 @@ public.bids_config = {
function private.record_percentage(record)
if not record then return end
local historical_value = aux.history.value(record.item_key) or 0
local historical_value = aux_history.value(record.item_key) or 0
if historical_value > 0 then
if record.unit_buyout_price > 0 then
return round(100 * record.unit_buyout_price / historical_value, 1)
@@ -634,8 +642,8 @@ local methods = {
ChatFrameEditBox:Insert(this.row.data.record.link)
elseif not modified and button == 'RightButton' then -- TODO not when alt (how?)
tab = 1
aux.search_tab.set_filter(strlower(info.item(this.row.data.record.item_id).name) .. '/exact')
aux.search_tab.execute(nil, false)
aux_search_tab.set_filter(strlower(info.item(this.row.data.record.item_id).name) .. '/exact')
aux_search_tab.execute(nil, false)
else
local selection = this.rt:GetSelection()
if not selection or selection.record ~= this.row.data.record then
+9 -3
View File
@@ -1,4 +1,10 @@
aux 'gui'
aux_gui = module
include (green_t)
include (aux)
include (aux_util)
include (aux_control)
include (aux_util_color)
public.font = [[Fonts\ARIALN.TTF]]
@@ -25,7 +31,7 @@ function LOAD()
hook('ToggleDropDownMenu', function(...) auto[arg] = true
local ret = temp-A(orig.ToggleDropDownMenu(unpack(arg)))
local dropdown = _G[arg[4] or ''] or this:GetParent()
if strfind(dropdown:GetName() or '', '^aux_frame%d+$') then
if strfind(dropdown:GetName() or '', '^AuxFrame%d+$') then
set_aux_dropdown_style(dropdown)
else
set_blizzard_dropdown_style()
@@ -87,7 +93,7 @@ do
local id = 1
function public.name.get()
id = id + 1
return 'aux_frame' .. id
return 'AuxFrame' .. id
end
end
+9 -1
View File
@@ -1,4 +1,12 @@
aux 'item_listing' local gui, info = aux.gui, aux.info
aux_item_listing = module
include (green_t)
include (aux)
include (aux_util)
include (aux_control)
include (aux_util_color)
local gui, info = aux_gui, aux_info
local ROW_HEIGHT = 39
+9 -1
View File
@@ -1,4 +1,12 @@
aux 'listing' local gui = aux.gui
aux_listing = module
include (green_t)
include (aux)
include (aux_util)
include (aux_control)
include (aux_util_color)
local gui = aux_gui
local ST_COUNT = 0