big refactoring
This commit is contained in:
@@ -1064,7 +1064,7 @@ function public.CreateAuctionResultsTable(parent, config)
|
|||||||
local text = cell:CreateFontString()
|
local text = cell:CreateFontString()
|
||||||
text:SetJustifyH 'CENTER'
|
text:SetJustifyH 'CENTER'
|
||||||
text:SetJustifyV 'CENTER'
|
text:SetJustifyV 'CENTER'
|
||||||
text:SetFont(gui.config.font, 12)
|
text:SetFont(gui.font, 12)
|
||||||
text:SetTextColor(color.label.enabled())
|
text:SetTextColor(color.label.enabled())
|
||||||
cell:SetFontString(text)
|
cell:SetFontString(text)
|
||||||
if not column_config.isPrice then cell:SetText(column_config.title or '') end -- TODO
|
if not column_config.isPrice then cell:SetText(column_config.title or '') end -- TODO
|
||||||
@@ -1110,7 +1110,7 @@ function public.CreateAuctionResultsTable(parent, config)
|
|||||||
for j=1, getn(rt.config) do
|
for j=1, getn(rt.config) do
|
||||||
local cell = CreateFrame('Button', nil, row)
|
local cell = CreateFrame('Button', nil, row)
|
||||||
local text = cell:CreateFontString()
|
local text = cell:CreateFontString()
|
||||||
text:SetFont(gui.config.font, min(14, rt.ROW_HEIGHT))
|
text:SetFont(gui.font, min(14, rt.ROW_HEIGHT))
|
||||||
text:SetJustifyH(rt.config[j].align or 'LEFT')
|
text:SetJustifyH(rt.config[j].align or 'LEFT')
|
||||||
text:SetJustifyV 'CENTER'
|
text:SetJustifyV 'CENTER'
|
||||||
text:SetPoint('TOPLEFT', 1, -1)
|
text:SetPoint('TOPLEFT', 1, -1)
|
||||||
|
|||||||
+22
-23
@@ -1,15 +1,15 @@
|
|||||||
module 'gui'
|
module 'gui'
|
||||||
|
|
||||||
public.config = {
|
public.font = [[Fonts\ARIALN.TTF]]
|
||||||
edge_size = 1.5,
|
|
||||||
font = [[Fonts\ARIALN.TTF]],
|
public.font_size = {
|
||||||
small_font_size = 13,
|
small = 13,
|
||||||
small_font_size2 = 14,
|
small2 = 14,
|
||||||
medium_font_size = 15,
|
medium = 15,
|
||||||
medium_font_size2 = 16,
|
medium2 = 16,
|
||||||
large_font_size = 17,
|
large = 17,
|
||||||
large_font_size2 = 18,
|
large2 = 18,
|
||||||
huge_font_size = 23,
|
huge = 23,
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -79,7 +79,7 @@ do
|
|||||||
button:SetPoint('TOPLEFT', 0, -((button:GetID() - 1) * UIDROPDOWNMENU_BUTTON_HEIGHT) - 7)
|
button:SetPoint('TOPLEFT', 0, -((button:GetID() - 1) * UIDROPDOWNMENU_BUTTON_HEIGHT) - 7)
|
||||||
button:SetPoint('TOPRIGHT', 0, -((button:GetID() - 1) * UIDROPDOWNMENU_BUTTON_HEIGHT) - 7)
|
button:SetPoint('TOPRIGHT', 0, -((button:GetID() - 1) * UIDROPDOWNMENU_BUTTON_HEIGHT) - 7)
|
||||||
local text = button:GetFontString()
|
local text = button:GetFontString()
|
||||||
text:SetFont(config.font, config.small_font_size2)
|
text:SetFont(font, font_size.small2)
|
||||||
text:SetPoint('TOPLEFT', 18, 0)
|
text:SetPoint('TOPLEFT', 18, 0)
|
||||||
text:SetPoint('BOTTOMRIGHT', -8, 0)
|
text:SetPoint('BOTTOMRIGHT', -8, 0)
|
||||||
local highlight = getglobal('DropDownList1Button'..i..'Highlight')
|
local highlight = getglobal('DropDownList1Button'..i..'Highlight')
|
||||||
@@ -121,7 +121,7 @@ function public.set_size(frame, width, height)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function public.set_frame_style(frame, backdrop_color, border_color, left, right, top, bottom)
|
function public.set_frame_style(frame, backdrop_color, border_color, left, right, top, bottom)
|
||||||
frame:SetBackdrop{bgFile=[[Interface\Buttons\WHITE8X8]], edgeFile=[[Interface\Buttons\WHITE8X8]], edgeSize=config.edge_size, tile=true, insets={left=left, right=right, top=top, bottom=bottom}}
|
frame:SetBackdrop{bgFile=[[Interface\Buttons\WHITE8X8]], edgeFile=[[Interface\Buttons\WHITE8X8]], edgeSize=1.5, tile=true, insets={left=left, right=right, top=top, bottom=bottom}}
|
||||||
frame:SetBackdropColor(backdrop_color())
|
frame:SetBackdropColor(backdrop_color())
|
||||||
frame:SetBackdropBorderColor(border_color())
|
frame:SetBackdropBorderColor(border_color())
|
||||||
end
|
end
|
||||||
@@ -174,7 +174,7 @@ function public.button(parent, text_height)
|
|||||||
button.highlight = highlight
|
button.highlight = highlight
|
||||||
do
|
do
|
||||||
local label = button:CreateFontString()
|
local label = button:CreateFontString()
|
||||||
label:SetFont(config.font, text_height)
|
label:SetFont(font, text_height)
|
||||||
label:SetPoint('CENTER', 0, 0)
|
label:SetPoint('CENTER', 0, 0)
|
||||||
label:SetJustifyH 'CENTER'
|
label:SetJustifyH 'CENTER'
|
||||||
label:SetJustifyV 'CENTER'
|
label:SetJustifyV 'CENTER'
|
||||||
@@ -210,8 +210,7 @@ do
|
|||||||
tab.id = id
|
tab.id = id
|
||||||
tab.group = self
|
tab.group = self
|
||||||
tab:SetHeight(24)
|
tab:SetHeight(24)
|
||||||
tab:SetBackdrop{bgFile=[[Interface\Buttons\WHITE8X8]], edgeFile=[[Interface\Buttons\WHITE8X8]], edgeSize=config.edge_size}
|
set_panel_style(tab)
|
||||||
tab:SetBackdropBorderColor(color.panel.border())
|
|
||||||
local dock = tab:CreateTexture(nil, 'OVERLAY')
|
local dock = tab:CreateTexture(nil, 'OVERLAY')
|
||||||
dock:SetHeight(3)
|
dock:SetHeight(3)
|
||||||
if self._orientation == 'UP' then
|
if self._orientation == 'UP' then
|
||||||
@@ -234,7 +233,7 @@ do
|
|||||||
tab.text:SetPoint('RIGHT', -3, -1)
|
tab.text:SetPoint('RIGHT', -3, -1)
|
||||||
tab.text:SetJustifyH 'CENTER'
|
tab.text:SetJustifyH 'CENTER'
|
||||||
tab.text:SetJustifyV 'CENTER'
|
tab.text:SetJustifyV 'CENTER'
|
||||||
tab.text:SetFont(config.font, config.large_font_size2)
|
tab.text:SetFont(font, font_size.large2)
|
||||||
tab:SetFontString(tab.text)
|
tab:SetFontString(tab.text)
|
||||||
|
|
||||||
tab:SetText(text)
|
tab:SetText(text)
|
||||||
@@ -368,21 +367,21 @@ function public.editbox(parent)
|
|||||||
self.display:SetJustifyH(alignment)
|
self.display:SetJustifyH(alignment)
|
||||||
end
|
end
|
||||||
function editbox:SetFontSize(size)
|
function editbox:SetFontSize(size)
|
||||||
self:SetFont(config.font, size)
|
self:SetFont(font, size)
|
||||||
self.display:SetFont(config.font, size)
|
self.display:SetFont(font, size)
|
||||||
end
|
end
|
||||||
local display = label(editbox)
|
local display = label(editbox)
|
||||||
display:SetPoint('LEFT', 1.5, 0)
|
display:SetPoint('LEFT', 1.5, 0)
|
||||||
display:SetPoint('RIGHT', -1.5, 0)
|
display:SetPoint('RIGHT', -1.5, 0)
|
||||||
display:SetTextColor(color.text.enabled())
|
display:SetTextColor(color.text.enabled())
|
||||||
editbox.display = display
|
editbox.display = display
|
||||||
local cursor = label(editbox, config.large_font_size)
|
local cursor = label(editbox, font_size.large)
|
||||||
cursor:SetText '|'
|
cursor:SetText '|'
|
||||||
cursor:SetTextColor(color.text.enabled())
|
cursor:SetTextColor(color.text.enabled())
|
||||||
cursor:SetAlpha(0)
|
cursor:SetAlpha(0)
|
||||||
editbox.cursor = cursor
|
editbox.cursor = cursor
|
||||||
editbox:SetAlignment 'LEFT'
|
editbox:SetAlignment 'LEFT'
|
||||||
editbox:SetFontSize(config.medium_font_size)
|
editbox:SetFontSize(font_size.medium)
|
||||||
return editbox
|
return editbox
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -478,7 +477,7 @@ end
|
|||||||
|
|
||||||
function public.label(parent, size)
|
function public.label(parent, size)
|
||||||
local label = parent:CreateFontString()
|
local label = parent:CreateFontString()
|
||||||
label:SetFont(config.font, size or config.small_font_size)
|
label:SetFont(font, size or font_size.small)
|
||||||
label:SetTextColor(color.label.enabled())
|
label:SetTextColor(color.label.enabled())
|
||||||
return label
|
return label
|
||||||
end
|
end
|
||||||
@@ -527,7 +526,7 @@ function public.dropdown(parent)
|
|||||||
text:ClearAllPoints()
|
text:ClearAllPoints()
|
||||||
text:SetPoint('RIGHT', button, 'LEFT', -2, 0)
|
text:SetPoint('RIGHT', button, 'LEFT', -2, 0)
|
||||||
text:SetPoint('LEFT', 8, 0)
|
text:SetPoint('LEFT', 8, 0)
|
||||||
text:SetFont(config.font, config.medium_font_size)
|
text:SetFont(font, font_size.medium)
|
||||||
text:SetShadowColor(0, 0, 0, 0)
|
text:SetShadowColor(0, 0, 0, 0)
|
||||||
|
|
||||||
return dropdown
|
return dropdown
|
||||||
@@ -555,7 +554,7 @@ function public.slider(parent)
|
|||||||
label:SetPoint('BOTTOMRIGHT', slider, 'TOPRIGHT', 6, 8)
|
label:SetPoint('BOTTOMRIGHT', slider, 'TOPRIGHT', 6, 8)
|
||||||
label:SetJustifyH 'LEFT'
|
label:SetJustifyH 'LEFT'
|
||||||
label:SetHeight(13)
|
label:SetHeight(13)
|
||||||
label:SetFont(config.font, config.small_font_size)
|
label:SetFont(font, font_size.small)
|
||||||
label:SetTextColor(color.label.enabled())
|
label:SetTextColor(color.label.enabled())
|
||||||
|
|
||||||
local editbox = editbox(slider)
|
local editbox = editbox(slider)
|
||||||
|
|||||||
+4
-4
@@ -305,7 +305,7 @@ local methods = {
|
|||||||
|
|
||||||
local text = col:CreateFontString()
|
local text = col:CreateFontString()
|
||||||
text:SetJustifyV('CENTER')
|
text:SetJustifyV('CENTER')
|
||||||
text:SetFont(gui.config.font, 16)
|
text:SetFont(gui.font, 16)
|
||||||
text:SetTextColor(color.text.enabled())
|
text:SetTextColor(color.text.enabled())
|
||||||
text:SetAllPoints()
|
text:SetAllPoints()
|
||||||
col.text = text
|
col.text = text
|
||||||
@@ -333,7 +333,7 @@ local methods = {
|
|||||||
local colNum = getn(row.cols) + 1
|
local colNum = getn(row.cols) + 1
|
||||||
local col = CreateFrame('Button', nil, row)
|
local col = CreateFrame('Button', nil, row)
|
||||||
local text = col:CreateFontString()
|
local text = col:CreateFontString()
|
||||||
text:SetFont(gui.config.font, ST_ROW_TEXT_SIZE)
|
text:SetFont(gui.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)
|
||||||
@@ -389,9 +389,9 @@ local methods = {
|
|||||||
-- update the text size of the head cols
|
-- update the text size of the head cols
|
||||||
for _, col in st.headCols do
|
for _, col in st.headCols do
|
||||||
if st.sizes.headFontSize then
|
if st.sizes.headFontSize then
|
||||||
col.text:SetFont(gui.config.font, st.sizes.headFontSize)
|
col.text:SetFont(gui.font, st.sizes.headFontSize)
|
||||||
else
|
else
|
||||||
col.text:SetFont(gui.config.font, gui.config.medium_font_size)
|
col.text:SetFont(gui.font, gui.font_size.medium)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
st:Redraw()
|
st:Redraw()
|
||||||
|
|||||||
+7
-7
@@ -32,7 +32,7 @@ function create_frames()
|
|||||||
checkbox:SetScript('OnClick', function()
|
checkbox:SetScript('OnClick', function()
|
||||||
refresh = true
|
refresh = true
|
||||||
end)
|
end)
|
||||||
local label = gui.label(checkbox, gui.config.small_font_size)
|
local label = gui.label(checkbox, gui.font_size.small)
|
||||||
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
|
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
|
||||||
label:SetText('Show hidden items')
|
label:SetText('Show hidden items')
|
||||||
show_hidden_checkbox = checkbox
|
show_hidden_checkbox = checkbox
|
||||||
@@ -180,7 +180,7 @@ function create_frames()
|
|||||||
local dropdown = gui.dropdown(frame.parameters)
|
local dropdown = gui.dropdown(frame.parameters)
|
||||||
dropdown:SetPoint('TOPLEFT', stack_count_slider, 'BOTTOMLEFT', 0, -19)
|
dropdown:SetPoint('TOPLEFT', stack_count_slider, 'BOTTOMLEFT', 0, -19)
|
||||||
dropdown:SetWidth(90)
|
dropdown:SetWidth(90)
|
||||||
local label = gui.label(dropdown, gui.config.small_font_size)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText('Duration')
|
label:SetText('Duration')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_duration_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_duration_dropdown)
|
||||||
@@ -190,7 +190,7 @@ function create_frames()
|
|||||||
duration_dropdown = dropdown
|
duration_dropdown = dropdown
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local label = gui.label(frame.parameters, gui.config.medium_font_size)
|
local label = gui.label(frame.parameters, gui.font_size.medium)
|
||||||
label:SetPoint('LEFT', duration_dropdown, 'RIGHT', 25, 0)
|
label:SetPoint('LEFT', duration_dropdown, 'RIGHT', 25, 0)
|
||||||
deposit = label
|
deposit = label
|
||||||
end
|
end
|
||||||
@@ -203,7 +203,7 @@ function create_frames()
|
|||||||
write_settings(settings)
|
write_settings(settings)
|
||||||
refresh = true
|
refresh = true
|
||||||
end)
|
end)
|
||||||
local label = gui.label(checkbox, gui.config.small_font_size)
|
local label = gui.label(checkbox, gui.font_size.small)
|
||||||
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
|
label:SetPoint('LEFT', checkbox, 'RIGHT', 4, 1)
|
||||||
label:SetText 'Hide this item'
|
label:SetText 'Hide this item'
|
||||||
hide_checkbox = checkbox
|
hide_checkbox = checkbox
|
||||||
@@ -253,7 +253,7 @@ function create_frames()
|
|||||||
editbox.pretty:SetJustifyH 'RIGHT'
|
editbox.pretty:SetJustifyH 'RIGHT'
|
||||||
editbox.pretty:SetTextColor(color.text.enabled())
|
editbox.pretty:SetTextColor(color.text.enabled())
|
||||||
do
|
do
|
||||||
local label = gui.label(frame, gui.config.small_font_size)
|
local label = gui.label(frame, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
||||||
label:SetText 'Unit Starting Price'
|
label:SetText 'Unit Starting Price'
|
||||||
end
|
end
|
||||||
@@ -305,7 +305,7 @@ function create_frames()
|
|||||||
editbox.pretty:SetJustifyH 'RIGHT'
|
editbox.pretty:SetJustifyH 'RIGHT'
|
||||||
editbox.pretty:SetTextColor(color.text.enabled())
|
editbox.pretty:SetTextColor(color.text.enabled())
|
||||||
do
|
do
|
||||||
local label = gui.label(frame, gui.config.small_font_size)
|
local label = gui.label(frame, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', frame, 'TOPLEFT', -2, 1)
|
||||||
label:SetText 'Unit Buyout Price'
|
label:SetText 'Unit Buyout Price'
|
||||||
end
|
end
|
||||||
@@ -330,7 +330,7 @@ function create_frames()
|
|||||||
set_unit_buyout_price(this.amount)
|
set_unit_buyout_price(this.amount)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
local label = gui.label(btn, gui.config.small_font_size)
|
local label = gui.label(btn, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', btn, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', btn, 'TOPLEFT', -2, 1)
|
||||||
label:SetText 'Historical Value'
|
label:SetText 'Historical Value'
|
||||||
historical_value_button = btn
|
historical_value_button = btn
|
||||||
|
|||||||
+17
-17
@@ -103,7 +103,7 @@ function create_frames()
|
|||||||
editbox:SetScript('OnTabPressed', function() first_page_input:SetFocus() end)
|
editbox:SetScript('OnTabPressed', function() first_page_input:SetFocus() end)
|
||||||
editbox.enter = execute
|
editbox.enter = execute
|
||||||
editbox.change = change
|
editbox.change = change
|
||||||
local label = gui.label(editbox, gui.config.medium_font_size)
|
local label = gui.label(editbox, gui.font_size.medium)
|
||||||
label:SetPoint('RIGHT', editbox, 'LEFT', -3.5, 0)
|
label:SetPoint('RIGHT', editbox, 'LEFT', -3.5, 0)
|
||||||
label:SetText('-')
|
label:SetText('-')
|
||||||
label:SetTextColor(color.text.enabled())
|
label:SetTextColor(color.text.enabled())
|
||||||
@@ -187,7 +187,7 @@ function create_frames()
|
|||||||
next_button = btn
|
next_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = gui.button(controls, gui.config.huge_font_size)
|
local btn = gui.button(controls, gui.font_size.huge)
|
||||||
btn:SetPoint('RIGHT', -5, 0)
|
btn:SetPoint('RIGHT', -5, 0)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
@@ -202,7 +202,7 @@ function create_frames()
|
|||||||
start_button = btn
|
start_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = gui.button(controls, gui.config.huge_font_size)
|
local btn = gui.button(controls, gui.font_size.huge)
|
||||||
btn:SetPoint('RIGHT', -5, 0)
|
btn:SetPoint('RIGHT', -5, 0)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
@@ -213,7 +213,7 @@ function create_frames()
|
|||||||
stop_button = btn
|
stop_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = gui.button(controls, gui.config.huge_font_size)
|
local btn = gui.button(controls, gui.font_size.huge)
|
||||||
btn:SetPoint('RIGHT', start_button, 'LEFT', -4, 0)
|
btn:SetPoint('RIGHT', start_button, 'LEFT', -4, 0)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
@@ -242,7 +242,7 @@ function create_frames()
|
|||||||
gui.horizontal_line(frame, -40)
|
gui.horizontal_line(frame, -40)
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = gui.button(frame, gui.config.large_font_size2)
|
local btn = gui.button(frame, gui.font_size.large2)
|
||||||
btn:SetPoint('BOTTOMLEFT', frame.content, 'TOPLEFT', 10, 8)
|
btn:SetPoint('BOTTOMLEFT', frame.content, 'TOPLEFT', 10, 8)
|
||||||
btn:SetWidth(243)
|
btn:SetWidth(243)
|
||||||
btn:SetHeight(22)
|
btn:SetHeight(22)
|
||||||
@@ -251,7 +251,7 @@ function create_frames()
|
|||||||
search_results_button = btn
|
search_results_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = gui.button(frame, gui.config.large_font_size2)
|
local btn = gui.button(frame, gui.font_size.large2)
|
||||||
btn:SetPoint('TOPLEFT', search_results_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', search_results_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(243)
|
btn:SetWidth(243)
|
||||||
btn:SetHeight(22)
|
btn:SetHeight(22)
|
||||||
@@ -260,7 +260,7 @@ function create_frames()
|
|||||||
saved_searches_button = btn
|
saved_searches_button = btn
|
||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = gui.button(frame, gui.config.large_font_size2)
|
local btn = gui.button(frame, gui.font_size.large2)
|
||||||
btn:SetPoint('TOPLEFT', saved_searches_button, 'TOPRIGHT', 5, 0)
|
btn:SetPoint('TOPLEFT', saved_searches_button, 'TOPRIGHT', 5, 0)
|
||||||
btn:SetWidth(243)
|
btn:SetWidth(243)
|
||||||
btn:SetHeight(22)
|
btn:SetHeight(22)
|
||||||
@@ -365,7 +365,7 @@ function create_frames()
|
|||||||
end)
|
end)
|
||||||
editbox.change = update_form
|
editbox.change = update_form
|
||||||
editbox.enter = L(editbox.ClearFocus, editbox)
|
editbox.enter = L(editbox.ClearFocus, editbox)
|
||||||
local label = gui.label(editbox, gui.config.small_font_size)
|
local label = gui.label(editbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText 'Name'
|
label:SetText 'Name'
|
||||||
name_input = editbox
|
name_input = editbox
|
||||||
@@ -374,7 +374,7 @@ function create_frames()
|
|||||||
local checkbox = gui.checkbox(frame.filter)
|
local checkbox = gui.checkbox(frame.filter)
|
||||||
checkbox:SetPoint('TOPLEFT', name_input, 'TOPRIGHT', 16, 0)
|
checkbox:SetPoint('TOPLEFT', name_input, 'TOPRIGHT', 16, 0)
|
||||||
checkbox:SetScript('OnClick', update_form)
|
checkbox:SetScript('OnClick', update_form)
|
||||||
local label = gui.label(checkbox, gui.config.small_font_size)
|
local label = gui.label(checkbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText('Exact')
|
label:SetText('Exact')
|
||||||
exact_checkbox = checkbox
|
exact_checkbox = checkbox
|
||||||
@@ -399,7 +399,7 @@ function create_frames()
|
|||||||
end
|
end
|
||||||
update_form()
|
update_form()
|
||||||
end
|
end
|
||||||
local label = gui.label(editbox, gui.config.small_font_size)
|
local label = gui.label(editbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText 'Level Range'
|
label:SetText 'Level Range'
|
||||||
min_level_input = editbox
|
min_level_input = editbox
|
||||||
@@ -424,7 +424,7 @@ function create_frames()
|
|||||||
end
|
end
|
||||||
update_form()
|
update_form()
|
||||||
end
|
end
|
||||||
local label = gui.label(editbox, gui.config.medium_font_size)
|
local label = gui.label(editbox, gui.font_size.medium)
|
||||||
label:SetPoint('RIGHT', editbox, 'LEFT', -3, 0)
|
label:SetPoint('RIGHT', editbox, 'LEFT', -3, 0)
|
||||||
label:SetText('-')
|
label:SetText('-')
|
||||||
max_level_input = editbox
|
max_level_input = editbox
|
||||||
@@ -433,7 +433,7 @@ function create_frames()
|
|||||||
local checkbox = gui.checkbox(frame.filter)
|
local checkbox = gui.checkbox(frame.filter)
|
||||||
checkbox:SetPoint('TOPLEFT', max_level_input, 'TOPRIGHT', 16, 0)
|
checkbox:SetPoint('TOPLEFT', max_level_input, 'TOPRIGHT', 16, 0)
|
||||||
checkbox:SetScript('OnClick', update_form)
|
checkbox:SetScript('OnClick', update_form)
|
||||||
local label = gui.label(checkbox, gui.config.small_font_size)
|
local label = gui.label(checkbox, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', -2, 1)
|
||||||
label:SetText('Usable')
|
label:SetText('Usable')
|
||||||
usable_checkbox = checkbox
|
usable_checkbox = checkbox
|
||||||
@@ -443,7 +443,7 @@ function create_frames()
|
|||||||
class_dropdown = dropdown
|
class_dropdown = dropdown
|
||||||
dropdown:SetPoint('TOPLEFT', min_level_input, 'BOTTOMLEFT', 0, 5 - FILTER_SPACING)
|
dropdown:SetPoint('TOPLEFT', min_level_input, 'BOTTOMLEFT', 0, 5 - FILTER_SPACING)
|
||||||
dropdown:SetWidth(300)
|
dropdown:SetWidth(300)
|
||||||
local label = gui.label(dropdown, gui.config.small_font_size)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText('Item Class')
|
label:SetText('Item Class')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_class_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_class_dropdown)
|
||||||
@@ -456,7 +456,7 @@ function create_frames()
|
|||||||
subclass_dropdown = dropdown
|
subclass_dropdown = dropdown
|
||||||
dropdown:SetPoint('TOPLEFT', class_dropdown, 'BOTTOMLEFT', 0, 10 - FILTER_SPACING)
|
dropdown:SetPoint('TOPLEFT', class_dropdown, 'BOTTOMLEFT', 0, 10 - FILTER_SPACING)
|
||||||
dropdown:SetWidth(300)
|
dropdown:SetWidth(300)
|
||||||
local label = gui.label(dropdown, gui.config.small_font_size)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText('Item Subclass')
|
label:SetText('Item Subclass')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_subclass_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_subclass_dropdown)
|
||||||
@@ -469,7 +469,7 @@ function create_frames()
|
|||||||
slot_dropdown = dropdown
|
slot_dropdown = dropdown
|
||||||
dropdown:SetPoint('TOPLEFT', subclass_dropdown, 'BOTTOMLEFT', 0, 10 - FILTER_SPACING)
|
dropdown:SetPoint('TOPLEFT', subclass_dropdown, 'BOTTOMLEFT', 0, 10 - FILTER_SPACING)
|
||||||
dropdown:SetWidth(300)
|
dropdown:SetWidth(300)
|
||||||
local label = gui.label(dropdown, gui.config.small_font_size)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText('Item Slot')
|
label:SetText('Item Slot')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_slot_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_slot_dropdown)
|
||||||
@@ -482,7 +482,7 @@ function create_frames()
|
|||||||
quality_dropdown = dropdown
|
quality_dropdown = dropdown
|
||||||
dropdown:SetPoint('TOPLEFT', slot_dropdown, 'BOTTOMLEFT', 0, 10 - FILTER_SPACING)
|
dropdown:SetPoint('TOPLEFT', slot_dropdown, 'BOTTOMLEFT', 0, 10 - FILTER_SPACING)
|
||||||
dropdown:SetWidth(300)
|
dropdown:SetWidth(300)
|
||||||
local label = gui.label(dropdown, gui.config.small_font_size)
|
local label = gui.label(dropdown, gui.font_size.small)
|
||||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -3)
|
||||||
label:SetText('Min Quality')
|
label:SetText('Min Quality')
|
||||||
UIDropDownMenu_Initialize(dropdown, initialize_quality_dropdown)
|
UIDropDownMenu_Initialize(dropdown, initialize_quality_dropdown)
|
||||||
@@ -500,7 +500,7 @@ function create_frames()
|
|||||||
UIDropDownMenu_Initialize(this, initialize_filter_dropdown)
|
UIDropDownMenu_Initialize(this, initialize_filter_dropdown)
|
||||||
end)
|
end)
|
||||||
getglobal(dropdown:GetName()..'Text'):Hide()
|
getglobal(dropdown:GetName()..'Text'):Hide()
|
||||||
local label = gui.label(dropdown, gui.config.medium_font_size)
|
local label = gui.label(dropdown, gui.font_size.medium)
|
||||||
label:SetPoint('RIGHT', dropdown, 'LEFT', -15, 0)
|
label:SetPoint('RIGHT', dropdown, 'LEFT', -15, 0)
|
||||||
label:SetText('Post Filter')
|
label:SetText('Post Filter')
|
||||||
filter_dropdown = dropdown
|
filter_dropdown = dropdown
|
||||||
|
|||||||
Reference in New Issue
Block a user