new resume button style

This commit is contained in:
Manuel Simon Hirsig
2016-07-12 23:20:46 +02:00
parent 7eef768e67
commit afee86364b
2 changed files with 18 additions and 6 deletions
+16 -4
View File
@@ -246,7 +246,7 @@ function public.execute(mode, filter_string)
elseif mode == 'resume' then
queries = private.current_search().continuation
private.current_search().continuation = nil
private.resume_button:Disable()
private.disable_resume()
private.results_listing:SetSelectedRecord()
end
@@ -306,7 +306,7 @@ function public.execute(mode, filter_string)
end
search.continuation = queries
if private.current_search() == search then
private.resume_button:Enable()
private.enable_resume()
end
end,
}
@@ -405,6 +405,18 @@ do
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
local searches = { [0] = {
filter_string = '',
@@ -437,9 +449,9 @@ do
private.refresh_button:Enable()
end
if searches[search_index].continuation then
private.resume_button:Enable()
private.enable_resume()
else
private.resume_button:Disable()
private.disable_resume()
end
end
+2 -2
View File
@@ -22,7 +22,7 @@ function Aux.search_frame.create_frames(private, public)
btn:SetPoint('TOPRIGHT', -5, -8)
btn:SetWidth(70)
btn:SetHeight(25)
btn:SetText('Resume')
btn:SetText(GREEN_FONT_COLOR_CODE..'Resume'..FONT_COLOR_CODE_CLOSE)
btn:SetScript('OnClick', function()
private.search_box:ClearFocus()
public.execute('resume')
@@ -31,7 +31,7 @@ function Aux.search_frame.create_frames(private, public)
end
do
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:SetHeight(25)
btn:SetText('Refresh')