failed attempt to make graphics faster, but at least now that control is nicely wrapped in a class

This commit is contained in:
codeimp 2007-10-16 21:15:27 +00:00
parent 3f2d296376
commit 588a789198
8 changed files with 224 additions and 38 deletions

View file

@ -65,7 +65,7 @@ namespace CodeImp.DoomBuilder.Interface
#region ================== Properties
public bool MouseInDisplay { get { return mouseinside; } }
public Panel Display { get { return display; } }
public RenderTargetControl Display { get { return display; } }
#endregion
@ -89,6 +89,9 @@ namespace CodeImp.DoomBuilder.Interface
// Make recent items list
CreateRecentFiles();
// Show splash
ShowSplashDisplay();
// Keep last position and size
lastposition = this.Location;
lastsize = this.Size;
@ -316,9 +319,7 @@ namespace CodeImp.DoomBuilder.Interface
public void ShowSplashDisplay()
{
// Change display to show splash logo
display.BackColor = System.Drawing.SystemColors.AppWorkspace;
display.BackgroundImage = global::CodeImp.DoomBuilder.Properties.Resources.Splash2;
display.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
display.SetSplashLogoDisplay();
this.Update();
}
@ -326,9 +327,7 @@ namespace CodeImp.DoomBuilder.Interface
public void ClearDisplay()
{
// Clear the display
display.BackColor = Color.Black;
display.BackgroundImage = null;
display.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
display.SetManualRendering();
this.Update();
}