mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
a bit.
This commit is contained in:
parent
dcb744e8c7
commit
713b522a6e
18 changed files with 347 additions and 78 deletions
|
@ -59,6 +59,7 @@
|
|||
<Compile Include="Data\ResourceImage.cs" />
|
||||
<Compile Include="Data\SpriteImage.cs" />
|
||||
<Compile Include="Data\TextureImage.cs" />
|
||||
<Compile Include="Editing\DragVerticesMode.cs" />
|
||||
<Compile Include="Editing\EditMode.cs" />
|
||||
<Compile Include="Editing\LinedefsMode.cs" />
|
||||
<Compile Include="Editing\SectorsMode.cs" />
|
||||
|
|
|
@ -52,6 +52,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
public const string SECTORSMODE = "sectorsmode";
|
||||
public const string THINGSMODE = "thingsmode";
|
||||
public const string TESTACTION = "testaction";
|
||||
public const string CANCELMODE = "cancelmode";
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -187,6 +188,8 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
// This raises events for this action
|
||||
public void Invoke()
|
||||
{
|
||||
List<ActionDelegate> delegateslist;
|
||||
|
||||
// No method bound?
|
||||
if(delegates.Count == 0)
|
||||
{
|
||||
|
@ -194,8 +197,11 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
}
|
||||
else
|
||||
{
|
||||
// Copy delegates list
|
||||
delegateslist = new List<ActionDelegate>(delegates);
|
||||
|
||||
// Invoke all the delegates
|
||||
foreach(ActionDelegate ad in delegates) ad.Invoke();
|
||||
foreach(ActionDelegate ad in delegateslist) ad.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,8 +53,11 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Mouse status
|
||||
protected Vector2D mousepos;
|
||||
protected Vector2D mousemappos;
|
||||
protected Vector2D mousedownpos;
|
||||
protected Vector2D mousedownmappos;
|
||||
protected MouseButtons mousebuttons;
|
||||
protected bool mouseinside;
|
||||
protected bool mousedragging;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -264,6 +267,8 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Mouse moved inside the display
|
||||
public override void MouseMove(MouseEventArgs e)
|
||||
{
|
||||
Vector2D delta;
|
||||
|
||||
// Record last position
|
||||
mouseinside = true;
|
||||
mousepos = new Vector2D(e.X, e.Y);
|
||||
|
@ -273,10 +278,45 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
// Update labels in main window
|
||||
General.MainWindow.UpdateCoordinates(mousemappos);
|
||||
|
||||
// Holding any buttons?
|
||||
if(e.Button != MouseButtons.None)
|
||||
{
|
||||
// Not dragging?
|
||||
if(!mousedragging)
|
||||
{
|
||||
// Check if moved enough pixels for dragging
|
||||
delta = mousedownpos - mousepos;
|
||||
if((Math.Abs(delta.x) > DRAG_START_MOVE_PIXELS) ||
|
||||
(Math.Abs(delta.y) > DRAG_START_MOVE_PIXELS))
|
||||
{
|
||||
// Dragging starts now
|
||||
mousedragging = true;
|
||||
DragStart(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Let the base class know
|
||||
base.MouseMove(e);
|
||||
}
|
||||
|
||||
// Mouse button pressed
|
||||
public override void MouseDown(MouseEventArgs e)
|
||||
{
|
||||
// Save mouse down position
|
||||
mousedownpos = mousepos;
|
||||
mousedownmappos = mousemappos;
|
||||
|
||||
// Let the base class know
|
||||
base.MouseDown(e);
|
||||
}
|
||||
|
||||
// This is called when the mouse is moved enough pixels and holding one or more buttons
|
||||
protected virtual void DragStart(MouseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Display
|
||||
|
@ -288,5 +328,16 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// Override cancel method to bind it with its action
|
||||
[Action(Action.CANCELMODE)]
|
||||
public override void Cancel()
|
||||
{
|
||||
base.Cancel();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
90
Source/Editing/DragVerticesMode.cs
Normal file
90
Source/Editing/DragVerticesMode.cs
Normal file
|
@ -0,0 +1,90 @@
|
|||
|
||||
#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;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using CodeImp.DoomBuilder.Interface;
|
||||
using CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Editing
|
||||
{
|
||||
public class DragVerticesMode : VerticesMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
||||
// Constructor to start without dragging
|
||||
public DragVerticesMode(Vertex highlighted)
|
||||
{
|
||||
// Initialize
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// Constructor to start dragging immediately
|
||||
public DragVerticesMode()
|
||||
{
|
||||
// Initialize
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// Diposer
|
||||
public override void Dispose()
|
||||
{
|
||||
// Not already disposed?
|
||||
if(!isdisposed)
|
||||
{
|
||||
// Clean up
|
||||
|
||||
// Done
|
||||
isdisposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -39,6 +39,10 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
{
|
||||
#region ================== Constants
|
||||
|
||||
public const int DRAG_START_MOVE_PIXELS = 5;
|
||||
public const MouseButtons EDIT_BUTTON = MouseButtons.Right;
|
||||
public const MouseButtons SELECT_BUTTON = MouseButtons.Left;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
@ -119,6 +123,9 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
ActionAttribute.UnbindMethods(this);
|
||||
}
|
||||
|
||||
// This forces the mode to cancel and return to the "parent" mode
|
||||
public virtual void Cancel() { }
|
||||
|
||||
// Optional interface methods
|
||||
public virtual void MouseClick(MouseEventArgs e) { }
|
||||
public virtual void MouseDoubleClick(MouseEventArgs e) { }
|
||||
|
@ -127,7 +134,6 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
public virtual void MouseLeave(EventArgs e) { }
|
||||
public virtual void MouseMove(MouseEventArgs e) { }
|
||||
public virtual void MouseUp(MouseEventArgs e) { }
|
||||
public virtual void Cancel() { }
|
||||
public virtual void RedrawDisplay() { }
|
||||
public virtual void RefreshDisplay() { }
|
||||
|
||||
|
|
|
@ -77,6 +77,15 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
|
||||
#region ================== Methods
|
||||
|
||||
// Cancel mode
|
||||
public override void Cancel()
|
||||
{
|
||||
base.Cancel();
|
||||
|
||||
// Return to this mode
|
||||
General.Map.ChangeMode(new LinedefsMode());
|
||||
}
|
||||
|
||||
// Mode engages
|
||||
public override void Engage()
|
||||
{
|
||||
|
|
|
@ -75,6 +75,15 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
|
||||
#region ================== Methods
|
||||
|
||||
// Cancel mode
|
||||
public override void Cancel()
|
||||
{
|
||||
base.Cancel();
|
||||
|
||||
// Return to this mode
|
||||
General.Map.ChangeMode(new SectorsMode());
|
||||
}
|
||||
|
||||
// Mode engages
|
||||
public override void Engage()
|
||||
{
|
||||
|
|
|
@ -77,6 +77,15 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
|
||||
#region ================== Methods
|
||||
|
||||
// Cancel mode
|
||||
public override void Cancel()
|
||||
{
|
||||
base.Cancel();
|
||||
|
||||
// Return to this mode
|
||||
General.Map.ChangeMode(new ThingsMode());
|
||||
}
|
||||
|
||||
// Mode engages
|
||||
public override void Engage()
|
||||
{
|
||||
|
|
|
@ -77,6 +77,15 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
|
||||
#region ================== Methods
|
||||
|
||||
// Cancel mode
|
||||
public override void Cancel()
|
||||
{
|
||||
base.Cancel();
|
||||
|
||||
// Return to this mode
|
||||
General.Map.ChangeMode(new VerticesMode());
|
||||
}
|
||||
|
||||
// Mode engages
|
||||
public override void Engage()
|
||||
{
|
||||
|
@ -152,11 +161,15 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
{
|
||||
base.MouseMove(e);
|
||||
|
||||
// Find the nearest vertex within highlight range
|
||||
Vertex v = General.Map.Map.NearestVertexSquareRange(mousemappos, VERTEX_HIGHLIGHT_RANGE / renderer.Scale);
|
||||
// Not holding any buttons?
|
||||
if(e.Button == MouseButtons.None)
|
||||
{
|
||||
// Find the nearest vertex within highlight range
|
||||
Vertex v = General.Map.Map.NearestVertexSquareRange(mousemappos, VERTEX_HIGHLIGHT_RANGE / renderer.Scale);
|
||||
|
||||
// Highlight if not the same
|
||||
if(v != highlighted) Highlight(v);
|
||||
// Highlight if not the same
|
||||
if(v != highlighted) Highlight(v);
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse leaves
|
||||
|
@ -168,6 +181,87 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
Highlight(null);
|
||||
}
|
||||
|
||||
// Mouse button pressed
|
||||
public override void MouseDown(MouseEventArgs e)
|
||||
{
|
||||
base.MouseDown(e);
|
||||
|
||||
// Which button is used?
|
||||
if(e.Button == EditMode.SELECT_BUTTON)
|
||||
{
|
||||
// Item highlighted?
|
||||
if(highlighted != null)
|
||||
{
|
||||
// Item already selected?
|
||||
if(General.Map.Selection.Vertices.Contains(highlighted))
|
||||
{
|
||||
// Deselect
|
||||
General.Map.Selection.RemoveVertex(highlighted);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Select
|
||||
General.Map.Selection.AddVertex(highlighted);
|
||||
}
|
||||
|
||||
// Update display
|
||||
if(renderer.StartRendering(false, false))
|
||||
{
|
||||
// Undraw highlight to show selection
|
||||
renderer.RenderVertex(highlighted, renderer.DetermineVertexColor(highlighted));
|
||||
renderer.FinishRendering();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse released
|
||||
public override void MouseUp(MouseEventArgs e)
|
||||
{
|
||||
base.MouseUp(e);
|
||||
|
||||
// Item highlighted?
|
||||
if(highlighted != null)
|
||||
{
|
||||
// Update display
|
||||
if(renderer.StartRendering(false, false))
|
||||
{
|
||||
// Render highlighted item
|
||||
renderer.RenderVertex(highlighted, ColorCollection.HIGHLIGHT);
|
||||
renderer.FinishRendering();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse wants to drag
|
||||
protected override void DragStart(MouseEventArgs e)
|
||||
{
|
||||
base.DragStart(e);
|
||||
|
||||
// Which button is used?
|
||||
if(e.Button == EditMode.SELECT_BUTTON)
|
||||
{
|
||||
// Make selection
|
||||
|
||||
}
|
||||
else if(e.Button == EditMode.EDIT_BUTTON)
|
||||
{
|
||||
// Anything highlighted?
|
||||
if(highlighted != null)
|
||||
{
|
||||
// Highlighted item not selected?
|
||||
if(!General.Map.Selection.Vertices.Contains(highlighted))
|
||||
{
|
||||
// Select only this vertex for dragging
|
||||
General.Map.Selection.ClearVertices();
|
||||
General.Map.Selection.AddVertex(highlighted);
|
||||
}
|
||||
|
||||
// Start dragging the selection
|
||||
General.Map.ChangeMode(new DragVerticesMode());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace CodeImp.DoomBuilder
|
|||
{
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
|
||||
|
||||
// Basic objects
|
||||
selection = new MapSelection();
|
||||
}
|
||||
|
|
|
@ -76,6 +76,17 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
objectname.Left = label.Right + label.Margin.Right + objectname.Margin.Left;
|
||||
}
|
||||
|
||||
// This applies the color settings
|
||||
public void ApplyColorSettings()
|
||||
{
|
||||
// Force black background?
|
||||
if(General.Settings.ReadSetting("blackbrowsers", false))
|
||||
{
|
||||
list.BackColor = Color.Black;
|
||||
list.ForeColor = Color.White;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Rendering
|
||||
|
@ -115,8 +126,6 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// Name typed
|
||||
private void objectname_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Point spos;
|
||||
|
||||
// Update list
|
||||
RefillList();
|
||||
|
||||
|
|
|
@ -123,8 +123,8 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
else
|
||||
{
|
||||
// Normal
|
||||
backcolor = SystemBrushes.Window;
|
||||
forecolor = SystemBrushes.WindowText;
|
||||
backcolor = new SolidBrush(base.ListView.BackColor);
|
||||
forecolor = new SolidBrush(base.ListView.ForeColor);
|
||||
}
|
||||
|
||||
// Draw!
|
||||
|
|
40
Source/Interface/PreferencesForm.Designer.cs
generated
40
Source/Interface/PreferencesForm.Designer.cs
generated
|
@ -69,6 +69,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.colorselection3d = new CodeImp.DoomBuilder.Interface.ColorControl();
|
||||
this.colorhighlight3d = new CodeImp.DoomBuilder.Interface.ColorControl();
|
||||
this.colorcrosshair3d = new CodeImp.DoomBuilder.Interface.ColorControl();
|
||||
this.blackbrowsers = new System.Windows.Forms.CheckBox();
|
||||
label7 = new System.Windows.Forms.Label();
|
||||
label6 = new System.Windows.Forms.Label();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
|
@ -122,7 +123,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.colorsgroup1.Controls.Add(this.colorlinedefs);
|
||||
this.colorsgroup1.Location = new System.Drawing.Point(12, 10);
|
||||
this.colorsgroup1.Name = "colorsgroup1";
|
||||
this.colorsgroup1.Size = new System.Drawing.Size(181, 330);
|
||||
this.colorsgroup1.Size = new System.Drawing.Size(181, 325);
|
||||
this.colorsgroup1.TabIndex = 10;
|
||||
this.colorsgroup1.TabStop = false;
|
||||
this.colorsgroup1.Text = " Classic modes ";
|
||||
|
@ -251,7 +252,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// cancel
|
||||
//
|
||||
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancel.Location = new System.Drawing.Point(497, 406);
|
||||
this.cancel.Location = new System.Drawing.Point(497, 428);
|
||||
this.cancel.Name = "cancel";
|
||||
this.cancel.Size = new System.Drawing.Size(112, 25);
|
||||
this.cancel.TabIndex = 20;
|
||||
|
@ -261,7 +262,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
//
|
||||
// apply
|
||||
//
|
||||
this.apply.Location = new System.Drawing.Point(379, 406);
|
||||
this.apply.Location = new System.Drawing.Point(379, 428);
|
||||
this.apply.Name = "apply";
|
||||
this.apply.Size = new System.Drawing.Size(112, 25);
|
||||
this.apply.TabIndex = 19;
|
||||
|
@ -279,7 +280,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.tabs.Location = new System.Drawing.Point(11, 13);
|
||||
this.tabs.Name = "tabs";
|
||||
this.tabs.SelectedIndex = 0;
|
||||
this.tabs.Size = new System.Drawing.Size(598, 379);
|
||||
this.tabs.Size = new System.Drawing.Size(598, 406);
|
||||
this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.tabs.TabIndex = 18;
|
||||
this.tabs.SelectedIndexChanged += new System.EventHandler(this.tabs_SelectedIndexChanged);
|
||||
|
@ -290,7 +291,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.tabinterface.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabinterface.Name = "tabinterface";
|
||||
this.tabinterface.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabinterface.Size = new System.Drawing.Size(590, 352);
|
||||
this.tabinterface.Size = new System.Drawing.Size(590, 379);
|
||||
this.tabinterface.TabIndex = 0;
|
||||
this.tabinterface.Text = "Interface";
|
||||
this.tabinterface.UseVisualStyleBackColor = true;
|
||||
|
@ -303,7 +304,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.tabkeys.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabkeys.Name = "tabkeys";
|
||||
this.tabkeys.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabkeys.Size = new System.Drawing.Size(590, 352);
|
||||
this.tabkeys.Size = new System.Drawing.Size(590, 379);
|
||||
this.tabkeys.TabIndex = 1;
|
||||
this.tabkeys.Text = "Controls";
|
||||
this.tabkeys.UseVisualStyleBackColor = true;
|
||||
|
@ -324,7 +325,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.listactions.MultiSelect = false;
|
||||
this.listactions.Name = "listactions";
|
||||
this.listactions.ShowGroups = false;
|
||||
this.listactions.Size = new System.Drawing.Size(274, 326);
|
||||
this.listactions.Size = new System.Drawing.Size(274, 353);
|
||||
this.listactions.Sorting = System.Windows.Forms.SortOrder.Ascending;
|
||||
this.listactions.TabIndex = 0;
|
||||
this.listactions.TabStop = false;
|
||||
|
@ -360,7 +361,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.actioncontrolpanel.Location = new System.Drawing.Point(299, 12);
|
||||
this.actioncontrolpanel.Margin = new System.Windows.Forms.Padding(6);
|
||||
this.actioncontrolpanel.Name = "actioncontrolpanel";
|
||||
this.actioncontrolpanel.Size = new System.Drawing.Size(282, 326);
|
||||
this.actioncontrolpanel.Size = new System.Drawing.Size(282, 353);
|
||||
this.actioncontrolpanel.TabIndex = 9;
|
||||
this.actioncontrolpanel.TabStop = false;
|
||||
this.actioncontrolpanel.Text = " Action control ";
|
||||
|
@ -418,13 +419,14 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
//
|
||||
// tabcolors
|
||||
//
|
||||
this.tabcolors.Controls.Add(this.blackbrowsers);
|
||||
this.tabcolors.Controls.Add(this.colorsgroup3);
|
||||
this.tabcolors.Controls.Add(this.colorsgroup2);
|
||||
this.tabcolors.Controls.Add(this.colorsgroup1);
|
||||
this.tabcolors.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabcolors.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabcolors.Name = "tabcolors";
|
||||
this.tabcolors.Size = new System.Drawing.Size(590, 352);
|
||||
this.tabcolors.Size = new System.Drawing.Size(590, 379);
|
||||
this.tabcolors.TabIndex = 2;
|
||||
this.tabcolors.Text = "Colors";
|
||||
this.tabcolors.UseVisualStyleBackColor = true;
|
||||
|
@ -440,7 +442,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.colorsgroup3.Controls.Add(this.colorplaintext);
|
||||
this.colorsgroup3.Location = new System.Drawing.Point(398, 10);
|
||||
this.colorsgroup3.Name = "colorsgroup3";
|
||||
this.colorsgroup3.Size = new System.Drawing.Size(181, 330);
|
||||
this.colorsgroup3.Size = new System.Drawing.Size(181, 325);
|
||||
this.colorsgroup3.TabIndex = 12;
|
||||
this.colorsgroup3.TabStop = false;
|
||||
this.colorsgroup3.Text = " Script editor ";
|
||||
|
@ -537,7 +539,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.colorsgroup2.Controls.Add(this.colorcrosshair3d);
|
||||
this.colorsgroup2.Location = new System.Drawing.Point(205, 10);
|
||||
this.colorsgroup2.Name = "colorsgroup2";
|
||||
this.colorsgroup2.Size = new System.Drawing.Size(181, 330);
|
||||
this.colorsgroup2.Size = new System.Drawing.Size(181, 325);
|
||||
this.colorsgroup2.TabIndex = 11;
|
||||
this.colorsgroup2.TabStop = false;
|
||||
this.colorsgroup2.Text = " 3D mode ";
|
||||
|
@ -579,12 +581,20 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.colorcrosshair3d.Size = new System.Drawing.Size(150, 23);
|
||||
this.colorcrosshair3d.TabIndex = 6;
|
||||
//
|
||||
// blackbrowsers
|
||||
//
|
||||
this.blackbrowsers.AutoSize = true;
|
||||
this.blackbrowsers.Location = new System.Drawing.Point(13, 345);
|
||||
this.blackbrowsers.Name = "blackbrowsers";
|
||||
this.blackbrowsers.Size = new System.Drawing.Size(241, 18);
|
||||
this.blackbrowsers.TabIndex = 13;
|
||||
this.blackbrowsers.Text = "Force black background for image browsers";
|
||||
this.blackbrowsers.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// PreferencesForm
|
||||
//
|
||||
this.AcceptButton = this.apply;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.CancelButton = this.cancel;
|
||||
this.ClientSize = new System.Drawing.Size(619, 440);
|
||||
this.ClientSize = new System.Drawing.Size(619, 464);
|
||||
this.Controls.Add(this.cancel);
|
||||
this.Controls.Add(this.apply);
|
||||
this.Controls.Add(this.tabs);
|
||||
|
@ -603,6 +613,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.actioncontrolpanel.ResumeLayout(false);
|
||||
this.actioncontrolpanel.PerformLayout();
|
||||
this.tabcolors.ResumeLayout(false);
|
||||
this.tabcolors.PerformLayout();
|
||||
this.colorsgroup3.ResumeLayout(false);
|
||||
this.colorsgroup2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
@ -649,5 +660,6 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
private ColorControl colorgrid64;
|
||||
private ColorControl colorgrid;
|
||||
private System.Windows.Forms.GroupBox colorsgroup1;
|
||||
private System.Windows.Forms.CheckBox blackbrowsers;
|
||||
}
|
||||
}
|
|
@ -111,6 +111,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
colorkeywords.Color = General.Colors.Keywords;
|
||||
colorliterals.Color = General.Colors.Literals;
|
||||
colorconstants.Color = General.Colors.Constants;
|
||||
blackbrowsers.Checked = General.Settings.ReadSetting("blackbrowsers", false);
|
||||
|
||||
// Done
|
||||
allowapplycontrol = true;
|
||||
|
@ -311,6 +312,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
General.Colors.Literals = colorliterals.Color;
|
||||
General.Colors.Constants = colorconstants.Color;
|
||||
General.Colors.CreateAssistColors();
|
||||
General.Settings.WriteSetting("blackbrowsers", blackbrowsers.Checked);
|
||||
|
||||
// Close
|
||||
this.DialogResult = DialogResult.OK;
|
||||
|
|
|
@ -117,61 +117,13 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="label7.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label7.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label6.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label5.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="cancel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="apply.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabs.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabinterface.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabkeys.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="listactions.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="actioncontrolpanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="actioncontrol.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="actiontitle.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="actioncontrolclear.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="actionkey.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="actiondescription.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -50,7 +50,8 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
|
||||
browser.ApplyColorSettings();
|
||||
|
||||
// Make groups
|
||||
ListViewGroup used = browser.AddGroup("Used Textures");
|
||||
ListViewGroup avail = browser.AddGroup("Available Textures");
|
||||
|
|
|
@ -188,6 +188,15 @@ namespace CodeImp.DoomBuilder.Map
|
|||
things.Clear();
|
||||
}
|
||||
|
||||
// This clears all
|
||||
public void ClearAll()
|
||||
{
|
||||
ClearThings();
|
||||
ClearLinedefs();
|
||||
ClearSectors();
|
||||
ClearVertices();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ reloadresources
|
|||
|
||||
verticesmode
|
||||
{
|
||||
title = "Tools: Vertices Mode";
|
||||
title = "Edit: Vertices Mode";
|
||||
description = "Switches to vertices editing mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
|
@ -169,7 +169,7 @@ verticesmode
|
|||
|
||||
linedefsmode
|
||||
{
|
||||
title = "Tools: Linedefs Mode";
|
||||
title = "Edit: Linedefs Mode";
|
||||
description = "Switches to linedefs editing mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
|
@ -178,7 +178,7 @@ linedefsmode
|
|||
|
||||
sectorsmode
|
||||
{
|
||||
title = "Tools: Sectors Mode";
|
||||
title = "Edit: Sectors Mode";
|
||||
description = "Switches to sectors editing mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
|
@ -187,9 +187,18 @@ sectorsmode
|
|||
|
||||
thingsmode
|
||||
{
|
||||
title = "Tools: Things Mode";
|
||||
title = "Edit: Things Mode";
|
||||
description = "Switches to things editing mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
||||
|
||||
cancelmode
|
||||
{
|
||||
title = "Edit: Cancel Action";
|
||||
description = "Cancels the current action and switches back to normal editing mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue