--[[
	Shows all ScreenGuis and CoreGuis that were hidden by `hideGuis`. If the
	callback `showOtherGuis` is defined then that function is called instead.
]]

function GuiController:showGuis()
	if self.showOtherGuis and self.showOtherGuis.isCallbackSet() then
		self.showOtherGuis.fireCallback()
		return
	end

	-- Show ScreenGuis that were hidden by `hideGuis`
	for _, gui in ipairs(self.disabledGuis) do
		gui.Enabled = true
	end
	self.disabledGuis = {}

	-- Show CoreGuis that were hidden by `hideGuis`
	for _, gui in ipairs(self.disabledCoreGuis) do
		self.StarterGui:SetCoreGuiEnabled(gui, true)
	end
	self.disabledCoreGuis = {}

	-- Set the visibility of mobile controls to what they were before
	-- `hideGuis` was called
	self.UserInputService.ModalEnabled = self.modalEnabled
end
