Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
GameContext.iOS.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 #if SILICONSTUDIO_PLATFORM_IOS
4 using MonoTouch.UIKit;
5 using OpenTK.Platform.iPhoneOS;
6 
7 namespace SiliconStudio.Paradox.Games
8 {
9  /// <summary>
10  /// A <see cref="GameContext"/> to use for rendering to an existing WinForm <see cref="GameView"/>.
11  /// </summary>
12  public partial class GameContext
13  {
14  /// <summary>
15  /// Initializes a new instance of the <see cref="GameContext" /> class with null <see cref="MainWindow"/>, <see cref="GameView"/> and <see cref="GameViewController"/>.
16  /// </summary>
17  public GameContext()
18  : this(null, null, null)
19  {
20  }
21 
22  /// <summary>
23  /// Initializes a new instance of the <see cref="GameContext" /> class.
24  /// </summary>
25  /// <param name="mainWindows">The main windows of the game</param>
26  /// <param name="gameView">The view in which the game is rendered</param>
27  /// <param name="gameViewController">The paradox game main controller</param>
28  /// <param name="requestedWidth">Width of the requested.</param>
29  /// <param name="requestedHeight">Height of the requested.</param>
30  public GameContext(UIWindow mainWindows, iPhoneOSGameView gameView, ParadoxGameController gameViewController, int requestedWidth = 0, int requestedHeight = 0)
31  {
32  MainWindow = mainWindows;
33  GameView = gameView;
34  GameViewController = gameViewController;
35  RequestedWidth = requestedWidth;
36  RequestedHeight = requestedHeight;
37  ContextType = AppContextType.iOS;
38  }
39 
40  /// <summary>
41  /// The main window of the game.
42  /// </summary>
43  public readonly UIWindow MainWindow;
44 
45  /// <summary>
46  /// The view in which is rendered the game.
47  /// </summary>
48  public readonly iPhoneOSGameView GameView;
49 
50  /// <summary>
51  /// The controller of the game.
52  /// </summary>
53  public readonly ParadoxGameController GameViewController;
54  }
55 }
56 #endif