public ScreenDialog (Input input) : base ()
		{
			this.input = input;
			this.text = input.Text;
			this.image = input.Image;
			if (input.InputType == InputType.Text)
				buttons.Add (Catalog.GetString("Ok"));
			if (input.InputType == InputType.MultipleChoice)
				foreach (string s in input.Choices)
					buttons.Add (s);
		}
		/// <summary>
		/// Marks internally an input as requested, allowing the properties 
		/// of this InputManager to be updated.
		/// </summary>
		/// <param name="input">Input that has been requested to be shown.</param>
		public void HandleInputRequested(Input input)
		{
			// Is the input already tracked?
			// YES -> Increment the consecutive requests field.
			// NO -> Forget the last input and tracks this one.
			int objIndex = input.ObjIndex;
			if (objIndex == _lastInputObjIndex)
			{
				_consecutiveRequests++;
			}
			else
			{
				_lastInputObjIndex = objIndex;
				_consecutiveRequests = 1;
			}
		}
		public GameDialogScreen(Input input)
		{
			this.messageBox = null;
			this.input = input;
		}
		public GameDialogScreen(MessageBox messageBox)
		{
			this.messageBox = messageBox;
			this.input = null;
		}
		public ScreenDialog(Input input)
		{
			this.messageBox = null;
			this.input = input;
		}
		public ScreenDialog(MessageBox messageBox)
		{
			this.messageBox = messageBox;
			this.input = null;
		}
		/// <summary>
		/// Raised when the fragment is destroyed, so free references to other UI elements.
		/// </summary>
		public override void OnDestroyView()
		{
			base.OnDestroyView();

			imageView = null;
			messageBox = null;
			input = null;
			editInput = null;
			btnView1 = null;
			btnView2 = null;
			btnInput = null;
			layoutDialog = null;
			layoutMultipleChoice = null;
			layoutInput = null;
			textDescription = null;
			ctrl = null;
		}
		/// <summary>
		/// Navigates the app to the view that best fits an Input object.
		/// </summary>
		/// <param name="wherigoObj"></param>
		public void NavigateToView(Input wherigoObj)
		{
			NavigateCore(new Uri("/Views/InputPage.xaml?wid=" + wherigoObj.ObjIndex, UriKind.Relative), cancelIfAlreadyActive: true);
		}
		/// <summary>
		/// Navigates the app to the view that best fits an Input object.
		/// </summary>
		/// <param name="wherigoObj"></param>
		public void NavigateToView(Input wherigoObj)
		{
			NavigateCore(new Uri("/Views/InputPage.xaml?wid=" + wherigoObj.ObjIndex, UriKind.Relative));
		}
		/// <summary>
		/// Determines if an input is known to be looping.
		/// </summary>
		/// <param name="input"></param>
		/// <returns></returns>
		public bool IsLooping(Input input)
		{
			return input != null && input.ObjIndex == _lastInputObjIndex && _consecutiveRequests > MAX_IGNORED_CONSECUTIVE_REQUESTS;
		}
		/// <summary>
		/// Navigates the app to the view that best fits an Input object.
		/// </summary>
		/// <param name="wherigoObj"></param>
		public void NavigateToView(Input wherigoObj)
		{
			App.Current.RootFrame.Navigate(new Uri("/Views/InputPage.xaml?wid=" + wherigoObj.ObjIndex, UriKind.Relative));
		}