Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
GameContext.Android.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_ANDROID
4 using Android.Widget;
5 using OpenTK.Platform.Android;
6 
7 namespace SiliconStudio.Paradox.Games
8 {
9  /// <summary>
10  /// A <see cref="GameContext"/> to use for rendering to an existing WinForm <see cref="Control"/>.
11  /// </summary>
12  public partial class GameContext
13  {
14  /// <summary>
15  /// Initializes a new instance of the <see cref="GameContext" /> class with null control and edit text layout.
16  /// </summary>
17  public GameContext() : this(null, null)
18  {
19  }
20 
21  /// <summary>
22  /// Initializes a new instance of the <see cref="GameContext" /> class.
23  /// </summary>
24  /// <param name="control">The control.</param>
25  /// <param name="editTextLayout">The layout to use in order to display android <see cref="EditText"/></param>
26  /// <param name="requestedWidth">Width of the requested.</param>
27  /// <param name="requestedHeight">Height of the requested.</param>
28  public GameContext(AndroidGameView control, RelativeLayout editTextLayout, int requestedWidth = 0, int requestedHeight = 0)
29  {
30  Control = control;
31  EditTextLayout = editTextLayout;
32  RequestedWidth = requestedWidth;
33  RequestedHeight = requestedHeight;
34  ContextType = AppContextType.Android;
35  }
36 
37  /// <summary>
38  /// The control used as a GameWindow context.
39  /// </summary>
40  public readonly AndroidGameView Control;
41 
42  /// <summary>
43  /// The layout used to add the <see cref="EditText"/>s.
44  /// </summary>
45  public readonly RelativeLayout EditTextLayout;
46  }
47 }
48 #endif