new resume button style
This commit is contained in:
+16
-4
@@ -246,7 +246,7 @@ function public.execute(mode, filter_string)
|
|||||||
elseif mode == 'resume' then
|
elseif mode == 'resume' then
|
||||||
queries = private.current_search().continuation
|
queries = private.current_search().continuation
|
||||||
private.current_search().continuation = nil
|
private.current_search().continuation = nil
|
||||||
private.resume_button:Disable()
|
private.disable_resume()
|
||||||
private.results_listing:SetSelectedRecord()
|
private.results_listing:SetSelectedRecord()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ function public.execute(mode, filter_string)
|
|||||||
end
|
end
|
||||||
search.continuation = queries
|
search.continuation = queries
|
||||||
if private.current_search() == search then
|
if private.current_search() == search then
|
||||||
private.resume_button:Enable()
|
private.enable_resume()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -405,6 +405,18 @@ do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function private.enable_resume()
|
||||||
|
private.resume_button:Show()
|
||||||
|
private.refresh_button:ClearAllPoints()
|
||||||
|
private.refresh_button:SetPoint('RIGHT', private.resume_button, 'LEFT', -4, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
function private.disable_resume()
|
||||||
|
private.resume_button:Hide()
|
||||||
|
private.refresh_button:ClearAllPoints()
|
||||||
|
private.refresh_button:SetPoint('TOPRIGHT', -5, -8)
|
||||||
|
end
|
||||||
|
|
||||||
do
|
do
|
||||||
local searches = { [0] = {
|
local searches = { [0] = {
|
||||||
filter_string = '',
|
filter_string = '',
|
||||||
@@ -437,9 +449,9 @@ do
|
|||||||
private.refresh_button:Enable()
|
private.refresh_button:Enable()
|
||||||
end
|
end
|
||||||
if searches[search_index].continuation then
|
if searches[search_index].continuation then
|
||||||
private.resume_button:Enable()
|
private.enable_resume()
|
||||||
else
|
else
|
||||||
private.resume_button:Disable()
|
private.disable_resume()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ function Aux.search_frame.create_frames(private, public)
|
|||||||
btn:SetPoint('TOPRIGHT', -5, -8)
|
btn:SetPoint('TOPRIGHT', -5, -8)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
btn:SetText('Resume')
|
btn:SetText(GREEN_FONT_COLOR_CODE..'Resume'..FONT_COLOR_CODE_CLOSE)
|
||||||
btn:SetScript('OnClick', function()
|
btn:SetScript('OnClick', function()
|
||||||
private.search_box:ClearFocus()
|
private.search_box:ClearFocus()
|
||||||
public.execute('resume')
|
public.execute('resume')
|
||||||
@@ -31,7 +31,7 @@ function Aux.search_frame.create_frames(private, public)
|
|||||||
end
|
end
|
||||||
do
|
do
|
||||||
local btn = Aux.gui.button(AuxSearchFrame, 22)
|
local btn = Aux.gui.button(AuxSearchFrame, 22)
|
||||||
btn:SetPoint('RIGHT', private.resume_button, 'LEFT', -4, 0)
|
btn:SetPoint('TOPRIGHT', -5, -8)
|
||||||
btn:SetWidth(70)
|
btn:SetWidth(70)
|
||||||
btn:SetHeight(25)
|
btn:SetHeight(25)
|
||||||
btn:SetText('Refresh')
|
btn:SetText('Refresh')
|
||||||
|
|||||||
Reference in New Issue
Block a user