function UIController.setView(j,...)(coroutine.wrap(function(...)if not views[j]then Logger.warn("\084\114\105\101\100 \116\111 \115\101\116 \085\073\067\111\110\116\114\111\108\108\101\114 \118\105\101\119 \116\111 ",j,"\044 \098\117\116 \105\116 \100\111\101\115 \110\111\116 \101\120\105\115\116\033")return end if currentView then currentView.exit()end currentView=views[j]currentView.enter(...)end))(...)end
--[[
	Sets the new view, destructing any previous view if it exists, and then creating the specified
	new view.
]]
function UIController.setView(view, ...)
	coroutine.wrap(function(...)
		if not views[view] then
			Logger.warn("Tried to set UIController view to ", view, ", but it does not exist!")
			return
		end

		if currentView then
			currentView.exit()
		end

		currentView = views[view]
		currentView.enter(...)
	end)(...)
end
