big filter style change

This commit is contained in:
Manuel Simon Hirsig
2016-08-16 00:30:29 +02:00
parent 1ef3c07baa
commit d1cd3bbd53
7 changed files with 42 additions and 38 deletions
+8 -8
View File
@@ -223,12 +223,12 @@ function public.formatted_post_filter(components)
elseif i > 1 then
str = str..'</p><p>'
for _=1,getn(stack) do
str = str..aux.gui.color.content.backdrop('----')
str = str..aux.gui.color.content.background('----')
end
end
no_line_break = component[1] == 'operator' and component[2] == 'not'
local filter_color = (m.filter_builder_state.selected == i and aux.gui.color.green or aux.gui.color.yellow)
local filter_color = (m.filter_builder_state.selected == i and aux.gui.color.orange or aux.gui.color.aux)
local component_text = filter_color(component[2])
if component[1] == 'operator' and component[2] ~= 'not' then
component_text = component_text..filter_color(tonumber(component[3]) or '')
@@ -236,11 +236,9 @@ function public.formatted_post_filter(components)
elseif component[1] == 'filter' then
for parameter in aux.util.present(component[3]) do
if component[2] == 'item' then
parameter = aux.info.display_name(aux.cache.item_id(parameter)) or aux.gui.color.orange('['..parameter..']')
parameter = aux.info.display_name(aux.cache.item_id(parameter)) or '['..parameter..']'
elseif aux.filter.filters[component[2]].input_type == 'money' then
parameter = aux.money.to_string(aux.money.from_string(parameter), nil, true, nil, aux.auction_listing.colors.ORANGE)
else
parameter = aux.gui.color.orange(parameter)
parameter = aux.money.to_string(aux.money.from_string(parameter), nil, true)
end
component_text = component_text..filter_color(': ')..parameter
end
@@ -355,11 +353,13 @@ function private.initialize_filter_dropdown()
value = filter,
func = function()
m.filter_input:SetText(this.value)
if aux.filter.filters[this.value] and aux.filter.filters[this.value].input_type ~= '' then
if aux.index(aux.filter.filters[this.value], 'input_type') == '' or this.value == 'not' then
m.add_post_filter()
elseif aux.filter.filters[this.value] then
m.filter_parameter_input:Show()
m.filter_parameter_input:SetFocus()
else
m.add_post_filter()
m.filter_input:SetFocus()
end
end,
}
+3 -2
View File
@@ -54,7 +54,7 @@ function private.create_frames()
do
local panel = CreateFrame('Frame', nil, m.frame)
panel:SetBackdrop{bgFile=[[Interface\Buttons\WHITE8X8]]}
panel:SetBackdropColor(unpack(aux.gui.color.content.backdrop))
panel:SetBackdropColor(unpack(aux.gui.color.content.background))
panel:SetPoint('LEFT', m.settings_button, 'RIGHT', 0, 0)
panel:SetPoint('RIGHT', 0, 0)
panel:SetHeight(42)
@@ -565,7 +565,7 @@ function private.create_frames()
input:SetPoint('LEFT', m.filter_dropdown, 'RIGHT', 10, 0)
input:SetWidth(150)
input:SetScript('OnTabPressed', function()
m.filter_parameter_input:SetFocus()
m.filter_input:SetFocus()
end)
input:SetScript('OnChar', function()
this:complete()
@@ -609,6 +609,7 @@ function private.create_frames()
local scroll_child = CreateFrame('SimpleHTML', nil, scroll_frame)
scroll_frame:SetScrollChild(scroll_child)
scroll_child:SetFont('p', [[Fonts\ARIALN.TTF]], 23)
scroll_child:SetTextColor('p', aux.gui.color.label.enabled())
scroll_child:SetWidth(1)
scroll_child:SetHeight(1)
scroll_child:SetScript('OnHyperlinkClick', m.data_link_click)