public void OnBackButtonDown() { if (TutorialModel.InTutorialOld) { return; } var current = _dialogManager.Current ?? _screensManager.Current; var currentBackHandler = current as IBackButtonHandler; if (current == null) { return; } if (currentBackHandler != null) { currentBackHandler.OnBackButton(); return; } current.Close(); //kludge: убрать и сделать GuiManager абстрактнее if (!TutorialModel.InTutorialOld && Use <ToolManager>().CurrentTool is ClickTool && _dialogManager.Current == null && Use <IScenesController>().CurrentScene == GameScene.Main && !(_screensManager.Current is DLFScreenLeagueMediator)) { _screensManager.ShowMainScreen(); } }