module refactoring
This commit is contained in:
committed by
Simon Hirsig
parent
5e093306e6
commit
62ef2683f5
@@ -44,7 +44,7 @@ function USE_ITEM(item_info)
|
||||
execute(nil, false)
|
||||
end
|
||||
|
||||
function set_subtab(tab)
|
||||
function set.subtab(tab)
|
||||
CloseDropDownMenus()
|
||||
search_results_button:UnlockHighlight()
|
||||
saved_searches_button:UnlockHighlight()
|
||||
@@ -65,7 +65,7 @@ function set_subtab(tab)
|
||||
end
|
||||
end
|
||||
|
||||
function M.set_filter(filter_string)
|
||||
function M.set.filter(filter_string)
|
||||
search_box:SetFocus()
|
||||
search_box:SetText(filter_string)
|
||||
end
|
||||
|
||||
@@ -105,7 +105,7 @@ function update_form()
|
||||
end
|
||||
end
|
||||
|
||||
function get_filter_builder_query()
|
||||
function get.filter_builder_query()
|
||||
local filter_string
|
||||
|
||||
local function add(part)
|
||||
@@ -150,7 +150,7 @@ function get_filter_builder_query()
|
||||
return filter_string or ''
|
||||
end
|
||||
|
||||
function set_form(filter)
|
||||
function set.form(filter)
|
||||
clear_form()
|
||||
for _, component in ipairs(filter.components) do
|
||||
if component[1] == 'blizzard' then
|
||||
@@ -184,7 +184,7 @@ end
|
||||
function import_filter_string()
|
||||
local filter, error = filter_util.parse_filter_string(select(3, strfind(search_box:GetText(), '^([^;]*)')))
|
||||
if filter or print(error) then
|
||||
set_form(filter)
|
||||
set.form(filter)
|
||||
end
|
||||
update_form()
|
||||
end
|
||||
|
||||
@@ -12,10 +12,10 @@ end
|
||||
|
||||
do
|
||||
local id = 0
|
||||
function get_search_scan_id()
|
||||
function get.search_scan_id()
|
||||
return id
|
||||
end
|
||||
function set_search_scan_id(v)
|
||||
function set.search_scan_id(v)
|
||||
id = v
|
||||
end
|
||||
end
|
||||
@@ -36,7 +36,7 @@ do
|
||||
local searches = {}
|
||||
local search_index = 1
|
||||
|
||||
function get_current_search()
|
||||
function get.current_search()
|
||||
return searches[search_index]
|
||||
end
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ handlers = {
|
||||
end
|
||||
}
|
||||
|
||||
function get_auto_buy_validator()
|
||||
function get.auto_buy_validator()
|
||||
local validators = T
|
||||
for _, search in pairs(favorite_searches) do
|
||||
if search.auto_buy then
|
||||
|
||||
Reference in New Issue
Block a user