diff --git a/Builder.sln b/Builder.sln index 67ac83d0..012faef1 100644 --- a/Builder.sln +++ b/Builder.sln @@ -15,7 +15,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommentsPanel", "Source\Plu EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WadAuthorMode", "Source\Plugins\WadAuthorMode\WadAuthorMode.csproj", "{B675B60F-FFB4-4170-BEA8-A8849E197B93}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZDoomUSDF", "Source\Plugins\ZDoomUSDF\ZDoomUSDF.csproj", "{CC9BAD62-C57B-45A0-BC5D-172A2957ADC7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "USDF", "Source\Plugins\USDF\USDF.csproj", "{CC9BAD62-C57B-45A0-BC5D-172A2957ADC7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Resources/Icons/Dialog.ico b/Resources/Icons/Dialog.ico new file mode 100644 index 00000000..9d0d40c2 Binary files /dev/null and b/Resources/Icons/Dialog.ico differ diff --git a/Source/Plugins/USDF/BuilderPlug.cs b/Source/Plugins/USDF/BuilderPlug.cs new file mode 100644 index 00000000..07253044 --- /dev/null +++ b/Source/Plugins/USDF/BuilderPlug.cs @@ -0,0 +1,187 @@ + +#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 System.Windows.Forms; +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.USDF +{ + public class BuilderPlug : Plug + { + #region ================== Variables + + // Static instance + private static BuilderPlug me; + + // Tools form + private ToolsForm toolsform; + + // Main form + private MainForm mainform; + + #endregion + + #region ================== Properties + + // Static property to access the BuilderPlug + public static BuilderPlug Me { get { return me; } } + + // Is the editor opened? + public bool EditorOpen { get { return (mainform != null) && !mainform.IsDisposed; } } + + #endregion + + #region ================== Methods + + // This loads what is needed to support USDF + private void Load() + { + // Check if the map format has a DIALOGUE lump we can edit + bool editlump = false; + foreach(KeyValuePair lump in General.Map.Config.MapLumps) + { + if(lump.Key.Trim().ToUpperInvariant() == "DIALOGUE") + editlump = true; + } + + if(editlump) + { + // Load tools (this adds our button to the toolbar) + if(toolsform == null) + toolsform = new ToolsForm(); + } + } + + // This unloads everything + private void Unload() + { + if(mainform != null) + mainform.Dispose(); + + if(toolsform != null) + toolsform.Dispose(); + + toolsform = null; + } + + #endregion + + #region ================== Events + + // This event is called when the plugin is initialized + public override void OnInitialize() + { + base.OnInitialize(); + + // Keep a static reference + me = this; + + General.Actions.BindMethods(this); + } + + // This is called when the plugin is terminated + public override void Dispose() + { + General.Actions.UnbindMethods(this); + Unload(); + base.Dispose(); + } + + // New map started + public override void OnMapNewEnd() + { + base.OnMapNewEnd(); + Load(); + } + + // Map opened + public override void OnMapOpenEnd() + { + base.OnMapOpenEnd(); + Load(); + } + + // Map is being saved + public override void OnMapSaveBegin(SavePurpose purpose) + { + base.OnMapSaveBegin(purpose); + if(this.EditorOpen) + mainform.SaveData(); + } + + // Map closed + public override void OnMapCloseEnd() + { + base.OnMapCloseEnd(); + Unload(); + } + + // Map config changed + public override void OnMapReconfigure() + { + base.OnMapReconfigure(); + Unload(); + Load(); + } + + #endregion + + #region ================== Actions + + [BeginAction("opendialogeditor")] + public void OpenConversationEditor() + { + if(!this.EditorOpen) + { + mainform = new MainForm(); + + if(General.Settings.ScriptOnTop) + mainform.Show(General.Interface); + else + mainform.Show(); + } + else + { + mainform.Activate(); + } + } + + #endregion + } +} diff --git a/Source/Plugins/USDF/MainForm.Designer.cs b/Source/Plugins/USDF/MainForm.Designer.cs new file mode 100644 index 00000000..b7e110ba --- /dev/null +++ b/Source/Plugins/USDF/MainForm.Designer.cs @@ -0,0 +1,55 @@ +namespace CodeImp.DoomBuilder.USDF +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.SuspendLayout(); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.ClientSize = new System.Drawing.Size(813, 612); + this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "MainForm"; + this.Opacity = 0; + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; + this.Text = "Dialog Editor"; + this.Load += new System.EventHandler(this.MainForm_Load); + this.Move += new System.EventHandler(this.MainForm_Move); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); + this.ResizeEnd += new System.EventHandler(this.MainForm_ResizeEnd); + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/Source/Plugins/USDF/MainForm.cs b/Source/Plugins/USDF/MainForm.cs new file mode 100644 index 00000000..d3bef8d8 --- /dev/null +++ b/Source/Plugins/USDF/MainForm.cs @@ -0,0 +1,130 @@ +#region === Copyright (c) 2010 Pascal van der Heiden === + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Windows; +using System.IO; + +#endregion + +namespace CodeImp.DoomBuilder.USDF +{ + public partial class MainForm : DelayedForm + { + #region ================== Constants + + #endregion + + #region ================== Variables + + // Position/size + private Point lastposition; + private Size lastsize; + + #endregion + + #region ================== Properties + + #endregion + + #region ================== Constructor / Destructor + + // Constructor + public MainForm() + { + InitializeComponent(); + + // Load data from DIALOGUE lump + MemoryStream s = General.Map.GetLumpData("DIALOGUE"); + if(s != null) + { + + } + } + + #endregion + + #region ================== Methods + + // Called before the map is saved so we can save our data + public void SaveData() + { + } + + #endregion + + #region ================== Events + + // Form loaded + private void MainForm_Load(object sender, EventArgs e) + { + this.SuspendLayout(); + this.Location = new Point(General.Settings.ReadPluginSetting("mainwindow.positionx", this.Location.X), + General.Settings.ReadPluginSetting("mainwindow.positiony", this.Location.Y)); + this.Size = new Size(General.Settings.ReadPluginSetting("mainwindow.sizewidth", this.Size.Width), + General.Settings.ReadPluginSetting("mainwindow.sizeheight", this.Size.Height)); + this.WindowState = (FormWindowState)General.Settings.ReadPluginSetting("mainwindow.windowstate", (int)FormWindowState.Normal); + this.ResumeLayout(true); + + // Normal windowstate? + if(this.WindowState == FormWindowState.Normal) + { + // Keep last position and size + lastposition = this.Location; + lastsize = this.Size; + } + } + + // Form is being closed + private void MainForm_FormClosing(object sender, FormClosingEventArgs e) + { + int windowstate; + + // Determine window state to save + if(this.WindowState != FormWindowState.Minimized) + windowstate = (int)this.WindowState; + else + windowstate = (int)FormWindowState.Normal; + + // Save window settings + General.Settings.WritePluginSetting("mainwindow.positionx", lastposition.X); + General.Settings.WritePluginSetting("mainwindow.positiony", lastposition.Y); + General.Settings.WritePluginSetting("mainwindow.sizewidth", lastsize.Width); + General.Settings.WritePluginSetting("mainwindow.sizeheight", lastsize.Height); + General.Settings.WritePluginSetting("mainwindow.windowstate", windowstate); + + // Save dialog data + SaveData(); + } + + // Form resized + private void MainForm_ResizeEnd(object sender, EventArgs e) + { + // Normal windowstate? + if(this.WindowState == FormWindowState.Normal) + { + // Keep last position and size + lastposition = this.Location; + lastsize = this.Size; + } + } + + // Form moved + private void MainForm_Move(object sender, EventArgs e) + { + // Normal windowstate? + if(this.WindowState == FormWindowState.Normal) + { + // Keep last position and size + lastposition = this.Location; + lastsize = this.Size; + } + } + + #endregion + } +} \ No newline at end of file diff --git a/Source/Plugins/USDF/MainForm.resx b/Source/Plugins/USDF/MainForm.resx new file mode 100644 index 00000000..29c19177 --- /dev/null +++ b/Source/Plugins/USDF/MainForm.resx @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZAAAAGQAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkNieyM003/wAA + ABkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArQC7Mc6F6/zNN + N/8AAAAZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvRzPlc6F6/4Kr + if8zTTf/AAAAGQAAAAAAAAAAAAAAAAAAAAAAAAAZAAAAGQAAABkAAAAZAAAAGQAAABkzTTf/c6F6//// + //+Cq4n/M003/wAAABkAAAAZAAAAAAoPCzM2SDmyM003/zNNN/8zTTf/M003/zNNN/8zTTf/c6F6//// + ////////gquJ/zNNN/8uRjKyGScbMwAAABk4Szuy3ung/9bk2P/O39D/w9fG/7vSvv+zzLf/qMWs//z8 + /P///////////8PXxv+Cq4n/c6F6/y5GMrIAAAAZRWBJ/+Ts5f/k7OX/6O7p/+rv6//u8e7/8vPy//X2 + 9f/4+fj/+vr6//z8/P///////////4Krif8zTTf/AAAAGVVwWf/q7+r/3+rg/+Dq4v/k7OX/6O7p/+zw + 7f/w8vD/8vPy//X29f/4+fj/+/v7//////+Cq4n/M003/wAAABlifWb/7fHt/9jl2v+YmJj/mJiY/8bM + x/+YmJj/mJiY/5iYmP+YmJj/9PX0//X29f/7+/v/gquJ/zNNN/8AAAAZboly//P18//S4dT/1uTY/9nm + 2//b593/3+rg/+Ps5P/n7uj/6u/r/+zw7f/w8vD/9/j3/4Cqhv8zTTf/AAAAGW6Jcv/3+Pf/zd7Q/5iY + mP+YmJj/mJiY/5iYmP/CycT/mJiY/8bMx/+YmJj/mJiY//Dy8P+Cq4n/M003/wAAABl4k3z//P38/8XY + x//J28z/zd7Q/9Hg0//U49b/1uTY/9nm2//d6N//4Ori/+Ts5f/q7+v/iK+O/zNNN/8AAAAZbYNwsv// + ///3+Pf/7/Pw/+fu6P/c6N3/0+LV/8vczv/D18b/udC8/7DKtP+oxaz/lbia/42zkv8pOyuyAAAAACct + KDNsgnCyeJN8/26Jcv9uiXL/boly/26Jcv9ifWb/Yn1m/2J9Zv9VcFn/VXBZ/0VgSf84SzuyEhsTMwAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAA//P////j////w////4P//8AB//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAB + //8AAf///////w== + + + \ No newline at end of file diff --git a/Source/Plugins/USDF/Properties/AssemblyInfo.cs b/Source/Plugins/USDF/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..b5d4cf9c --- /dev/null +++ b/Source/Plugins/USDF/Properties/AssemblyInfo.cs @@ -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("USDF")] +[assembly: AssemblyDescription("USDF Conversation Editor plugin")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Doom Builder")] +[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("49d76fc2-0683-4fce-9a22-7b288061ffc2")] + +// 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")] diff --git a/Source/Plugins/USDF/Properties/Resources.Designer.cs b/Source/Plugins/USDF/Properties/Resources.Designer.cs new file mode 100644 index 00000000..ffa382d0 --- /dev/null +++ b/Source/Plugins/USDF/Properties/Resources.Designer.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace CodeImp.DoomBuilder.USDF.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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.USDF.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [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 Dialog { + get { + object obj = ResourceManager.GetObject("Dialog", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Source/Plugins/USDF/Properties/Resources.resx b/Source/Plugins/USDF/Properties/Resources.resx new file mode 100644 index 00000000..d13f79a2 --- /dev/null +++ b/Source/Plugins/USDF/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Dialog.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Source/Plugins/USDF/Resources/Actions.cfg b/Source/Plugins/USDF/Resources/Actions.cfg new file mode 100644 index 00000000..06c0725b --- /dev/null +++ b/Source/Plugins/USDF/Resources/Actions.cfg @@ -0,0 +1,15 @@ +/******************************************\ + Doom Builder Actions Configuration +\******************************************/ + + +opendialogeditor +{ + title = "Dialog Editor"; + category = "view"; + description = "This opens the dialog editor that allows you to edit DIALOGUE conversations in your map."; + allowkeys = true; + allowmouse = true; + allowscroll = true; +} + diff --git a/Source/Plugins/USDF/Resources/Dialog.png b/Source/Plugins/USDF/Resources/Dialog.png new file mode 100644 index 00000000..1bbc62c7 Binary files /dev/null and b/Source/Plugins/USDF/Resources/Dialog.png differ diff --git a/Source/Plugins/USDF/ToolsForm.Designer.cs b/Source/Plugins/USDF/ToolsForm.Designer.cs new file mode 100644 index 00000000..a5d3fc82 --- /dev/null +++ b/Source/Plugins/USDF/ToolsForm.Designer.cs @@ -0,0 +1,107 @@ +namespace CodeImp.DoomBuilder.USDF +{ + partial class ToolsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.toolstrip = new System.Windows.Forms.ToolStrip(); + this.dialogbutton = new System.Windows.Forms.ToolStripButton(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.editmenu = new System.Windows.Forms.ToolStripMenuItem(); + this.dialogitem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolstrip.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // toolstrip + // + this.toolstrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.dialogbutton}); + this.toolstrip.Location = new System.Drawing.Point(0, 24); + this.toolstrip.Name = "toolstrip"; + this.toolstrip.Size = new System.Drawing.Size(196, 25); + this.toolstrip.TabIndex = 0; + this.toolstrip.Text = "toolStrip1"; + // + // dialogbutton + // + this.dialogbutton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.dialogbutton.Image = global::CodeImp.DoomBuilder.USDF.Properties.Resources.Dialog; + this.dialogbutton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.dialogbutton.Name = "dialogbutton"; + this.dialogbutton.Size = new System.Drawing.Size(23, 22); + this.dialogbutton.Tag = "opendialogeditor"; + this.dialogbutton.Text = "Open Dialog Editor"; + this.dialogbutton.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.editmenu}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(196, 24); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // editmenu + // + this.editmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.dialogitem}); + this.editmenu.Name = "editmenu"; + this.editmenu.Size = new System.Drawing.Size(39, 20); + this.editmenu.Text = "Edit"; + // + // dialogitem + // + this.dialogitem.Image = global::CodeImp.DoomBuilder.USDF.Properties.Resources.Dialog; + this.dialogitem.Name = "dialogitem"; + this.dialogitem.Size = new System.Drawing.Size(152, 22); + this.dialogitem.Tag = "opendialogeditor"; + this.dialogitem.Text = "Dialog Editor..."; + this.dialogitem.Click += new System.EventHandler(this.InvokeTaggedAction); + // + // ToolsForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(196, 78); + this.Controls.Add(this.toolstrip); + this.Controls.Add(this.menuStrip1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MainMenuStrip = this.menuStrip1; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ToolsForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.Text = "ToolsForm"; + this.toolstrip.ResumeLayout(false); + this.toolstrip.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ToolStrip toolstrip; + private System.Windows.Forms.ToolStripButton dialogbutton; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem editmenu; + private System.Windows.Forms.ToolStripMenuItem dialogitem; + } +} \ No newline at end of file diff --git a/Source/Plugins/USDF/ToolsForm.cs b/Source/Plugins/USDF/ToolsForm.cs new file mode 100644 index 00000000..ae6ec5a7 --- /dev/null +++ b/Source/Plugins/USDF/ToolsForm.cs @@ -0,0 +1,71 @@ +#region === Copyright (c) 2010 Pascal van der Heiden === + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Text; +using System.ComponentModel; +using System.Windows.Forms; +using CodeImp.DoomBuilder.Windows; + +#endregion + +namespace CodeImp.DoomBuilder.USDF +{ + public partial class ToolsForm : Form + { + #region ================== Constants + + #endregion + + #region ================== Variables + + #endregion + + #region ================== Properties + + #endregion + + #region ================== Constructor / Destructor + + // Constructor + public ToolsForm() + { + InitializeComponent(); + + General.Interface.AddButton(dialogbutton, ToolbarSection.Script); + General.Interface.AddMenu(dialogitem, MenuSection.ViewScriptEdit); + } + + // Disposer + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + + General.Interface.RemoveButton(dialogbutton); + General.Interface.RemoveMenu(dialogitem); + + base.Dispose(disposing); + } + + #endregion + + #region ================== Methods + + // This invokes an action from control event + private void InvokeTaggedAction(object sender, EventArgs e) + { + General.Interface.InvokeTaggedAction(sender, e); + } + + #endregion + + #region ================== Events + + #endregion + } +} diff --git a/Source/Plugins/USDF/ToolsForm.resx b/Source/Plugins/USDF/ToolsForm.resx new file mode 100644 index 00000000..7b5cc740 --- /dev/null +++ b/Source/Plugins/USDF/ToolsForm.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + 17, 17 + + + 114, 17 + + \ No newline at end of file diff --git a/Source/Plugins/USDF/USDF.csproj b/Source/Plugins/USDF/USDF.csproj new file mode 100644 index 00000000..393224dc --- /dev/null +++ b/Source/Plugins/USDF/USDF.csproj @@ -0,0 +1,95 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CC9BAD62-C57B-45A0-BC5D-172A2957ADC7} + Library + Properties + CodeImp.DoomBuilder.USDF + USDF + v3.5 + 512 + + + true + ..\..\..\Build\Plugins\ + DEBUG;TRACE + true + full + x86 + prompt + + + ..\..\..\Build\Plugins\ + true + true + pdbonly + x86 + prompt + + + + + 3.5 + + + + + + + + Form + + + MainForm.cs + + + + True + True + Resources.resx + + + Form + + + ToolsForm.cs + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + ToolsForm.cs + Designer + + + + + {818B3D10-F791-4C3F-9AF5-BB2D0079B63C} + Builder + + + + + Designer + MainForm.cs + + + + + + + \ No newline at end of file