big refactoring
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
setglobal('aux', aux_module('core'))
|
setglobal('aux', aux_module 'core')
|
||||||
import 'util'
|
import 'util'
|
||||||
|
|
||||||
public.version = '5.0.0'
|
public.version = '5.0.0'
|
||||||
@@ -15,52 +15,37 @@ do
|
|||||||
locked[t] = nil
|
locked[t] = nil
|
||||||
tinsert(table_pool, t)
|
tinsert(table_pool, t)
|
||||||
end
|
end
|
||||||
local function temp()
|
function public.temp()
|
||||||
local t = tremove(table_pool)
|
local t = tremove(table_pool)
|
||||||
t = t and wipe(t) or {}
|
t = t and wipe(t) or {}
|
||||||
locked[t] = true
|
locked[t] = true
|
||||||
end
|
end
|
||||||
public.temp = temp
|
function public.static()
|
||||||
|
local t = tremove(table_pool)
|
||||||
|
t = t and wipe(t) or {}
|
||||||
|
locked[t] = true
|
||||||
|
end
|
||||||
|
function public.array(...) locked[arg] = true end
|
||||||
|
function public.set(...)
|
||||||
|
local set = temp()
|
||||||
|
for i=1,arg.n do self[arg[i]] = true end
|
||||||
|
return set
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local temp = temp
|
local temp = temp
|
||||||
--do
|
|
||||||
-- local table_pool = {}
|
|
||||||
-- onupdate clear tables TODO
|
|
||||||
-- local setn = g.table.setn
|
|
||||||
|
|
||||||
-- public.wipe = wipe
|
|
||||||
--end
|
|
||||||
|
|
||||||
do
|
do
|
||||||
local aux_module, getfenv, setfenv, gfind, tinsert = g.aux_module, g.getfenv, g.setfenv, g.string.gfind, g.tinsert
|
local aux_module, getfenv, setfenv, gfind, tinsert = g.aux_module, g.getfenv, g.setfenv, g.string.gfind, g.tinsert
|
||||||
local interface, env = (function() return aux_module('interfaces'), getfenv() end)()
|
local root = (function() aux_module 'modules' return getfenv() end)()
|
||||||
function public.module(path)
|
function public.module(path)
|
||||||
local parts = gfind(path, '[%a_][%w_]*')
|
local parts = gfind(path, '[%a_][%w_]*')
|
||||||
local name = parts() or ''
|
local name = parts() or ''
|
||||||
|
local env = root
|
||||||
for part in parts do
|
for part in parts do
|
||||||
interface[(function() return aux_module(name), getfenv() end)()
|
env.public[part], env = (function() return aux_module(name), getfenv() end)()
|
||||||
|
env.import('modules', 'core', 'util')
|
||||||
name = name..'.'..part
|
name = name..'.'..part
|
||||||
end
|
end
|
||||||
|
|
||||||
local env
|
|
||||||
if path == 'core' then
|
|
||||||
env = getfenv()
|
|
||||||
elseif module_envs[path] then
|
|
||||||
env = module_envs[path]
|
|
||||||
else
|
|
||||||
local prefix
|
|
||||||
for name in gfind(path, '[%a_][%w_]*') do
|
|
||||||
local qualified_name = prefix and prefix..'.'..name or name
|
|
||||||
env = module_envs[qualified_name]
|
|
||||||
if not env then
|
|
||||||
(prefix and module_envs[prefix].public or public)[name], env = (function() return aux_module(qualified_name), getfenv() end)()
|
|
||||||
env.import('core', 'util')
|
|
||||||
env.mutable.LOAD = nil
|
|
||||||
module_envs[qualified_name] = env
|
|
||||||
end
|
|
||||||
prefix = qualified_name
|
|
||||||
end
|
|
||||||
end
|
|
||||||
setfenv(2, env)
|
setfenv(2, env)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+6
-4
@@ -1,4 +1,4 @@
|
|||||||
local tinsert, setfenv, rawget, rawset, setmetatable, mask, add, g = tinsert, setfenv, rawget, rawset, setmetatable, bit.band, bit.bor, getfenv(0)
|
local tinsert, setfenv, rawget, setmetatable, mask, add, g = tinsert, setfenv, rawget, setmetatable, bit.band, bit.bor, getfenv(0)
|
||||||
local DECLARED, ACCESSOR, MUTABLE, PUBLIC = 1, 2, 4, 8
|
local DECLARED, ACCESSOR, MUTABLE, PUBLIC = 1, 2, 4, 8
|
||||||
local ACCESSOR_KEY, MUTABLE_KEY, PUBLIC_KEY = 'accessor', 'mutable', 'public'
|
local ACCESSOR_KEY, MUTABLE_KEY, PUBLIC_KEY = 'accessor', 'mutable', 'public'
|
||||||
local PROPERTY = {[ACCESSOR_KEY]=ACCESSOR, [MUTABLE_KEY]=MUTABLE, [PUBLIC_KEY]=PUBLIC}
|
local PROPERTY = {[ACCESSOR_KEY]=ACCESSOR, [MUTABLE_KEY]=MUTABLE, [PUBLIC_KEY]=PUBLIC}
|
||||||
@@ -24,9 +24,11 @@ local env_mt = {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
__newindex = function(self, key, value)
|
__newindex = function(self, key, value)
|
||||||
local properties = _metadata[self][key]
|
if not rawget(_metadata[self], key) then
|
||||||
if mask(DECLARED+MUTABLE, _metadata[self][key]) == DECLARED then error('Field "%s" is immutable.', key) end
|
_metadata[self][key] = DECLARED
|
||||||
_metadata[self][key] = add(DECLARED, properties)
|
elseif mask(MUTABLE, _metadata[self][key]) == 0 then
|
||||||
|
error('Field "%s" is immutable.', key)
|
||||||
|
end
|
||||||
_data[self][key] = value
|
_data[self][key] = value
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
+26
-26
@@ -55,7 +55,7 @@ public.search_config = {
|
|||||||
title = 'Item',
|
title = 'Item',
|
||||||
width = 0.35,
|
width = 0.35,
|
||||||
init = item_column_init,
|
init = item_column_init,
|
||||||
set = function(cell, record, _, _, _, indented)
|
fill = function(cell, record, _, _, _, indented)
|
||||||
cell.icon:SetTexture(record.texture)
|
cell.icon:SetTexture(record.texture)
|
||||||
if indented then
|
if indented then
|
||||||
cell.spacer:SetWidth(10)
|
cell.spacer:SetWidth(10)
|
||||||
@@ -76,7 +76,7 @@ public.search_config = {
|
|||||||
title = 'Lvl',
|
title = 'Lvl',
|
||||||
width = 0.035,
|
width = 0.035,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local display_level = max(record.level, 1)
|
local display_level = max(record.level, 1)
|
||||||
display_level = UnitLevel('player') < record.level and aux.gui.color.red(display_level) or display_level
|
display_level = UnitLevel('player') < record.level and aux.gui.color.red(display_level) or display_level
|
||||||
cell:SetText(display_level)
|
cell:SetText(display_level)
|
||||||
@@ -89,7 +89,7 @@ public.search_config = {
|
|||||||
title = 'Auctions',
|
title = 'Auctions',
|
||||||
width = 0.06,
|
width = 0.06,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record, count, own, expandable)
|
fill = function(cell, record, count, own, expandable)
|
||||||
local numAuctionsText = expandable and aux.gui.color.link(count) or count
|
local numAuctionsText = expandable and aux.gui.color.link(count) or count
|
||||||
if own > 0 then
|
if own > 0 then
|
||||||
numAuctionsText = numAuctionsText..(' '..aux.gui.color.yellow('('..own..')'))
|
numAuctionsText = numAuctionsText..(' '..aux.gui.color.yellow('('..own..')'))
|
||||||
@@ -113,7 +113,7 @@ public.search_config = {
|
|||||||
title = 'Stack Size',
|
title = 'Stack Size',
|
||||||
width = 0.055,
|
width = 0.055,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(record.aux_quantity)
|
cell:SetText(record.aux_quantity)
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -124,7 +124,7 @@ public.search_config = {
|
|||||||
title = 'Time Left',
|
title = 'Time Left',
|
||||||
width = 0.04,
|
width = 0.04,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(TIME_LEFT_STRINGS[record.duration or 0] or '---')
|
cell:SetText(TIME_LEFT_STRINGS[record.duration or 0] or '---')
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -135,7 +135,7 @@ public.search_config = {
|
|||||||
title = 'Seller',
|
title = 'Seller',
|
||||||
width = 0.13,
|
width = 0.13,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(aux.is_player(record.owner) and (aux.gui.color.yellow(record.owner)) or (record.owner or '---'))
|
cell:SetText(aux.is_player(record.owner) and (aux.gui.color.yellow(record.owner)) or (record.owner or '---'))
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -155,7 +155,7 @@ public.search_config = {
|
|||||||
width = 0.125,
|
width = 0.125,
|
||||||
align = 'RIGHT',
|
align = 'RIGHT',
|
||||||
isPrice = true,
|
isPrice = true,
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local color
|
local color
|
||||||
if record.high_bidder then
|
if record.high_bidder then
|
||||||
color = AUCTION_PCT_COLORS[2].color
|
color = AUCTION_PCT_COLORS[2].color
|
||||||
@@ -191,7 +191,7 @@ public.search_config = {
|
|||||||
width = 0.125,
|
width = 0.125,
|
||||||
align = 'RIGHT',
|
align = 'RIGHT',
|
||||||
isPrice = true,
|
isPrice = true,
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local price = g.aux_price_per_unit and ceil(record.unit_buyout_price) or record.buyout_price
|
local price = g.aux_price_per_unit and ceil(record.unit_buyout_price) or record.buyout_price
|
||||||
cell:SetText(price > 0 and aux.money.to_string(price, true, false) or '---')
|
cell:SetText(price > 0 and aux.money.to_string(price, true, false) or '---')
|
||||||
end,
|
end,
|
||||||
@@ -208,7 +208,7 @@ public.search_config = {
|
|||||||
title = '% Hist. Value',
|
title = '% Hist. Value',
|
||||||
width = 0.08,
|
width = 0.08,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local pct, bidPct = record_percentage(record)
|
local pct, bidPct = record_percentage(record)
|
||||||
cell:SetText((pct or bidPct) and percentage_historical(pct or bidPct, not pct) or '---')
|
cell:SetText((pct or bidPct) and percentage_historical(pct or bidPct, not pct) or '---')
|
||||||
end,
|
end,
|
||||||
@@ -225,7 +225,7 @@ public.auctions_config = {
|
|||||||
title = 'Item',
|
title = 'Item',
|
||||||
width = 0.35,
|
width = 0.35,
|
||||||
init = item_column_init,
|
init = item_column_init,
|
||||||
set = function(cell, record, _, _, _, indented)
|
fill = function(cell, record, _, _, _, indented)
|
||||||
cell.icon:SetTexture(record.texture)
|
cell.icon:SetTexture(record.texture)
|
||||||
if indented then
|
if indented then
|
||||||
cell.spacer:SetWidth(10)
|
cell.spacer:SetWidth(10)
|
||||||
@@ -246,7 +246,7 @@ public.auctions_config = {
|
|||||||
title = 'Lvl',
|
title = 'Lvl',
|
||||||
width = 0.035,
|
width = 0.035,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local display_level = max(record.level, 1)
|
local display_level = max(record.level, 1)
|
||||||
display_level = UnitLevel('player') < record.level and aux.gui.color.red(display_level) or display_level
|
display_level = UnitLevel('player') < record.level and aux.gui.color.red(display_level) or display_level
|
||||||
cell:SetText(display_level)
|
cell:SetText(display_level)
|
||||||
@@ -259,7 +259,7 @@ public.auctions_config = {
|
|||||||
title = 'Auctions',
|
title = 'Auctions',
|
||||||
width = 0.06,
|
width = 0.06,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record, count, own, expandable)
|
fill = function(cell, record, count, own, expandable)
|
||||||
local numAuctionsText = expandable and aux.gui.inline_color.link..count..FONT_COLOR_CODE_CLOSE or count
|
local numAuctionsText = expandable and aux.gui.inline_color.link..count..FONT_COLOR_CODE_CLOSE or count
|
||||||
cell:SetText(numAuctionsText)
|
cell:SetText(numAuctionsText)
|
||||||
end,
|
end,
|
||||||
@@ -280,7 +280,7 @@ public.auctions_config = {
|
|||||||
title = 'Stack Size',
|
title = 'Stack Size',
|
||||||
width = 0.055,
|
width = 0.055,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(record.aux_quantity)
|
cell:SetText(record.aux_quantity)
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -291,7 +291,7 @@ public.auctions_config = {
|
|||||||
title = 'Time Left',
|
title = 'Time Left',
|
||||||
width = 0.04,
|
width = 0.04,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(TIME_LEFT_STRINGS[record.duration or 0] or '---')
|
cell:SetText(TIME_LEFT_STRINGS[record.duration or 0] or '---')
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -303,7 +303,7 @@ public.auctions_config = {
|
|||||||
width = 0.125,
|
width = 0.125,
|
||||||
align = 'RIGHT',
|
align = 'RIGHT',
|
||||||
isPrice = true,
|
isPrice = true,
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local price
|
local price
|
||||||
if record.high_bidder then
|
if record.high_bidder then
|
||||||
price = g.aux_price_per_unit and ceil(record.high_bid / record.aux_quantity) or record.high_bid
|
price = g.aux_price_per_unit and ceil(record.high_bid / record.aux_quantity) or record.high_bid
|
||||||
@@ -333,7 +333,7 @@ public.auctions_config = {
|
|||||||
width = 0.125,
|
width = 0.125,
|
||||||
align = 'RIGHT',
|
align = 'RIGHT',
|
||||||
isPrice = true,
|
isPrice = true,
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local price = g.aux_price_per_unit and ceil(record.unit_buyout_price) or record.buyout_price
|
local price = g.aux_price_per_unit and ceil(record.unit_buyout_price) or record.buyout_price
|
||||||
cell:SetText(price > 0 and aux.money.to_string(price, true, false) or '---')
|
cell:SetText(price > 0 and aux.money.to_string(price, true, false) or '---')
|
||||||
end,
|
end,
|
||||||
@@ -350,7 +350,7 @@ public.auctions_config = {
|
|||||||
title = 'High Bidder',
|
title = 'High Bidder',
|
||||||
width = 0.21,
|
width = 0.21,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(record.high_bidder or aux.gui.color.red 'No Bids')
|
cell:SetText(record.high_bidder or aux.gui.color.red 'No Bids')
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -372,7 +372,7 @@ public.bids_config = {
|
|||||||
title = 'Item',
|
title = 'Item',
|
||||||
width = 0.35,
|
width = 0.35,
|
||||||
init = item_column_init,
|
init = item_column_init,
|
||||||
set = function(cell, record, _, _, _, indented)
|
fill = function(cell, record, _, _, _, indented)
|
||||||
cell.icon:SetTexture(record.texture)
|
cell.icon:SetTexture(record.texture)
|
||||||
if indented then
|
if indented then
|
||||||
cell.spacer:SetWidth(10)
|
cell.spacer:SetWidth(10)
|
||||||
@@ -393,7 +393,7 @@ public.bids_config = {
|
|||||||
title = 'Auctions',
|
title = 'Auctions',
|
||||||
width = 0.06,
|
width = 0.06,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record, count, own, expandable)
|
fill = function(cell, record, count, own, expandable)
|
||||||
local numAuctionsText = expandable and aux.gui.inline_color.link..count..FONT_COLOR_CODE_CLOSE or count
|
local numAuctionsText = expandable and aux.gui.inline_color.link..count..FONT_COLOR_CODE_CLOSE or count
|
||||||
cell:SetText(numAuctionsText)
|
cell:SetText(numAuctionsText)
|
||||||
end,
|
end,
|
||||||
@@ -414,7 +414,7 @@ public.bids_config = {
|
|||||||
title = 'Stack Size',
|
title = 'Stack Size',
|
||||||
width = 0.055,
|
width = 0.055,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(record.aux_quantity)
|
cell:SetText(record.aux_quantity)
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -425,7 +425,7 @@ public.bids_config = {
|
|||||||
title = 'Time Left',
|
title = 'Time Left',
|
||||||
width = 0.04,
|
width = 0.04,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(TIME_LEFT_STRINGS[record.duration or 0] or '---')
|
cell:SetText(TIME_LEFT_STRINGS[record.duration or 0] or '---')
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -436,7 +436,7 @@ public.bids_config = {
|
|||||||
title = 'Seller',
|
title = 'Seller',
|
||||||
width = 0.13,
|
width = 0.13,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
cell:SetText(aux.is_player(record.owner) and (aux.gui.color.yellow(record.owner)) or (record.owner or '---'))
|
cell:SetText(aux.is_player(record.owner) and (aux.gui.color.yellow(record.owner)) or (record.owner or '---'))
|
||||||
end,
|
end,
|
||||||
cmp = function(record_a, record_b, desc)
|
cmp = function(record_a, record_b, desc)
|
||||||
@@ -456,7 +456,7 @@ public.bids_config = {
|
|||||||
width = 0.125,
|
width = 0.125,
|
||||||
align = 'RIGHT',
|
align = 'RIGHT',
|
||||||
isPrice = true,
|
isPrice = true,
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local price
|
local price
|
||||||
if record.high_bidder then
|
if record.high_bidder then
|
||||||
price = g.aux_price_per_unit and ceil(record.high_bid / record.aux_quantity) or record.high_bid
|
price = g.aux_price_per_unit and ceil(record.high_bid / record.aux_quantity) or record.high_bid
|
||||||
@@ -486,7 +486,7 @@ public.bids_config = {
|
|||||||
width = 0.125,
|
width = 0.125,
|
||||||
align = 'RIGHT',
|
align = 'RIGHT',
|
||||||
isPrice = true,
|
isPrice = true,
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local price = g.aux_price_per_unit and ceil(record.unit_buyout_price) or record.buyout_price
|
local price = g.aux_price_per_unit and ceil(record.unit_buyout_price) or record.buyout_price
|
||||||
cell:SetText(price > 0 and aux.money.to_string(price, true, false) or '---')
|
cell:SetText(price > 0 and aux.money.to_string(price, true, false) or '---')
|
||||||
end,
|
end,
|
||||||
@@ -503,7 +503,7 @@ public.bids_config = {
|
|||||||
title = 'Status',
|
title = 'Status',
|
||||||
width = 0.115,
|
width = 0.115,
|
||||||
align = 'CENTER',
|
align = 'CENTER',
|
||||||
set = function(cell, record)
|
fill = function(cell, record)
|
||||||
local status
|
local status
|
||||||
if record.high_bidder then
|
if record.high_bidder then
|
||||||
status = aux.gui.color.yellow 'High Bidder'
|
status = aux.gui.color.yellow 'High Bidder'
|
||||||
@@ -814,7 +814,7 @@ local methods = {
|
|||||||
row.data = {record=record, expandable=expandable, indented=indented, numAuctions=numAuctions, expandKey=expandKey}
|
row.data = {record=record, expandable=expandable, indented=indented, numAuctions=numAuctions, expandKey=expandKey}
|
||||||
|
|
||||||
for i, column_config in self.config do
|
for i, column_config in self.config do
|
||||||
column_config.set(row.cells[i], record, displayNumAuctions, numPlayerAuctions, expandable, indented)
|
column_config.fill(row.cells[i], record, displayNumAuctions, numPlayerAuctions, expandable, indented)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -11,9 +11,7 @@ local DEFAULT_COL_INFO = {{width=1}}
|
|||||||
|
|
||||||
local function GetTableIndex(tbl, value)
|
local function GetTableIndex(tbl, value)
|
||||||
for i, v in tbl do
|
for i, v in tbl do
|
||||||
if value == v then
|
if value == v then return i end
|
||||||
return i
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -106,7 +104,6 @@ local methods = {
|
|||||||
st.updateSort = nil
|
st.updateSort = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- set row data
|
|
||||||
for i=1, st.sizes.numRows do
|
for i=1, st.sizes.numRows do
|
||||||
st.rows[i].data = nil
|
st.rows[i].data = nil
|
||||||
if i > getn(st.rowData) then
|
if i > getn(st.rowData) then
|
||||||
@@ -337,7 +334,7 @@ local methods = {
|
|||||||
local col = CreateFrame('Button', nil, row)
|
local col = CreateFrame('Button', nil, row)
|
||||||
local text = col:CreateFontString()
|
local text = col:CreateFontString()
|
||||||
text:SetFont(aux.gui.config.font, ST_ROW_TEXT_SIZE)
|
text:SetFont(aux.gui.config.font, ST_ROW_TEXT_SIZE)
|
||||||
text:SetJustifyV('CENTER')
|
text:SetJustifyV 'CENTER'
|
||||||
text:SetPoint('TOPLEFT', 1, -1)
|
text:SetPoint('TOPLEFT', 1, -1)
|
||||||
text:SetPoint('BOTTOMRIGHT', -1, 1)
|
text:SetPoint('BOTTOMRIGHT', -1, 1)
|
||||||
col.text = text
|
col.text = text
|
||||||
|
|||||||
+1
-1
@@ -205,7 +205,7 @@ end
|
|||||||
|
|
||||||
do
|
do
|
||||||
local mt = {__call = function(self, key) return self[key] end}
|
local mt = {__call = function(self, key) return self[key] end}
|
||||||
function public.hashset(...)
|
function public.hashset(...) -- TODO rename/remove?
|
||||||
local self = {}
|
local self = {}
|
||||||
for i=1,arg.n do self[arg[i]] = true end
|
for i=1,arg.n do self[arg[i]] = true end
|
||||||
return setmetatable(self, mt)
|
return setmetatable(self, mt)
|
||||||
|
|||||||
Reference in New Issue
Block a user