mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 04:40:55 +00:00
bra
This commit is contained in:
parent
621efd49fe
commit
0498ecdd16
28 changed files with 547 additions and 34 deletions
|
@ -32,6 +32,11 @@ start3dmode = 32000;
|
|||
// Default flags for first new thing
|
||||
defaulthingflags = 7; //1 + 2 + 4
|
||||
|
||||
additionalmodes
|
||||
{
|
||||
WAuthorMode;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
TEXTURES AND FLAT SOURCES
|
||||
|
|
|
@ -82,6 +82,7 @@
|
|||
<Compile Include="Controls\ActionManager.cs" />
|
||||
<Compile Include="Config\CompilerInfo.cs" />
|
||||
<Compile Include="Config\ConfigurationInfo.cs" />
|
||||
<Compile Include="Editing\VisualMode.cs" />
|
||||
<Compile Include="General\Clock.cs" />
|
||||
<Compile Include="General\MapManager.cs" />
|
||||
<Compile Include="Controls\SpecialKeys.cs" />
|
||||
|
|
|
@ -36,9 +36,16 @@
|
|||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Editing\BaseVisualMode.cs" />
|
||||
<Compile Include="Editing\DragVerticesMode.cs" />
|
||||
<Compile Include="Editing\LinedefsMode.cs" />
|
||||
<Compile Include="Editing\WAuthorMode.cs" />
|
||||
<Compile Include="Editing\WAuthorTools.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Editing\WAuthorTools.Designer.cs">
|
||||
<DependentUpon>WAuthorTools.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Editing\SectorsMode.cs" />
|
||||
<Compile Include="Editing\ThingsMode.cs" />
|
||||
|
@ -67,8 +74,15 @@
|
|||
<EmbeddedResource Include="Resources\SectorsMode.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Editing\WAuthorTools.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>WAuthorTools.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\WAuthor.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\VisualMode.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
93
Source/BuilderModes/Editing/BaseVisualMode.cs
Normal file
93
Source/BuilderModes/Editing/BaseVisualMode.cs
Normal file
|
@ -0,0 +1,93 @@
|
|||
|
||||
#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;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||
{
|
||||
[EditMode(SwitchAction = "visualmode", // Action name used to switch to this mode
|
||||
ButtonDesc = "Visual Mode", // Description on the button in toolbar/menu
|
||||
ButtonImage = "VisualMode.png", // Image resource name for the button
|
||||
ButtonOrder = int.MinValue + 100)] // Position of the button (lower is more to the left)
|
||||
|
||||
public class BaseVisualMode : VisualMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
// Disposing
|
||||
private bool isdisposed = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
// Disposing
|
||||
public bool IsDisposed { get { return isdisposed; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
||||
// Constructor
|
||||
public BaseVisualMode()
|
||||
{
|
||||
// Initialize
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// Diposer
|
||||
public void Dispose()
|
||||
{
|
||||
// Not already disposed?
|
||||
if(!isdisposed)
|
||||
{
|
||||
// Clean up
|
||||
|
||||
// Done
|
||||
isdisposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -34,13 +34,14 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
#endregion
|
||||
|
||||
|
||||
// This mode if for quickly dragging vertices without a layer.
|
||||
// The geometry is merged and the mode returns to VerticesMode when the mouse is released.
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||
{
|
||||
// No action or button for this mode, it is automatic.
|
||||
// The EditMode attribute does not have to be specified unless the
|
||||
// mode must be activated by class name rather than direct instance.
|
||||
// In that case, just specifying the attribute like this is enough:
|
||||
[EditMode]
|
||||
|
||||
public class DragVerticesMode : ClassicMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
|
|
@ -35,10 +35,11 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||
{
|
||||
[EditMode(SwitchAction = "linedefsmode",
|
||||
ButtonDesc = "Linedefs Mode",
|
||||
ButtonImage = "LinesMode.png",
|
||||
ButtonOrder = int.MinValue + 1)]
|
||||
[EditMode(SwitchAction = "linedefsmode", // Action name used to switch to this mode
|
||||
ButtonDesc = "Linedefs Mode", // Description on the button in toolbar/menu
|
||||
ButtonImage = "LinesMode.png", // Image resource name for the button
|
||||
ButtonOrder = int.MinValue + 1)] // Position of the button (lower is more to the left)
|
||||
|
||||
public class LinedefsMode : ClassicMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
|
|
@ -35,10 +35,11 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||
{
|
||||
[EditMode(SwitchAction = "sectorsmode",
|
||||
ButtonDesc = "Sectors Mode",
|
||||
ButtonImage = "SectorsMode.png",
|
||||
ButtonOrder = int.MinValue + 2)]
|
||||
[EditMode(SwitchAction = "sectorsmode", // Action name used to switch to this mode
|
||||
ButtonDesc = "Sectors Mode", // Description on the button in toolbar/menu
|
||||
ButtonImage = "SectorsMode.png", // Image resource name for the button
|
||||
ButtonOrder = int.MinValue + 2)] // Position of the button (lower is more to the left)
|
||||
|
||||
public class SectorsMode : ClassicMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
|
|
@ -35,10 +35,11 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||
{
|
||||
[EditMode(SwitchAction = "thingsmode",
|
||||
ButtonDesc = "Things Mode",
|
||||
ButtonImage = "ThingsMode.png",
|
||||
ButtonOrder = int.MinValue + 3)]
|
||||
[EditMode(SwitchAction = "thingsmode", // Action name used to switch to this mode
|
||||
ButtonDesc = "Things Mode", // Description on the button in toolbar/menu
|
||||
ButtonImage = "ThingsMode.png", // Image resource name for the button
|
||||
ButtonOrder = int.MinValue + 3)] // Position of the button (lower is more to the left)
|
||||
|
||||
public class ThingsMode : ClassicMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
|
|
@ -35,10 +35,11 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||
{
|
||||
[EditMode(SwitchAction = "verticesmode",
|
||||
ButtonDesc = "Vertices Mode",
|
||||
ButtonImage = "VerticesMode.png",
|
||||
ButtonOrder = int.MinValue + 0)]
|
||||
[EditMode(SwitchAction = "verticesmode", // Action name used to switch to this mode
|
||||
ButtonDesc = "Vertices Mode", // Description on the button in toolbar/menu
|
||||
ButtonImage = "VerticesMode.png", // Image resource name for the button
|
||||
ButtonOrder = int.MinValue + 0)] // Position of the button (lower is more to the left)
|
||||
|
||||
public class VerticesMode : ClassicMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
|
|
@ -40,6 +40,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
|||
ButtonImage = "WAuthor.png",
|
||||
ButtonOrder = int.MinValue + 4,
|
||||
ConfigSpecific = true)]
|
||||
|
||||
public class WAuthorMode : ClassicMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
@ -52,6 +53,9 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
|||
|
||||
#region ================== Variables
|
||||
|
||||
// Tools
|
||||
protected WAuthorTools tools;
|
||||
|
||||
// Highlighted item
|
||||
protected object highlighted;
|
||||
|
||||
|
@ -67,7 +71,12 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
|||
public WAuthorMode()
|
||||
{
|
||||
// Initialize
|
||||
tools = new WAuthorTools();
|
||||
|
||||
// Enable this and you'll have a floating window
|
||||
//tools.Show(General.Interface);
|
||||
//General.Interface.Focus();
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
@ -79,7 +88,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
|||
if(!isdisposed)
|
||||
{
|
||||
// Clean up
|
||||
|
||||
tools.Dispose();
|
||||
|
||||
// Dispose base
|
||||
base.Dispose();
|
||||
}
|
||||
|
@ -319,7 +329,6 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
|||
|
||||
// Maybe i'll finish this later, or not even include this mode at all, not sure yet.
|
||||
|
||||
/*
|
||||
// Mouse leaves
|
||||
public override void MouseLeave(EventArgs e)
|
||||
{
|
||||
|
@ -339,6 +348,9 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
|||
public override void MouseUp(MouseEventArgs e)
|
||||
{
|
||||
base.MouseUp(e);
|
||||
|
||||
// This shows a popup menu
|
||||
tools.LinedefPopup.Show(Cursor.Position);
|
||||
}
|
||||
|
||||
// Mouse wants to drag
|
||||
|
@ -346,7 +358,6 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
|||
{
|
||||
base.DragStart(e);
|
||||
}
|
||||
*/
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
116
Source/BuilderModes/Editing/WAuthorTools.Designer.cs
generated
Normal file
116
Source/BuilderModes/Editing/WAuthorTools.Designer.cs
generated
Normal file
|
@ -0,0 +1,116 @@
|
|||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||
{
|
||||
partial class WAuthorTools
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.linedefpopup = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.propertiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.splitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.flipToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.curveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.linedefpopup.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// linedefpopup
|
||||
//
|
||||
this.linedefpopup.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.propertiesToolStripMenuItem,
|
||||
this.toolStripMenuItem1,
|
||||
this.deleteToolStripMenuItem,
|
||||
this.splitToolStripMenuItem,
|
||||
this.flipToolStripMenuItem,
|
||||
this.curveToolStripMenuItem});
|
||||
this.linedefpopup.Name = "linedefpopup";
|
||||
this.linedefpopup.Size = new System.Drawing.Size(147, 120);
|
||||
//
|
||||
// propertiesToolStripMenuItem
|
||||
//
|
||||
this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem";
|
||||
this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.propertiesToolStripMenuItem.Text = "Properties...";
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(143, 6);
|
||||
//
|
||||
// deleteToolStripMenuItem
|
||||
//
|
||||
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
|
||||
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.deleteToolStripMenuItem.Text = "Delete";
|
||||
//
|
||||
// splitToolStripMenuItem
|
||||
//
|
||||
this.splitToolStripMenuItem.Name = "splitToolStripMenuItem";
|
||||
this.splitToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.splitToolStripMenuItem.Text = "Split";
|
||||
//
|
||||
// flipToolStripMenuItem
|
||||
//
|
||||
this.flipToolStripMenuItem.Name = "flipToolStripMenuItem";
|
||||
this.flipToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.flipToolStripMenuItem.Text = "Flip";
|
||||
//
|
||||
// curveToolStripMenuItem
|
||||
//
|
||||
this.curveToolStripMenuItem.Name = "curveToolStripMenuItem";
|
||||
this.curveToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.curveToolStripMenuItem.Text = "Curve...";
|
||||
//
|
||||
// WAuthorTools
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(243, 130);
|
||||
this.ControlBox = false;
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "WAuthorTools";
|
||||
this.Text = "WAuthorTools";
|
||||
this.linedefpopup.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ContextMenuStrip linedefpopup;
|
||||
private System.Windows.Forms.ToolStripMenuItem propertiesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem splitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem flipToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem curveToolStripMenuItem;
|
||||
}
|
||||
}
|
21
Source/BuilderModes/Editing/WAuthorTools.cs
Normal file
21
Source/BuilderModes/Editing/WAuthorTools.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||
{
|
||||
public partial class WAuthorTools : Form
|
||||
{
|
||||
// Tools
|
||||
public ContextMenuStrip LinedefPopup { get { return linedefpopup; } }
|
||||
|
||||
// Constructor
|
||||
public WAuthorTools()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
123
Source/BuilderModes/Editing/WAuthorTools.resx
Normal file
123
Source/BuilderModes/Editing/WAuthorTools.resx
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="linedefpopup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -41,6 +41,15 @@ thingsmode
|
|||
allowscroll = true;
|
||||
}
|
||||
|
||||
visualmode
|
||||
{
|
||||
title = "Edit: Visual Mode";
|
||||
description = "Switches to visual editing mode.";
|
||||
allowkeys = true;
|
||||
allowmouse = true;
|
||||
allowscroll = true;
|
||||
}
|
||||
|
||||
wauthormode
|
||||
{
|
||||
title = "Edit: WadAuthor Mode";
|
||||
|
|
BIN
Source/BuilderModes/Resources/VisualMode.png
Normal file
BIN
Source/BuilderModes/Resources/VisualMode.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 805 B |
|
@ -43,10 +43,35 @@ namespace CodeImp.DoomBuilder.Editing
|
|||
|
||||
#region ================== Properties
|
||||
|
||||
/// <summary>
|
||||
/// Sets the action name (as defined in the Actions.cfg resource) to
|
||||
/// switch to this mode by using a shortcut key, toolbar button or menu item.
|
||||
/// </summary>
|
||||
public string SwitchAction { get { return switchaction; } set { switchaction = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Image resource name of the embedded resource that will be used for the
|
||||
/// toolbar button and menu item. Leave this property out or set to null to
|
||||
/// display no button for this mode.
|
||||
/// </summary>
|
||||
public string ButtonImage { get { return buttonimage; } set { buttonimage = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar button and menu item description of this mode.
|
||||
/// </summary>
|
||||
public string ButtonDesc { get { return buttondesc; } set { buttondesc = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Sorting number for the order of buttons on the toolbar. Buttons with
|
||||
/// lower values will be more to the left than buttons with higher values.
|
||||
/// </summary>
|
||||
public int ButtonOrder { get { return buttonorder; } set { buttonorder = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// When set to true, this mode is only accessible from
|
||||
/// the toolbar/menu when the game configuration specifies this mode by
|
||||
/// class name in the "additionalmodes" structure.
|
||||
/// </summary>
|
||||
public bool ConfigSpecific { get { return configspecific; } set { configspecific = value; } }
|
||||
|
||||
#endregion
|
||||
|
|
89
Source/Editing/VisualMode.cs
Normal file
89
Source/Editing/VisualMode.cs
Normal file
|
@ -0,0 +1,89 @@
|
|||
|
||||
#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.Controls;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using System.Drawing;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Editing
|
||||
{
|
||||
public abstract class VisualMode : EditMode
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
// Disposing
|
||||
private bool isdisposed = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
// Disposing
|
||||
public bool IsDisposed { get { return isdisposed; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
||||
// Constructor
|
||||
public VisualMode()
|
||||
{
|
||||
// Initialize
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
// Diposer
|
||||
public void Dispose()
|
||||
{
|
||||
// Not already disposed?
|
||||
if(!isdisposed)
|
||||
{
|
||||
// Clean up
|
||||
|
||||
// Done
|
||||
isdisposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -858,7 +858,7 @@ namespace CodeImp.DoomBuilder
|
|||
if(newmode != null) newmode.Engage();
|
||||
|
||||
// Dispose old mode
|
||||
if(mode != null) mode.Dispose();
|
||||
if(oldmode != null) oldmode.Dispose();
|
||||
|
||||
// Done switching
|
||||
newmode = null;
|
||||
|
|
|
@ -30,7 +30,7 @@ using CodeImp.DoomBuilder.Config;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal partial class ActionSelectorControl : UserControl
|
||||
public partial class ActionSelectorControl : UserControl
|
||||
{
|
||||
// Events
|
||||
public event EventHandler ValueChanges;
|
||||
|
|
|
@ -32,7 +32,7 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal class AutoSelectTextbox : TextBox
|
||||
public class AutoSelectTextbox : TextBox
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ using System.Drawing.Drawing2D;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal partial class CheckboxArrayControl : UserControl
|
||||
public partial class CheckboxArrayControl : UserControl
|
||||
{
|
||||
// Constants
|
||||
private const int SPACING_Y = 1;
|
||||
|
|
|
@ -30,7 +30,7 @@ using CodeImp.DoomBuilder.Rendering;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal partial class ColorControl : UserControl
|
||||
public partial class ColorControl : UserControl
|
||||
{
|
||||
// Constructor
|
||||
public ColorControl()
|
||||
|
|
|
@ -37,7 +37,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal class FlatSelectorControl : ImageSelectorControl
|
||||
public class FlatSelectorControl : ImageSelectorControl
|
||||
{
|
||||
// Setup
|
||||
public void Initialize()
|
||||
|
|
|
@ -39,7 +39,7 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
public interface IMainForm
|
||||
public interface IMainForm : IWin32Window
|
||||
{
|
||||
// Properties
|
||||
bool AltState { get; }
|
||||
|
@ -59,5 +59,6 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
void ShowThingInfo(Thing t);
|
||||
void ShowVertexInfo(Vertex v);
|
||||
void HideInfo();
|
||||
bool Focus();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ using System.Drawing.Drawing2D;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal abstract partial class ImageSelectorControl : UserControl
|
||||
public abstract partial class ImageSelectorControl : UserControl
|
||||
{
|
||||
// Properties
|
||||
public string TextureName { get { return name.Text; } set { name.Text = value; } }
|
||||
|
|
|
@ -32,7 +32,7 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal class NumericTextbox : AutoSelectTextbox
|
||||
public class NumericTextbox : AutoSelectTextbox
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ using CodeImp.DoomBuilder.Editing;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal class OptimizedListView : ListView
|
||||
public class OptimizedListView : ListView
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ using CodeImp.DoomBuilder.Map;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal class TextureSelectorControl : ImageSelectorControl
|
||||
public class TextureSelectorControl : ImageSelectorControl
|
||||
{
|
||||
// Variables
|
||||
private bool required;
|
||||
|
|
Loading…
Reference in a new issue