From 8899c922f68ccf211fd35ee6d0d86ce54469b7c8 Mon Sep 17 00:00:00 2001 From: Glatzemann Date: Thu, 10 Nov 2011 15:31:47 +0000 Subject: [PATCH] implemented AllowUserResizing, SetTitle and default values of GameWindow in RenderSystem DX10 --- .../WindowsGameWindow.cs | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/ANX.Framework.Windows.DX10/WindowsGameWindow.cs b/ANX.Framework.Windows.DX10/WindowsGameWindow.cs index 0216041e..c1f84047 100644 --- a/ANX.Framework.Windows.DX10/WindowsGameWindow.cs +++ b/ANX.Framework.Windows.DX10/WindowsGameWindow.cs @@ -59,12 +59,17 @@ namespace ANX.Framework { internal class WindowsGameWindow : GameWindow { + #region Private Members private RenderForm gameWindow; + #endregion // Private Members + internal WindowsGameWindow() { this.gameWindow = new RenderForm("ANX Framework"); + this.gameWindow.MaximizeBox = false; + this.gameWindow.FormBorderStyle = FormBorderStyle.Fixed3D; } public void Close() @@ -85,7 +90,10 @@ namespace ANX.Framework public override IntPtr Handle { - get { return gameWindow.Handle; } + get + { + return gameWindow.Handle; + } } public override bool IsMinimized @@ -108,24 +116,34 @@ namespace ANX.Framework protected override void SetTitle(string title) { - throw new NotImplementedException(); + this.gameWindow.Text = title; } public override bool AllowUserResizing { get { - throw new NotImplementedException(); + return gameWindow.FormBorderStyle == FormBorderStyle.Sizable; } set { - throw new NotImplementedException(); + if (value) + { + gameWindow.FormBorderStyle = FormBorderStyle.Sizable; + } + else + { + gameWindow.FormBorderStyle = FormBorderStyle.Fixed3D; + } } } public override Rectangle ClientBounds { - get { throw new NotImplementedException(); } + get + { + return new Rectangle(this.gameWindow.ClientRectangle.Left, this.gameWindow.ClientRectangle.Top, this.gameWindow.ClientRectangle.Width, this.gameWindow.ClientRectangle.Height); + } } public override string ScreenDeviceName