mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-22 11:51:42 +00:00
@ I will probably never finish this WadAuthor Mode plugin (because I simply don't care for it) but I felt the files were outdated an in the wrong place (BuilderModes)
This commit is contained in:
parent
2fda5b457c
commit
d27ac60a9d
12 changed files with 480 additions and 31 deletions
12
Builder.sln
12
Builder.sln
|
@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageDrawingExample", "Sour
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommentsPanel", "Source\Plugins\CommentsPanel\CommentsPanel.csproj", "{58BD8A5B-1B48-435D-8473-A92F27D06C49}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommentsPanel", "Source\Plugins\CommentsPanel\CommentsPanel.csproj", "{58BD8A5B-1B48-435D-8473-A92F27D06C49}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WadAuthorMode", "Source\Plugins\WadAuthorMode\WadAuthorMode.csproj", "{B675B60F-FFB4-4170-BEA8-A8849E197B93}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -77,6 +79,16 @@ Global
|
||||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Mixed Platforms.Build.0 = Release|x86
|
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.ActiveCfg = Release|x86
|
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.ActiveCfg = Release|x86
|
||||||
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.Build.0 = Release|x86
|
{58BD8A5B-1B48-435D-8473-A92F27D06C49}.Release|x86.Build.0 = Release|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Release|Any CPU.ActiveCfg = Release|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{B675B60F-FFB4-4170-BEA8-A8849E197B93}.Release|x86.Build.0 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
78
Source/Plugins/WadAuthorMode/BuilderPlug.cs
Normal file
78
Source/Plugins/WadAuthorMode/BuilderPlug.cs
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
|
||||||
|
#region ================== Copyright (c) 2010 Pascal vd Heiden
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2010 Pascal vd Heiden
|
||||||
|
* 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.Collections.ObjectModel;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Text;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
using CodeImp.DoomBuilder.Controls;
|
||||||
|
using CodeImp.DoomBuilder.Windows;
|
||||||
|
using CodeImp.DoomBuilder.IO;
|
||||||
|
using CodeImp.DoomBuilder.Map;
|
||||||
|
using CodeImp.DoomBuilder.Rendering;
|
||||||
|
using CodeImp.DoomBuilder.Geometry;
|
||||||
|
using CodeImp.DoomBuilder.Editing;
|
||||||
|
using CodeImp.DoomBuilder.Plugins;
|
||||||
|
using CodeImp.DoomBuilder.Actions;
|
||||||
|
using CodeImp.DoomBuilder.Types;
|
||||||
|
using CodeImp.DoomBuilder.Config;
|
||||||
|
using CodeImp.DoomBuilder.Data;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
namespace CodeImp.DoomBuilder.WadAuthorMode
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// MANDATORY: The plug!
|
||||||
|
// This is an important class to the Doom Builder core. Every plugin must
|
||||||
|
// have exactly 1 class that inherits from Plug. When the plugin is loaded,
|
||||||
|
// this class is instantiated and used to receive events from the core.
|
||||||
|
// Make sure the class is public, because only public classes can be seen
|
||||||
|
// by the core.
|
||||||
|
//
|
||||||
|
|
||||||
|
public class BuilderPlug : Plug
|
||||||
|
{
|
||||||
|
// Static instance. We can't use a real static class, because BuilderPlug must
|
||||||
|
// be instantiated by the core, so we keep a static reference. (this technique
|
||||||
|
// should be familiar to object-oriented programmers)
|
||||||
|
private static BuilderPlug me;
|
||||||
|
|
||||||
|
// Static property to access the BuilderPlug
|
||||||
|
public static BuilderPlug Me { get { return me; } }
|
||||||
|
|
||||||
|
// This event is called when the plugin is initialized
|
||||||
|
public override void OnInitialize()
|
||||||
|
{
|
||||||
|
base.OnInitialize();
|
||||||
|
|
||||||
|
// Keep a static reference
|
||||||
|
me = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is called when the plugin is terminated
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
base.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
36
Source/Plugins/WadAuthorMode/Properties/AssemblyInfo.cs
Normal file
36
Source/Plugins/WadAuthorMode/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("WadAuthorMode")]
|
||||||
|
[assembly: AssemblyDescription("WadAuthor Editing Mode")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("WadAuthorMode")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2010")]
|
||||||
|
[assembly: AssemblyTrademark("CodeImp")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("88b0b89b-686a-41e5-94b4-950b27deeaa5")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
70
Source/Plugins/WadAuthorMode/Properties/Resources.Designer.cs
generated
Normal file
70
Source/Plugins/WadAuthorMode/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:2.0.50727.3615
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace CodeImp.DoomBuilder.WadAuthorMode.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
/// </summary>
|
||||||
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
// class via a tool like ResGen or Visual Studio.
|
||||||
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
// with the /str option, or rebuild your VS project.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
internal class Resources {
|
||||||
|
|
||||||
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
|
internal Resources() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||||
|
get {
|
||||||
|
if (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CodeImp.DoomBuilder.WadAuthorMode.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
|
/// resource lookups using this strongly typed resource class.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
internal static global::System.Globalization.CultureInfo Culture {
|
||||||
|
get {
|
||||||
|
return resourceCulture;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
resourceCulture = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap WAuthor {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("WAuthor", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
124
Source/Plugins/WadAuthorMode/Properties/Resources.resx
Normal file
124
Source/Plugins/WadAuthorMode/Properties/Resources.resx
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
<?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>
|
||||||
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="WAuthor" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\WAuthor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
39
Source/Plugins/WadAuthorMode/Resources/Actions.cfg
Normal file
39
Source/Plugins/WadAuthorMode/Resources/Actions.cfg
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/******************************************\
|
||||||
|
Doom Builder Actions Configuration
|
||||||
|
\******************************************/
|
||||||
|
|
||||||
|
// Categories for the Controls preferences
|
||||||
|
categories
|
||||||
|
{
|
||||||
|
drawing = "Drawing";
|
||||||
|
linedefs = "Lines";
|
||||||
|
sectors = "Sectors";
|
||||||
|
}
|
||||||
|
|
||||||
|
// This just defines which actions there are, what description they have and
|
||||||
|
// some behaviour options. The Doom Builder core will bind to these actions
|
||||||
|
// with delegates (function pointers) where you use the BeginAction and
|
||||||
|
// EndAction attributes.
|
||||||
|
|
||||||
|
// Behaviour options:
|
||||||
|
//
|
||||||
|
// allowkeys: Allows the user to bind standard keys to this action.
|
||||||
|
// allowmouse: Allows the user to bind mouse buttons to this action.
|
||||||
|
// allowscroll: Allows the user to bind the scrollwheel to this action.
|
||||||
|
// disregardshift: This action will be triggered regardless if Shift is used.
|
||||||
|
// disregardcontrol: This action will be triggered regardless if Control is used.
|
||||||
|
// repeat: BeginAction will be called for automatic key repetition.
|
||||||
|
//
|
||||||
|
// allowkeys and allowmouse are true by default, the others are false by default.
|
||||||
|
//
|
||||||
|
|
||||||
|
wadauthormode
|
||||||
|
{
|
||||||
|
title = "WadAuthor Mode";
|
||||||
|
category = "modes";
|
||||||
|
description = "Switches to WadAuthor editing mode.";
|
||||||
|
allowkeys = true;
|
||||||
|
allowmouse = true;
|
||||||
|
allowscroll = true;
|
||||||
|
}
|
||||||
|
|
BIN
Source/Plugins/WadAuthorMode/Resources/WAuthor.png
Normal file
BIN
Source/Plugins/WadAuthorMode/Resources/WAuthor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 601 B |
|
@ -36,14 +36,15 @@ using CodeImp.DoomBuilder.Actions;
|
||||||
|
|
||||||
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||||
{
|
{
|
||||||
#if DEBUG
|
|
||||||
|
|
||||||
[EditMode(DisplayName = "WadAuthor Mode",
|
[EditMode(DisplayName = "WadAuthor Mode",
|
||||||
SwitchAction = "wauthormode",
|
SwitchAction = "wadauthormode",
|
||||||
ButtonImage = "WAuthor.png",
|
ButtonImage = "WAuthor.png",
|
||||||
ButtonOrder = int.MinValue + 4)]
|
ButtonOrder = int.MinValue + 400,
|
||||||
|
ButtonGroup = "000_editing",
|
||||||
|
UseByDefault = true,
|
||||||
|
SafeStartMode = true)]
|
||||||
|
|
||||||
public class WAuthorMode : ClassicMode
|
public class WadAuthorMode : ClassicMode
|
||||||
{
|
{
|
||||||
#region ================== Constants
|
#region ================== Constants
|
||||||
|
|
||||||
|
@ -70,15 +71,11 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||||
#region ================== Constructor / Disposer
|
#region ================== Constructor / Disposer
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
public WAuthorMode()
|
public WadAuthorMode()
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
tools = new WAuthorTools();
|
tools = new WAuthorTools();
|
||||||
|
|
||||||
// Enable this and you'll have a floating window
|
|
||||||
//tools.Show(General.Interface);
|
|
||||||
//General.Interface.Focus();
|
|
||||||
|
|
||||||
// We have no destructor
|
// We have no destructor
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
|
@ -107,13 +104,18 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||||
base.OnCancel();
|
base.OnCancel();
|
||||||
|
|
||||||
// Return to this mode
|
// Return to this mode
|
||||||
General.Editing.ChangeMode(new WAuthorMode());
|
General.Editing.ChangeMode(new WadAuthorMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mode engages
|
// Mode engages
|
||||||
public override void OnEngage()
|
public override void OnEngage()
|
||||||
{
|
{
|
||||||
base.OnEngage();
|
base.OnEngage();
|
||||||
|
|
||||||
|
renderer.SetPresentation(Presentation.Things);
|
||||||
|
|
||||||
|
// Convert geometry selection to linedefs selection
|
||||||
|
General.Map.Map.ConvertSelection(SelectionType.Sectors, SelectionType.Linedefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mode disengages
|
// Mode disengages
|
||||||
|
@ -129,8 +131,10 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||||
}
|
}
|
||||||
|
|
||||||
// This redraws the display
|
// This redraws the display
|
||||||
public unsafe override void OnRedrawDisplay()
|
public override void OnRedrawDisplay()
|
||||||
{
|
{
|
||||||
|
renderer.RedrawSurface();
|
||||||
|
|
||||||
// Render lines and vertices
|
// Render lines and vertices
|
||||||
if(renderer.StartPlotter(true))
|
if(renderer.StartPlotter(true))
|
||||||
{
|
{
|
||||||
|
@ -353,8 +357,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
|
// Mouse leaves
|
||||||
public override void OnMouseLeave(EventArgs e)
|
public override void OnMouseLeave(EventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -364,29 +366,21 @@ namespace CodeImp.DoomBuilder.BuilderModes.Editing
|
||||||
Highlight(null);
|
Highlight(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mouse button pressed
|
|
||||||
public override void OnMouseDown(MouseEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnMouseDown(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mouse released
|
|
||||||
public override void OnMouseUp(MouseEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnMouseUp(e);
|
|
||||||
|
|
||||||
// This shows a popup menu
|
|
||||||
tools.LinedefPopup.Show(Cursor.Position);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mouse wants to drag
|
// Mouse wants to drag
|
||||||
protected override void OnDragStart(MouseEventArgs e)
|
protected override void OnDragStart(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnDragStart(e);
|
base.OnDragStart(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
// Edit action ends
|
||||||
|
protected override void OnEditEnd()
|
||||||
|
{
|
||||||
|
base.OnEditEnd();
|
||||||
|
|
||||||
|
// This shows a popup menu
|
||||||
|
tools.LinedefPopup.Show(Cursor.Position);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endregion
|
||||||
|
}
|
||||||
}
|
}
|
96
Source/Plugins/WadAuthorMode/WadAuthorMode.csproj
Normal file
96
Source/Plugins/WadAuthorMode/WadAuthorMode.csproj
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>9.0.30729</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{B675B60F-FFB4-4170-BEA8-A8849E197B93}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>CodeImp.DoomBuilder.WadAuthorMode</RootNamespace>
|
||||||
|
<AssemblyName>WadAuthorMode</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<TargetFrameworkSubset>
|
||||||
|
</TargetFrameworkSubset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<OutputPath>..\..\..\Build\Plugins\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||||
|
<OutputPath>..\..\..\Build\Plugins\</OutputPath>
|
||||||
|
<DefineConstants>
|
||||||
|
</DefineConstants>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml.Linq">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.DataSetExtensions">
|
||||||
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="BuilderPlug.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="WAuthorMode.cs" />
|
||||||
|
<Compile Include="WAuthorTools.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="WAuthorTools.designer.cs">
|
||||||
|
<DependentUpon>WAuthorTools.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\Core\Builder.csproj">
|
||||||
|
<Project>{818B3D10-F791-4C3F-9AF5-BB2D0079B63C}</Project>
|
||||||
|
<Name>Builder</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="WAuthorTools.resx">
|
||||||
|
<DependentUpon>WAuthorTools.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Resources\Actions.cfg" />
|
||||||
|
<EmbeddedResource Include="Resources\WAuthor.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\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.
|
||||||
|
<Target Name="BeforeBuild">
|
||||||
|
</Target>
|
||||||
|
<Target Name="AfterBuild">
|
||||||
|
</Target>
|
||||||
|
-->
|
||||||
|
</Project>
|
Loading…
Reference in a new issue