big refactoring
This commit is contained in:
@@ -20,7 +20,7 @@ StaticPopupDialogs['AUX_SEARCH_AUTO_BUY'] = {
|
||||
}
|
||||
do
|
||||
local function action()
|
||||
_g.aux_auto_buy_filter = getglobal(this:GetParent():GetName()..'EditBox'):GetText()
|
||||
_g.aux_auto_buy_filter = _g[this:GetParent():GetName()..'EditBox']:GetText()
|
||||
update_auto_buy_filter()
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ do
|
||||
button2 = 'Cancel',
|
||||
hasEditBox = 1,
|
||||
OnShow = function()
|
||||
local edit_box = getglobal(this:GetName()..'EditBox')
|
||||
local edit_box = _g[this:GetName()..'EditBox']
|
||||
edit_box:SetMaxLetters(nil)
|
||||
edit_box:SetFocus()
|
||||
edit_box:HighlightText()
|
||||
|
||||
@@ -125,13 +125,13 @@ function get_filter_builder_query()
|
||||
for _, subclass in {blizzard_query.subclass} do
|
||||
local subclasses = {GetAuctionItemSubClasses(class)}
|
||||
add(strlower(subclasses[subclass]))
|
||||
add(blizzard_query.slot and strlower(getglobal(blizzard_query.slot)))
|
||||
add(blizzard_query.slot and strlower(_g[blizzard_query.slot]))
|
||||
end
|
||||
end
|
||||
|
||||
local quality = blizzard_query.quality
|
||||
if quality and quality >= 0 then
|
||||
add(strlower(getglobal('ITEM_QUALITY'..quality..'_DESC')))
|
||||
add(strlower(_g['ITEM_QUALITY'..quality..'_DESC']))
|
||||
end
|
||||
|
||||
local post_filter_string = filter.query_string{blizzard={}, post=post_filter}
|
||||
@@ -412,7 +412,7 @@ function initialize_slot_dropdown()
|
||||
|
||||
for _, slot in {GetAuctionInvTypes(class_index, subclass_index)} do
|
||||
UIDropDownMenu_AddButton{
|
||||
text = getglobal(slot),
|
||||
text = _g[slot],
|
||||
value = slot,
|
||||
func = on_click,
|
||||
}
|
||||
@@ -433,7 +433,7 @@ function initialize_quality_dropdown()
|
||||
}
|
||||
for i=0,4 do
|
||||
UIDropDownMenu_AddButton{
|
||||
text = getglobal('ITEM_QUALITY'..i..'_DESC'),
|
||||
text = _g['ITEM_QUALITY'..i..'_DESC'],
|
||||
value = i,
|
||||
func = on_click,
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ function create_frames()
|
||||
dropdown:SetScript('OnShow', function()
|
||||
UIDropDownMenu_Initialize(this, initialize_filter_dropdown)
|
||||
end)
|
||||
getglobal(dropdown:GetName()..'Text'):Hide()
|
||||
_g[dropdown:GetName()..'Text']:Hide()
|
||||
local label = gui.label(dropdown, gui.font_size.medium)
|
||||
label:SetPoint('RIGHT', dropdown, 'LEFT', -15, 0)
|
||||
label:SetText('Post Filter')
|
||||
|
||||
Reference in New Issue
Block a user