function GameFieldFunc(message)
	if message == "Game field options credits button pressed" then
		SendMessage("Screen", "template ZGlassTemplate")
		SendMessage("Screen", "create top instance")
		SendMessage("Game field modal dialog alpha changer", "change alpha to 0.0")
		SendMessage("Game field alpha changer", "change alpha to 0.0")
		SendMessage("Game field panel mover", "report arrival to post:lua:GameFieldFunc")
		SendMessage("Game field panel mover", "set arrival message Game field panel out for credits")
		SendMessage("Game field panel mover", "move to out")
	elseif message == "Game field panel out for credits" then
		SendMessage("Screen", "erase top child")
			-- ZGlass
		SendMessage("Screen", "template GameFieldCreditsZGlassTemplate")
		SendMessage("Screen", "create top instance")
		SendMessage("Screen", "template CreditsTemplate")
		SendMessage("Screen", "create top instance")
	elseif message == "Game field credits click" then
		SendMessage("Screen", "erase top child")
			-- Credits
		SendMessage("Screen", "erase top child")
			-- ZGlass
		SendMessage("Game field modal dialog alpha changer", "change alpha to 1.0")
		SendMessage("Game field alpha changer", "change alpha to 1.0")
		SendMessage("Game field panel mover", "report arrival to null")
		SendMessage("Game field panel mover", "set arrival message null")
		SendMessage("Game field panel mover", "move to in")
	elseif message == "Game field eye button pressed" then
		SendMessage("Game field panel mover", "report arrival to null")
		SendMessage("Game field panel mover", "set arrival message null")
		SendMessage("Game field panel mover", "move to out")
		SendMessage("Game field alpha changer", "change alpha to 0.0")
		SendMessage("GameField", "Pause")
		SendMessage("Screen", "template GameFieldBackgroundZGlassTemplate")
		SendMessage("Screen", "create top instance")
	elseif message == "Game field background to game field" then
		SendMessage("Game field panel mover", "report arrival to null")
		SendMessage("Game field panel mover", "set arrival message null")
		SendMessage("Game field panel mover", "move to in")
		SendMessage("Game field alpha changer", "change alpha to 1.0")
		SendMessage("GameField", "Continue")
		SendMessage("Screen", "erase top child")
	elseif message == "Game field menu button pressed" then
		SendMessage("Game field modal dialog", "instantiate GameFieldMenuTemplate")
		SendMessage("Game field menu mover", "report arrival to null")
		SendMessage("Game field menu mover", "set arrival message null")
		SendMessage("Game field menu mover", "move to in")
		SendMessage("GameField", "Pause")
	elseif message == "Game field menu resume button pressed" then
		SendMessage("Game field menu mover", "report arrival to null")
		SendMessage("Game field menu mover", "set arrival message null")
		SendMessage("Game field menu mover", "move to out")
		SendMessage("Game field modal dialog", "hide")
		SendMessage("GameField", "Continue")
	elseif message == "Game field restart confirmation dialog yes button pressed" then
		SendMessage("Game field menu mover", "report arrival to null")
		SendMessage("Game field menu mover", "set arrival message null")
		SendMessage("Game field menu mover", "move to out")
		SendMessage("Game field modal dialog", "hide")
		SendMessage("GameField", "Restart")
		SendMessage("Exit and restart modal dialog", "hide")
	elseif message == "Game field exit confirmation dialog yes button pressed" then
		SendMessage("Screen", "template ZGlassTemplate")
		SendMessage("Screen", "create top instance")
			-- защита от повторного выхода
		SendMessage("Screen", "template DarkeningTemplate")
		SendMessage("Screen", "defineText [receiver] post:lua:GameFieldFunc")
		SendMessage("Screen", "defineText [message] Game field darkened for main screen")
		SendMessage("Screen", "create top instance")
	elseif message == "Game field darkened for main screen" then
		Sound:FadeOutTrack(PermanentStorage.GetLocalString("Track in game"), 1.0)
		if PermanentStorage.GetLocalString("Track in game") == "Game1" then
			PermanentStorage.SetLocalString("Track in game", "Game2")
		elseif PermanentStorage.GetLocalString("Track in game") == "Game2" then
			PermanentStorage.SetLocalString("Track in game", "Game3")
		elseif PermanentStorage.GetLocalString("Track in game") == "Game3" then
			PermanentStorage.SetLocalString("Track in game", "Game1")
		end
		Sound:FadeInTrack("Menu"..PermanentStorage.GetLocalString("Current Tank"), 1.0, true)
		SendMessage("Screen", "clear children list")
		SendMessage("lua:TutorialFunc", "Game field to main screen")
		PermanentStorage.SetLocalString("temp:Tutorial main screen panels in after", "game field")
		SendMessage("lua:MainScreenFunc", "Enter main screen")
		SendMessage("Screen", "template BrighteningTemplate")
		SendMessage("Screen", "create top instance")

		SendMessage("lua:BetaFunc", "Game field to main screen")
		SendMessage("post:lua:BetaFunc", "Commit")
	elseif message == "Game field menu options button pressed" then
		SendMessage("Game field menu mover", "report arrival to post:lua:GameFieldFunc")
		SendMessage("Game field menu mover", "set arrival message Game field menu out for options")
		SendMessage("Game field menu mover", "move to out")
	elseif message == "Game field menu out for options" then
		SendMessage("Above game field menu", "template GameFieldOptionsDialogTemplate")
		SendMessage("Above game field menu", "create top instance")
		SendMessage("Options dispatcher", "report finish to post:lua:GameFieldFunc")
		SendMessage("Options dispatcher", "set finish message Game field menu options finished")
		SendMessage("Options dispatcher", "Show dialog")
	elseif message == "Game field menu options finished" then
		SendMessage("Options mover", "report arrival to post:lua:GameFieldFunc")
		SendMessage("Options mover", "set arrival message Game field menu options out")
		SendMessage("Options mover", "move to out")
	elseif message == "Game field menu options out" then
		SendMessage("Above game field menu", "clear children list")
		SendMessage("Game field menu mover", "report arrival to null")
		SendMessage("Game field menu mover", "set arrival message null")
		SendMessage("Game field menu mover", "move to in")
	elseif message == "Game field help button pressed" then
		SendMessage("Above game field modal dialog", "instantiate GameFieldHelpTemplate")
		SendMessage("Help mover", "report arrival to null")
		SendMessage("Help mover", "set arrival message null")
		SendMessage("Help mover", "move to in")
		SendMessage("GameField", "Pause")
	elseif message == "Game field help ok button pressed" then
		SendMessage("Above game field modal dialog", "hide")
		SendMessage("Help mover", "report arrival to null")
		SendMessage("Help mover", "set arrival message null")
		SendMessage("Help mover", "move to out")
		SendMessage("GameField", "Continue")
	elseif message == "Game field menu restart button pressed" then
		SendMessage("Exit and restart modal dialog", "instantiate ConfirmGameRestartTemplate")
	elseif message == "Game field menu exit button pressed" then
		SendMessage("Exit and restart modal dialog", "instantiate ConfirmGameExitTemplate")
	elseif message == "Game field exit confirmation dialog no button pressed" then
		SendMessage("Exit and restart modal dialog", "hide")
	elseif message == "Game field restart confirmation dialog no button pressed" then
		SendMessage("Exit and restart modal dialog", "hide")
	else
		assert(false, "Unknown message "..message)
	end
end