module refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-10-14 01:55:38 +02:00
parent 2660b44861
commit cc7139c0e2
30 changed files with 326 additions and 343 deletions
+5 -5
View File
@@ -10,7 +10,7 @@ local history = require 'aux.core.history'
local gui = require 'aux.gui'
local search_tab = require 'aux.tabs.search'
aux_price_per_unit = false
_G.aux_price_per_unit = false
local RT_COUNT = 1
local HEAD_HEIGHT = 27
@@ -31,7 +31,7 @@ local TIME_LEFT_STRINGS = {
color.blue '24h', -- Very Long
}
function private.item_column_init(rt, cell)
function item_column_init(rt, cell)
local spacer = CreateFrame('Frame', nil, cell)
spacer:SetPoint('TOPLEFT', 0, 0)
spacer:SetHeight(rt.ROW_HEIGHT)
@@ -528,7 +528,7 @@ public.bids_config = {
},
}
function private.record_percentage(record)
function record_percentage(record)
if not record then return end
local historical_value = history.value(record.item_key) or 0
@@ -540,7 +540,7 @@ function private.record_percentage(record)
end
end
function private.percentage_color(pct)
function percentage_color(pct)
for i = 1, getn(AUCTION_PCT_COLORS) do
if pct < AUCTION_PCT_COLORS[i].value then
return AUCTION_PCT_COLORS[i].color
@@ -575,7 +575,7 @@ local methods = {
if rt.disabled then return end
if button == 'RightButton' and rt.headCells[this.columnIndex].info.isPrice then
aux_price_per_unit = not aux_price_per_unit
_G.aux_price_per_unit = not aux_price_per_unit
for _, cell in rt.headCells do
if cell.info.isPrice then
cell:SetText(cell.info.title[aux_price_per_unit and 1 or 2])
+3 -3
View File
@@ -35,7 +35,7 @@ function LOAD()
return unpack(ret)
end)
function private.set_aux_dropdown_style(dropdown)
function set_aux_dropdown_style(dropdown)
DropDownList1Backdrop:SetBackdrop{}
aux_border:Show()
aux_background:Show()
@@ -64,7 +64,7 @@ function LOAD()
end
end
function private.set_blizzard_dropdown_style()
function set_blizzard_dropdown_style()
DropDownList1Backdrop:SetBackdrop(blizzard_backdrop)
aux_border:Hide()
aux_background:Hide()
@@ -87,7 +87,7 @@ end
do
local id = 1
function public.unique_name.get()
function public.get_unique_name()
id = id + 1
return 'AuxFrame' .. id
end