Hey there is it possible to create a Toggle function but NOT like this:
if blabla:IsShown() then
blabla Hide()
I wanna toggle between
WIM.HideAllWindows()
WIM.ShowAllWindows()
so i have to create a function that says .. on the first click = WIM.HideAllWindows(), on the second click = WIM.ShowAllWindows() .. and then back to the first.
Is something like this possible?
local hidden -- outside of function to preserve variable
function toggleWindows()
if hidden then
WIM.ShowAllWindows()
else
WIM.HideAllWindows()
end
hidden = not hidden -- toggles the flag
end