mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 14:12:16 +00:00
013865e27d
Reverted "Delete Item" action to the way it worked in DB2. Added "Dissolve Item" action, which works the way "Delete Item" worked in previous revisions of GZDB. Added "Auto Clear Sidedef Textures" action, "Edit" menu and toolbar button, which toggle automatic removal of sidedef textures when floor or ceiling height is changed or when geometry is drawn, copied or pasted. Draw Settings panel: upper/lower texture overrides can now be used. Draw Settings panel: added 2 sets of buttons, which allow to quickly set or clear textures in current selection. Things are now rendered behind AND on top of the grid/linedefs/vertices when they are dragged. Redesigned hints system. They are now shown in a side panel. Edit area auto-focusing is now disabled when script editor is open. Texture Browser form: no texture group was selected when opening the form in some cases. Fixed several strange/misleading text messages.
112 lines
3.1 KiB
C#
112 lines
3.1 KiB
C#
|
|
#region ================== Copyright (c) 2007 Pascal vd Heiden
|
|
|
|
/*
|
|
* Copyright (c) 2007 Pascal vd Heiden, www.codeimp.com
|
|
* This program is released under GNU General Public License
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#endregion
|
|
|
|
#region ================== Namespaces
|
|
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
#endregion
|
|
|
|
namespace CodeImp.DoomBuilder.Controls
|
|
{
|
|
public class RenderTargetControl : Panel
|
|
{
|
|
#region ================== Constants
|
|
|
|
#endregion
|
|
|
|
#region ================== Variables
|
|
|
|
#endregion
|
|
|
|
#region ================== Properties
|
|
public event KeyEventHandler OnKeyReleased; //mxd. Sometimes it's handeled here, not by MainForm
|
|
#endregion
|
|
|
|
#region ================== Constructor / Disposer
|
|
|
|
// Constructor
|
|
internal RenderTargetControl()
|
|
{
|
|
// Initialize
|
|
this.SetStyle(ControlStyles.FixedWidth, true);
|
|
this.SetStyle(ControlStyles.FixedHeight, true);
|
|
}
|
|
|
|
// Disposer
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
// Done
|
|
base.Dispose(disposing);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ================== Overrides
|
|
|
|
// Paint method
|
|
protected override void OnPaint(PaintEventArgs pe)
|
|
{
|
|
// Pass on to base
|
|
// Do we really want this?
|
|
base.RaisePaintEvent(this, pe);
|
|
}
|
|
|
|
//mxd
|
|
protected override void OnKeyUp(KeyEventArgs e) {
|
|
if(OnKeyReleased != null) OnKeyReleased(this, e);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ================== Methods
|
|
|
|
// This sets up the control to display the splash logo
|
|
public void SetSplashLogoDisplay()
|
|
{
|
|
// Change display to show splash logo
|
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, false);
|
|
this.SetStyle(ControlStyles.ContainerControl, true);
|
|
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
|
this.SetStyle(ControlStyles.UserPaint, true);
|
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
|
this.SetStyle(ControlStyles.Opaque, false);
|
|
this.UpdateStyles();
|
|
this.BackColor = System.Drawing.SystemColors.AppWorkspace;
|
|
this.BackgroundImage = global::CodeImp.DoomBuilder.Properties.Resources.Splash3_trans;
|
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
|
}
|
|
|
|
// This sets up the control for manual rendering
|
|
public void SetManualRendering()
|
|
{
|
|
// Change display for rendering
|
|
this.SetStyle(ControlStyles.SupportsTransparentBackColor, false);
|
|
this.SetStyle(ControlStyles.ContainerControl, true);
|
|
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, false);
|
|
this.SetStyle(ControlStyles.UserPaint, true);
|
|
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
|
this.SetStyle(ControlStyles.Opaque, true);
|
|
this.UpdateStyles();
|
|
this.BackColor = Color.Black;
|
|
this.BackgroundImage = null;
|
|
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|