editbox changes
This commit is contained in:
+40
-40
@@ -13,7 +13,7 @@ StaticPopupDialogs['AUX_SEARCH_AUTO_BUY'] = {
|
||||
button1 = 'Yes',
|
||||
button2 = 'No',
|
||||
OnAccept = function()
|
||||
m.auto_buy_button:SetChecked(true)
|
||||
auto_buy_button:SetChecked(true)
|
||||
end,
|
||||
timeout = 0,
|
||||
hideOnEscape = 1,
|
||||
@@ -21,7 +21,7 @@ StaticPopupDialogs['AUX_SEARCH_AUTO_BUY'] = {
|
||||
do
|
||||
local function action()
|
||||
g.aux_auto_buy_filter = getglobal(this:GetParent():GetName()..'EditBox'):GetText()
|
||||
m.update_auto_buy_filter()
|
||||
update_auto_buy_filter()
|
||||
end
|
||||
|
||||
StaticPopupDialogs['AUX_SEARCH_AUTO_BUY_FILTER'] = {
|
||||
@@ -50,69 +50,69 @@ end
|
||||
|
||||
RESULTS, SAVED, FILTER = 1, 2, 3
|
||||
|
||||
function m.LOAD()
|
||||
m.create_frames()
|
||||
m.update_tab(m.SAVED)
|
||||
m.update_auto_buy_filter()
|
||||
m.new_search ''
|
||||
m.current_search().placeholder = true
|
||||
function LOAD()
|
||||
create_frames()
|
||||
set_tab(SAVED)
|
||||
update_auto_buy_filter()
|
||||
new_search ''
|
||||
current_search.placeholder = true
|
||||
end
|
||||
|
||||
function m.OPEN()
|
||||
m.frame:Show()
|
||||
m.update_search_listings()
|
||||
function OPEN()
|
||||
frame:Show()
|
||||
update_search_listings()
|
||||
end
|
||||
|
||||
function m.CLOSE()
|
||||
m.close_settings()
|
||||
m.current_search().table:SetSelectedRecord()
|
||||
m.frame:Hide()
|
||||
function CLOSE()
|
||||
close_settings()
|
||||
current_search.table:SetSelectedRecord()
|
||||
frame:Hide()
|
||||
end
|
||||
|
||||
function m.CLICK_LINK(item_info)
|
||||
m.set_filter(strlower(item_info.name)..'/exact')
|
||||
m.execute(nil, false)
|
||||
function CLICK_LINK(item_info)
|
||||
set_filter(strlower(item_info.name)..'/exact')
|
||||
execute(nil, false)
|
||||
end
|
||||
|
||||
function m.USE_ITEM(item_info)
|
||||
m.set_filter(strlower(item_info.name)..'/exact')
|
||||
m.execute(nil, false)
|
||||
function USE_ITEM(item_info)
|
||||
set_filter(strlower(item_info.name)..'/exact')
|
||||
execute(nil, false)
|
||||
end
|
||||
|
||||
function update_tab(tab)
|
||||
function set_tab(tab)
|
||||
|
||||
m.search_results_button:UnlockHighlight()
|
||||
m.saved_searches_button:UnlockHighlight()
|
||||
m.new_filter_button:UnlockHighlight()
|
||||
m.frame.results:Hide()
|
||||
m.frame.saved:Hide()
|
||||
m.frame.filter:Hide()
|
||||
search_results_button:UnlockHighlight()
|
||||
saved_searches_button:UnlockHighlight()
|
||||
new_filter_button:UnlockHighlight()
|
||||
frame.results:Hide()
|
||||
frame.saved:Hide()
|
||||
frame.filter:Hide()
|
||||
|
||||
if tab == m.RESULTS then
|
||||
m.frame.results:Show()
|
||||
m.search_results_button:LockHighlight()
|
||||
elseif tab == m.SAVED then
|
||||
m.frame.saved:Show()
|
||||
m.saved_searches_button:LockHighlight()
|
||||
elseif tab == m.FILTER then
|
||||
m.frame.filter:Show()
|
||||
m.new_filter_button:LockHighlight()
|
||||
if tab == RESULTS then
|
||||
frame.results:Show()
|
||||
search_results_button:LockHighlight()
|
||||
elseif tab == SAVED then
|
||||
frame.saved:Show()
|
||||
saved_searches_button:LockHighlight()
|
||||
elseif tab == FILTER then
|
||||
frame.filter:Show()
|
||||
new_filter_button:LockHighlight()
|
||||
end
|
||||
end
|
||||
|
||||
function public.set_filter(filter_string)
|
||||
m.search_box:SetText(filter_string)
|
||||
search_box:SetText(filter_string)
|
||||
end
|
||||
|
||||
function public.add_filter(filter_string)
|
||||
local old_filter_string = m.search_box:GetText()
|
||||
local old_filter_string = search_box:GetText()
|
||||
old_filter_string = trim(old_filter_string)
|
||||
|
||||
if old_filter_string ~= '' then
|
||||
old_filter_string = old_filter_string..';'
|
||||
end
|
||||
|
||||
m.search_box:SetText(old_filter_string..filter_string)
|
||||
search_box:SetText(old_filter_string..filter_string)
|
||||
end
|
||||
|
||||
function blizzard_page_index(str)
|
||||
|
||||
Reference in New Issue
Block a user