mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
lots of changes/additions
This commit is contained in:
parent
3cc6e82fe8
commit
4cf0f18dbb
28 changed files with 1352 additions and 41 deletions
BIN
Resources/MissingTexture.png
Normal file
BIN
Resources/MissingTexture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 586 B |
|
@ -48,6 +48,7 @@
|
|||
<Compile Include="Config\INumberedTitle.cs" />
|
||||
<Compile Include="Config\LinedefActionCategory.cs" />
|
||||
<Compile Include="Config\LinedefActionInfo.cs" />
|
||||
<Compile Include="Config\LinedefActivateInfo.cs" />
|
||||
<Compile Include="Config\ProgramConfiguration.cs" />
|
||||
<Compile Include="Config\TagType.cs" />
|
||||
<Compile Include="Config\ThingCategory.cs" />
|
||||
|
@ -133,19 +134,28 @@
|
|||
<Compile Include="Interface\DelayedForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interface\FlatSelectorControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interface\GridSetupForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interface\GridSetupForm.Designer.cs">
|
||||
<DependentUpon>GridSetupForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Interface\ImageBrowser.cs">
|
||||
<Compile Include="Interface\ImageBrowserControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interface\ImageBrowser.Designer.cs">
|
||||
<DependentUpon>ImageBrowser.cs</DependentUpon>
|
||||
<Compile Include="Interface\ImageBrowserControl.Designer.cs">
|
||||
<DependentUpon>ImageBrowserControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Interface\ImageBrowserItem.cs" />
|
||||
<Compile Include="Interface\ImageSelectorControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interface\ImageSelectorControl.Designer.cs">
|
||||
<DependentUpon>ImageSelectorControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Interface\LinedefEditForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -164,6 +174,9 @@
|
|||
<Compile Include="Interface\MapOptionsForm.Designer.cs">
|
||||
<DependentUpon>MapOptionsForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Interface\NumericTextbox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interface\OpenMapOptionsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -209,6 +222,9 @@
|
|||
<Compile Include="Interface\TextureBrowserForm.Designer.cs">
|
||||
<DependentUpon>TextureBrowserForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Interface\TextureSelectorControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interface\ThingInfoPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
|
@ -245,6 +261,7 @@
|
|||
<Compile Include="Data\DataLocation.cs" />
|
||||
<Compile Include="Map\Sector.cs" />
|
||||
<Compile Include="Map\Sidedef.cs" />
|
||||
<Compile Include="Map\SidedefPart.cs" />
|
||||
<Compile Include="Map\Thing.cs" />
|
||||
<Compile Include="Map\Vertex.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
@ -306,6 +323,8 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\Builder.ico" />
|
||||
<None Include="Resources\MissingTexture.png" />
|
||||
<None Include="Resources\UnknownImage.png" />
|
||||
<None Include="Resources\treeview.png" />
|
||||
<None Include="Resources\Folder.png" />
|
||||
<None Include="Resources\mergegeometry2.png" />
|
||||
|
@ -320,7 +339,6 @@
|
|||
<None Include="Resources\Status1.png" />
|
||||
<None Include="Resources\Status2.png" />
|
||||
<None Include="Resources\Status0.png" />
|
||||
<None Include="Resources\UnknownImage.png" />
|
||||
<None Include="Resources\VerticesMode.png" />
|
||||
<None Include="Resources\SectorsMode.png" />
|
||||
<None Include="Resources\LinesMode.png" />
|
||||
|
@ -362,9 +380,13 @@
|
|||
<SubType>Designer</SubType>
|
||||
<DependentUpon>GridSetupForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Interface\ImageBrowser.resx">
|
||||
<EmbeddedResource Include="Interface\ImageBrowserControl.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ImageBrowser.cs</DependentUpon>
|
||||
<DependentUpon>ImageBrowserControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Interface\ImageSelectorControl.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>ImageSelectorControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Interface\LinedefEditForm.resx">
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
@ -67,6 +67,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
private Dictionary<int, LinedefActionInfo> linedefactions;
|
||||
private List<LinedefActionInfo> sortedlinedefactions;
|
||||
private List<LinedefActionCategory> actioncategories;
|
||||
private List<LinedefActivateInfo> linedefactivates;
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -97,6 +98,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
public IDictionary<int, LinedefActionInfo> LinedefActions { get { return linedefactions; } }
|
||||
public List<LinedefActionInfo> SortedLinedefActions { get { return sortedlinedefactions; } }
|
||||
public List<LinedefActionCategory> ActionCategories { get { return actioncategories; } }
|
||||
public List<LinedefActivateInfo> LinedefActivates { get { return linedefactivates; } }
|
||||
|
||||
#endregion
|
||||
|
||||
|
@ -113,6 +115,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
this.linedefactions = new Dictionary<int, LinedefActionInfo>();
|
||||
this.actioncategories = new List<LinedefActionCategory>();
|
||||
this.sortedlinedefactions = new List<LinedefActionInfo>();
|
||||
this.linedefactivates = new List<LinedefActivateInfo>();
|
||||
|
||||
// Read general settings
|
||||
defaulttexturescale = cfg.ReadSetting("defaulttexturescale", 1f);
|
||||
|
@ -136,6 +139,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
// Linedefs
|
||||
LoadLinedefFlags();
|
||||
LoadLinedefActions();
|
||||
LoadLinedefActivations();
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
|
@ -184,7 +188,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
linedefflags.Add(bitvalue, de.Value.ToString());
|
||||
else
|
||||
General.WriteLogLine("WARNING: Structure 'linedefflags' contains conflicting bit flag keys. Make sure all keys are unique integers and powers of 2!");
|
||||
|
||||
|
||||
// Update bit flags checking value
|
||||
bitflagscheck |= bitvalue;
|
||||
}
|
||||
|
@ -236,6 +240,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
|
||||
// Add action to category and sorted list
|
||||
sortedlinedefactions.Add(ai);
|
||||
linedefactions.Add(actionnumber, ai);
|
||||
ac.Add(ai);
|
||||
}
|
||||
else
|
||||
|
@ -254,6 +259,34 @@ namespace CodeImp.DoomBuilder.Config
|
|||
// Sort the categories list
|
||||
actioncategories.Sort();
|
||||
}
|
||||
|
||||
// Linedef activates
|
||||
private void LoadLinedefActivations()
|
||||
{
|
||||
IDictionary dic;
|
||||
int bitvalue;
|
||||
|
||||
// Get linedef activations
|
||||
dic = cfg.ReadSetting("linedefactivations", new Hashtable());
|
||||
foreach(DictionaryEntry de in dic)
|
||||
{
|
||||
// Try paring the bit value
|
||||
if(int.TryParse(de.Key.ToString(),
|
||||
NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite,
|
||||
CultureInfo.InvariantCulture, out bitvalue))
|
||||
{
|
||||
// Add to the list
|
||||
linedefactivates.Add(new LinedefActivateInfo(bitvalue, de.Value.ToString()));
|
||||
}
|
||||
else
|
||||
{
|
||||
General.WriteLogLine("WARNING: Structure 'linedefactivations' contains invalid keys!");
|
||||
}
|
||||
}
|
||||
|
||||
// Sort the list
|
||||
linedefactivates.Sort();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
// This presents the item as string
|
||||
public override string ToString()
|
||||
{
|
||||
return index + ": " + prefix + " " + title;
|
||||
return index + " - " + title;
|
||||
}
|
||||
|
||||
// This compares against another action info
|
||||
|
|
89
Source/Config/LinedefActivateInfo.cs
Normal file
89
Source/Config/LinedefActivateInfo.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 CodeImp.DoomBuilder.IO;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Config
|
||||
{
|
||||
public class LinedefActivateInfo : INumberedTitle, IComparable<LinedefActivateInfo>
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
// Properties
|
||||
private int index;
|
||||
private string title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public int Index { get { return index; } }
|
||||
public string Title { get { return title; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
||||
// Constructor
|
||||
public LinedefActivateInfo(int index, string title)
|
||||
{
|
||||
// Initialize
|
||||
this.index = index;
|
||||
this.title = title;
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// This presents the item as string
|
||||
public override string ToString()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
// This compares against another activate info
|
||||
public int CompareTo(LinedefActivateInfo other)
|
||||
{
|
||||
if(this.index < other.index) return -1;
|
||||
else if(this.index > other.index) return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -52,7 +52,7 @@ namespace CodeImp.DoomBuilder.Data
|
|||
#region ================== Methods
|
||||
|
||||
// Dont do anything
|
||||
public override void LoadImage() { }
|
||||
public override void LoadImage() { bitmap = CodeImp.DoomBuilder.Properties.Resources.UnknownImage; }
|
||||
public override void CreatePixelData() { }
|
||||
public override void CreateTexture() { }
|
||||
|
||||
|
|
|
@ -452,8 +452,8 @@ namespace CodeImp.DoomBuilder.IO
|
|||
writer.Write((Int16)sd.OffsetX);
|
||||
writer.Write((Int16)sd.OffsetY);
|
||||
writer.Write(Lump.MakeFixedName(sd.HighTexture, WAD.ENCODING));
|
||||
writer.Write(Lump.MakeFixedName(sd.MiddleTexture, WAD.ENCODING));
|
||||
writer.Write(Lump.MakeFixedName(sd.LowTexture, WAD.ENCODING));
|
||||
writer.Write(Lump.MakeFixedName(sd.MiddleTexture, WAD.ENCODING));
|
||||
writer.Write((UInt16)sectorids[sd.Sector]);
|
||||
}
|
||||
|
||||
|
|
6
Source/Interface/FlatBrowserForm.Designer.cs
generated
6
Source/Interface/FlatBrowserForm.Designer.cs
generated
|
@ -28,7 +28,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.browser = new CodeImp.DoomBuilder.Interface.ImageBrowser();
|
||||
this.browser = new CodeImp.DoomBuilder.Interface.ImageBrowserControl();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.apply = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
|
@ -44,7 +44,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.browser.Name = "browser";
|
||||
this.browser.Size = new System.Drawing.Size(689, 457);
|
||||
this.browser.TabIndex = 0;
|
||||
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Interface.ImageBrowser.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
|
||||
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Interface.ImageBrowserControl.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
|
||||
//
|
||||
// cancel
|
||||
//
|
||||
|
@ -97,7 +97,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
|
||||
#endregion
|
||||
|
||||
private ImageBrowser browser;
|
||||
private ImageBrowserControl browser;
|
||||
private System.Windows.Forms.Button cancel;
|
||||
private System.Windows.Forms.Button apply;
|
||||
}
|
||||
|
|
68
Source/Interface/FlatSelectorControl.cs
Normal file
68
Source/Interface/FlatSelectorControl.cs
Normal file
|
@ -0,0 +1,68 @@
|
|||
|
||||
#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.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using SlimDX.Direct3D9;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Drawing.Drawing2D;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
public class FlatSelectorControl : ImageSelectorControl
|
||||
{
|
||||
// This finds the image we need for the given flat name
|
||||
protected override Image FindImage(string name)
|
||||
{
|
||||
// Check if name is a "none" texture
|
||||
if((name.Length < 1) || (name[0] == '-'))
|
||||
{
|
||||
// Flat required!
|
||||
return CodeImp.DoomBuilder.Properties.Resources.MissingTexture;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the image
|
||||
return General.Map.Data.GetFlatBitmap(name);
|
||||
}
|
||||
}
|
||||
|
||||
// This browses for a flat
|
||||
protected override string BrowseImage(string name)
|
||||
{
|
||||
string result;
|
||||
|
||||
// Browse for texture
|
||||
result = FlatBrowserForm.Browse(this.ParentForm, name);
|
||||
if(result != null) return result; else return name;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
partial class ImageBrowser
|
||||
partial class ImageBrowserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
|
@ -36,7 +36,7 @@ using System.Drawing.Drawing2D;
|
|||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
public partial class ImageBrowser : UserControl
|
||||
public partial class ImageBrowserControl : UserControl
|
||||
{
|
||||
#region ================== Delegates / Events
|
||||
|
||||
|
@ -66,7 +66,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
#region ================== Constructor / Disposer
|
||||
|
||||
// Constructor
|
||||
public ImageBrowser()
|
||||
public ImageBrowserControl()
|
||||
{
|
||||
// Initialize
|
||||
InitializeComponent();
|
73
Source/Interface/ImageSelectorControl.Designer.cs
generated
Normal file
73
Source/Interface/ImageSelectorControl.Designer.cs
generated
Normal file
|
@ -0,0 +1,73 @@
|
|||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
partial class ImageSelectorControl
|
||||
{
|
||||
/// <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 Component 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.preview = new System.Windows.Forms.Panel();
|
||||
this.name = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// preview
|
||||
//
|
||||
this.preview.BackColor = System.Drawing.SystemColors.AppWorkspace;
|
||||
this.preview.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.preview.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.preview.Location = new System.Drawing.Point(0, 0);
|
||||
this.preview.Name = "preview";
|
||||
this.preview.Size = new System.Drawing.Size(68, 60);
|
||||
this.preview.TabIndex = 1;
|
||||
this.preview.Click += new System.EventHandler(this.preview_Click);
|
||||
//
|
||||
// name
|
||||
//
|
||||
this.name.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.name.Location = new System.Drawing.Point(0, 64);
|
||||
this.name.Name = "name";
|
||||
this.name.Size = new System.Drawing.Size(68, 20);
|
||||
this.name.TabIndex = 2;
|
||||
this.name.TextChanged += new System.EventHandler(this.name_TextChanged);
|
||||
//
|
||||
// ImageSelectorControl
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.Controls.Add(this.name);
|
||||
this.Controls.Add(this.preview);
|
||||
this.Name = "ImageSelectorControl";
|
||||
this.Size = new System.Drawing.Size(115, 136);
|
||||
this.Resize += new System.EventHandler(this.ImageSelectorControl_Resize);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel preview;
|
||||
private System.Windows.Forms.TextBox name;
|
||||
}
|
||||
}
|
79
Source/Interface/ImageSelectorControl.cs
Normal file
79
Source/Interface/ImageSelectorControl.cs
Normal file
|
@ -0,0 +1,79 @@
|
|||
|
||||
#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.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using SlimDX.Direct3D9;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
public abstract partial class ImageSelectorControl : UserControl
|
||||
{
|
||||
// Events
|
||||
public event EventHandler ImageClicked;
|
||||
|
||||
// Properties
|
||||
public string TextureName { get { return name.Text; } set { name.Text = value; } }
|
||||
|
||||
// Constructor
|
||||
public ImageSelectorControl()
|
||||
{
|
||||
// Initialize
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
// When resized
|
||||
private void ImageSelectorControl_Resize(object sender, EventArgs e)
|
||||
{
|
||||
// Fixed size
|
||||
this.ClientSize = new Size(preview.Left + preview.Width, name.Top + name.Height);
|
||||
}
|
||||
|
||||
// Image clicked
|
||||
private void preview_Click(object sender, EventArgs e)
|
||||
{
|
||||
name.Text = BrowseImage(name.Text);
|
||||
}
|
||||
|
||||
// Name text changed
|
||||
private void name_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
General.DisplayZoomedImage(preview, FindImage(name.Text));
|
||||
}
|
||||
|
||||
// This must determine and return the image to show
|
||||
protected abstract Image FindImage(string name);
|
||||
|
||||
// This must show the image browser and return the selected texture name
|
||||
protected abstract string BrowseImage(string name);
|
||||
}
|
||||
}
|
129
Source/Interface/ImageSelectorControl.resx
Normal file
129
Source/Interface/ImageSelectorControl.resx
Normal file
|
@ -0,0 +1,129 @@
|
|||
<?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="preview.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="name.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>
|
411
Source/Interface/LinedefEditForm.Designer.cs
generated
411
Source/Interface/LinedefEditForm.Designer.cs
generated
|
@ -28,23 +28,159 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.Label label2;
|
||||
System.Windows.Forms.Label label1;
|
||||
System.Windows.Forms.Label label3;
|
||||
System.Windows.Forms.Label label4;
|
||||
System.Windows.Forms.Label label5;
|
||||
System.Windows.Forms.Label label6;
|
||||
System.Windows.Forms.Label label7;
|
||||
System.Windows.Forms.Label label8;
|
||||
System.Windows.Forms.Label label9;
|
||||
System.Windows.Forms.Label label10;
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.apply = new System.Windows.Forms.Button();
|
||||
this.actiongroup = new System.Windows.Forms.GroupBox();
|
||||
this.newtag = new System.Windows.Forms.Button();
|
||||
this.tag = new CodeImp.DoomBuilder.Interface.NumericTextbox();
|
||||
this.action = new CodeImp.DoomBuilder.Interface.ActionSelectorControl();
|
||||
this.browseaction = new System.Windows.Forms.Button();
|
||||
this.settingsgroup = new System.Windows.Forms.GroupBox();
|
||||
this.flags = new CodeImp.DoomBuilder.Interface.CheckboxArrayControl();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.tabs = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.backside = new System.Windows.Forms.CheckBox();
|
||||
this.backgroup = new System.Windows.Forms.GroupBox();
|
||||
this.backlow = new CodeImp.DoomBuilder.Interface.TextureSelectorControl();
|
||||
this.backmid = new CodeImp.DoomBuilder.Interface.TextureSelectorControl();
|
||||
this.backhigh = new CodeImp.DoomBuilder.Interface.TextureSelectorControl();
|
||||
this.backoffsety = new CodeImp.DoomBuilder.Interface.NumericTextbox();
|
||||
this.backoffsetx = new CodeImp.DoomBuilder.Interface.NumericTextbox();
|
||||
this.backsector = new System.Windows.Forms.Button();
|
||||
this.frontside = new System.Windows.Forms.CheckBox();
|
||||
this.frontgroup = new System.Windows.Forms.GroupBox();
|
||||
this.frontlow = new CodeImp.DoomBuilder.Interface.TextureSelectorControl();
|
||||
this.frontmid = new CodeImp.DoomBuilder.Interface.TextureSelectorControl();
|
||||
this.fronthigh = new CodeImp.DoomBuilder.Interface.TextureSelectorControl();
|
||||
this.frontoffsety = new CodeImp.DoomBuilder.Interface.NumericTextbox();
|
||||
this.frontoffsetx = new CodeImp.DoomBuilder.Interface.NumericTextbox();
|
||||
this.frontsector = new System.Windows.Forms.Button();
|
||||
label2 = new System.Windows.Forms.Label();
|
||||
label1 = new System.Windows.Forms.Label();
|
||||
label3 = new System.Windows.Forms.Label();
|
||||
label4 = new System.Windows.Forms.Label();
|
||||
label5 = new System.Windows.Forms.Label();
|
||||
label6 = new System.Windows.Forms.Label();
|
||||
label7 = new System.Windows.Forms.Label();
|
||||
label8 = new System.Windows.Forms.Label();
|
||||
label9 = new System.Windows.Forms.Label();
|
||||
label10 = new System.Windows.Forms.Label();
|
||||
this.actiongroup.SuspendLayout();
|
||||
this.settingsgroup.SuspendLayout();
|
||||
this.tabs.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.backgroup.SuspendLayout();
|
||||
this.frontgroup.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label2
|
||||
//
|
||||
label2.AutoSize = true;
|
||||
label2.Location = new System.Drawing.Point(15, 30);
|
||||
label2.Name = "label2";
|
||||
label2.Size = new System.Drawing.Size(41, 14);
|
||||
label2.TabIndex = 9;
|
||||
label2.Text = "Action:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
label1.Location = new System.Drawing.Point(28, 78);
|
||||
label1.Name = "label1";
|
||||
label1.Size = new System.Drawing.Size(28, 14);
|
||||
label1.TabIndex = 6;
|
||||
label1.Text = "Tag:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
label3.Location = new System.Drawing.Point(252, 18);
|
||||
label3.Name = "label3";
|
||||
label3.Size = new System.Drawing.Size(68, 16);
|
||||
label3.TabIndex = 3;
|
||||
label3.Text = "Upper";
|
||||
label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
label4.Location = new System.Drawing.Point(334, 18);
|
||||
label4.Name = "label4";
|
||||
label4.Size = new System.Drawing.Size(68, 16);
|
||||
label4.TabIndex = 4;
|
||||
label4.Text = "Middle";
|
||||
label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
label5.Location = new System.Drawing.Point(416, 18);
|
||||
label5.Name = "label5";
|
||||
label5.Size = new System.Drawing.Size(68, 16);
|
||||
label5.TabIndex = 5;
|
||||
label5.Text = "Lower";
|
||||
label5.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
label6.AutoSize = true;
|
||||
label6.Location = new System.Drawing.Point(16, 104);
|
||||
label6.Name = "label6";
|
||||
label6.Size = new System.Drawing.Size(81, 14);
|
||||
label6.TabIndex = 7;
|
||||
label6.Text = "Texture Offset:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
label7.AutoSize = true;
|
||||
label7.Location = new System.Drawing.Point(16, 104);
|
||||
label7.Name = "label7";
|
||||
label7.Size = new System.Drawing.Size(81, 14);
|
||||
label7.TabIndex = 7;
|
||||
label7.Text = "Texture Offset:";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
label8.Location = new System.Drawing.Point(416, 18);
|
||||
label8.Name = "label8";
|
||||
label8.Size = new System.Drawing.Size(68, 16);
|
||||
label8.TabIndex = 5;
|
||||
label8.Text = "Lower";
|
||||
label8.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
label9.Location = new System.Drawing.Point(334, 18);
|
||||
label9.Name = "label9";
|
||||
label9.Size = new System.Drawing.Size(68, 16);
|
||||
label9.TabIndex = 4;
|
||||
label9.Text = "Middle";
|
||||
label9.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
label10.Location = new System.Drawing.Point(252, 18);
|
||||
label10.Name = "label10";
|
||||
label10.Size = new System.Drawing.Size(68, 16);
|
||||
label10.TabIndex = 3;
|
||||
label10.Text = "Upper";
|
||||
label10.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// cancel
|
||||
//
|
||||
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancel.Location = new System.Drawing.Point(399, 387);
|
||||
this.cancel.Location = new System.Drawing.Point(421, 359);
|
||||
this.cancel.Name = "cancel";
|
||||
this.cancel.Size = new System.Drawing.Size(112, 25);
|
||||
this.cancel.TabIndex = 17;
|
||||
|
@ -54,7 +190,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// apply
|
||||
//
|
||||
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.apply.Location = new System.Drawing.Point(281, 387);
|
||||
this.apply.Location = new System.Drawing.Point(302, 359);
|
||||
this.apply.Name = "apply";
|
||||
this.apply.Size = new System.Drawing.Size(112, 25);
|
||||
this.apply.TabIndex = 16;
|
||||
|
@ -63,25 +199,45 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
//
|
||||
// actiongroup
|
||||
//
|
||||
this.actiongroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.actiongroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.actiongroup.Controls.Add(label2);
|
||||
this.actiongroup.Controls.Add(this.newtag);
|
||||
this.actiongroup.Controls.Add(this.tag);
|
||||
this.actiongroup.Controls.Add(label1);
|
||||
this.actiongroup.Controls.Add(this.action);
|
||||
this.actiongroup.Controls.Add(this.browseaction);
|
||||
this.actiongroup.Location = new System.Drawing.Point(12, 177);
|
||||
this.actiongroup.Location = new System.Drawing.Point(8, 169);
|
||||
this.actiongroup.Name = "actiongroup";
|
||||
this.actiongroup.Size = new System.Drawing.Size(499, 196);
|
||||
this.actiongroup.Size = new System.Drawing.Size(499, 128);
|
||||
this.actiongroup.TabIndex = 18;
|
||||
this.actiongroup.TabStop = false;
|
||||
this.actiongroup.Text = " Action ";
|
||||
//
|
||||
// newtag
|
||||
//
|
||||
this.newtag.Location = new System.Drawing.Point(136, 74);
|
||||
this.newtag.Name = "newtag";
|
||||
this.newtag.Size = new System.Drawing.Size(76, 23);
|
||||
this.newtag.TabIndex = 8;
|
||||
this.newtag.Text = "New Tag";
|
||||
this.newtag.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tag
|
||||
//
|
||||
this.tag.Location = new System.Drawing.Point(62, 75);
|
||||
this.tag.Name = "tag";
|
||||
this.tag.Size = new System.Drawing.Size(68, 20);
|
||||
this.tag.TabIndex = 7;
|
||||
//
|
||||
// action
|
||||
//
|
||||
this.action.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.action.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.action.Empty = false;
|
||||
this.action.Location = new System.Drawing.Point(18, 27);
|
||||
this.action.Location = new System.Drawing.Point(62, 27);
|
||||
this.action.Name = "action";
|
||||
this.action.Size = new System.Drawing.Size(430, 21);
|
||||
this.action.Size = new System.Drawing.Size(386, 21);
|
||||
this.action.TabIndex = 5;
|
||||
this.action.Value = 402;
|
||||
//
|
||||
|
@ -102,7 +258,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.settingsgroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.settingsgroup.Controls.Add(this.flags);
|
||||
this.settingsgroup.Location = new System.Drawing.Point(12, 12);
|
||||
this.settingsgroup.Location = new System.Drawing.Point(8, 8);
|
||||
this.settingsgroup.Name = "settingsgroup";
|
||||
this.settingsgroup.Size = new System.Drawing.Size(499, 152);
|
||||
this.settingsgroup.TabIndex = 19;
|
||||
|
@ -127,12 +283,215 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.checkBox1.Text = "checkBox1";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabs
|
||||
//
|
||||
this.tabs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tabs.Controls.Add(this.tabPage1);
|
||||
this.tabs.Controls.Add(this.tabPage2);
|
||||
this.tabs.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabs.Location = new System.Drawing.Point(10, 10);
|
||||
this.tabs.Margin = new System.Windows.Forms.Padding(1);
|
||||
this.tabs.Name = "tabs";
|
||||
this.tabs.SelectedIndex = 0;
|
||||
this.tabs.Size = new System.Drawing.Size(523, 332);
|
||||
this.tabs.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
|
||||
this.tabs.TabIndex = 20;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.settingsgroup);
|
||||
this.tabPage1.Controls.Add(this.actiongroup);
|
||||
this.tabPage1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tabPage1.Size = new System.Drawing.Size(515, 305);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Properties";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.backside);
|
||||
this.tabPage2.Controls.Add(this.backgroup);
|
||||
this.tabPage2.Controls.Add(this.frontside);
|
||||
this.tabPage2.Controls.Add(this.frontgroup);
|
||||
this.tabPage2.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 23);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.tabPage2.Size = new System.Drawing.Size(515, 305);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Sidedefs";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// backside
|
||||
//
|
||||
this.backside.AutoSize = true;
|
||||
this.backside.Location = new System.Drawing.Point(20, 155);
|
||||
this.backside.Name = "backside";
|
||||
this.backside.Size = new System.Drawing.Size(74, 18);
|
||||
this.backside.TabIndex = 2;
|
||||
this.backside.Text = "Back Side";
|
||||
this.backside.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// backgroup
|
||||
//
|
||||
this.backgroup.Controls.Add(this.backlow);
|
||||
this.backgroup.Controls.Add(this.backmid);
|
||||
this.backgroup.Controls.Add(this.backhigh);
|
||||
this.backgroup.Controls.Add(this.backoffsety);
|
||||
this.backgroup.Controls.Add(this.backoffsetx);
|
||||
this.backgroup.Controls.Add(label7);
|
||||
this.backgroup.Controls.Add(this.backsector);
|
||||
this.backgroup.Controls.Add(label8);
|
||||
this.backgroup.Controls.Add(label9);
|
||||
this.backgroup.Controls.Add(label10);
|
||||
this.backgroup.Location = new System.Drawing.Point(8, 157);
|
||||
this.backgroup.Name = "backgroup";
|
||||
this.backgroup.Size = new System.Drawing.Size(499, 140);
|
||||
this.backgroup.TabIndex = 1;
|
||||
this.backgroup.TabStop = false;
|
||||
this.backgroup.Text = " ";
|
||||
//
|
||||
// backlow
|
||||
//
|
||||
this.backlow.Location = new System.Drawing.Point(416, 37);
|
||||
this.backlow.Name = "backlow";
|
||||
this.backlow.Required = false;
|
||||
this.backlow.Size = new System.Drawing.Size(68, 84);
|
||||
this.backlow.TabIndex = 15;
|
||||
this.backlow.TextureName = "";
|
||||
//
|
||||
// backmid
|
||||
//
|
||||
this.backmid.Location = new System.Drawing.Point(334, 37);
|
||||
this.backmid.Name = "backmid";
|
||||
this.backmid.Required = false;
|
||||
this.backmid.Size = new System.Drawing.Size(68, 84);
|
||||
this.backmid.TabIndex = 14;
|
||||
this.backmid.TextureName = "";
|
||||
//
|
||||
// backhigh
|
||||
//
|
||||
this.backhigh.Location = new System.Drawing.Point(252, 37);
|
||||
this.backhigh.Name = "backhigh";
|
||||
this.backhigh.Required = false;
|
||||
this.backhigh.Size = new System.Drawing.Size(68, 84);
|
||||
this.backhigh.TabIndex = 13;
|
||||
this.backhigh.TextureName = "";
|
||||
//
|
||||
// backoffsety
|
||||
//
|
||||
this.backoffsety.Location = new System.Drawing.Point(154, 101);
|
||||
this.backoffsety.Name = "backoffsety";
|
||||
this.backoffsety.Size = new System.Drawing.Size(45, 20);
|
||||
this.backoffsety.TabIndex = 9;
|
||||
//
|
||||
// backoffsetx
|
||||
//
|
||||
this.backoffsetx.Location = new System.Drawing.Point(103, 101);
|
||||
this.backoffsetx.Name = "backoffsetx";
|
||||
this.backoffsetx.Size = new System.Drawing.Size(45, 20);
|
||||
this.backoffsetx.TabIndex = 8;
|
||||
//
|
||||
// backsector
|
||||
//
|
||||
this.backsector.Location = new System.Drawing.Point(103, 37);
|
||||
this.backsector.Name = "backsector";
|
||||
this.backsector.Size = new System.Drawing.Size(96, 24);
|
||||
this.backsector.TabIndex = 6;
|
||||
this.backsector.Text = "Select Sector";
|
||||
this.backsector.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// frontside
|
||||
//
|
||||
this.frontside.AutoSize = true;
|
||||
this.frontside.Location = new System.Drawing.Point(20, 6);
|
||||
this.frontside.Name = "frontside";
|
||||
this.frontside.Size = new System.Drawing.Size(75, 18);
|
||||
this.frontside.TabIndex = 0;
|
||||
this.frontside.Text = "Front Side";
|
||||
this.frontside.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// frontgroup
|
||||
//
|
||||
this.frontgroup.Controls.Add(this.frontlow);
|
||||
this.frontgroup.Controls.Add(this.frontmid);
|
||||
this.frontgroup.Controls.Add(this.fronthigh);
|
||||
this.frontgroup.Controls.Add(this.frontoffsety);
|
||||
this.frontgroup.Controls.Add(this.frontoffsetx);
|
||||
this.frontgroup.Controls.Add(label6);
|
||||
this.frontgroup.Controls.Add(this.frontsector);
|
||||
this.frontgroup.Controls.Add(label5);
|
||||
this.frontgroup.Controls.Add(label4);
|
||||
this.frontgroup.Controls.Add(label3);
|
||||
this.frontgroup.Location = new System.Drawing.Point(8, 8);
|
||||
this.frontgroup.Name = "frontgroup";
|
||||
this.frontgroup.Size = new System.Drawing.Size(499, 140);
|
||||
this.frontgroup.TabIndex = 0;
|
||||
this.frontgroup.TabStop = false;
|
||||
this.frontgroup.Text = " ";
|
||||
//
|
||||
// frontlow
|
||||
//
|
||||
this.frontlow.Location = new System.Drawing.Point(416, 37);
|
||||
this.frontlow.Name = "frontlow";
|
||||
this.frontlow.Required = false;
|
||||
this.frontlow.Size = new System.Drawing.Size(68, 84);
|
||||
this.frontlow.TabIndex = 12;
|
||||
this.frontlow.TextureName = "";
|
||||
//
|
||||
// frontmid
|
||||
//
|
||||
this.frontmid.Location = new System.Drawing.Point(334, 37);
|
||||
this.frontmid.Name = "frontmid";
|
||||
this.frontmid.Required = false;
|
||||
this.frontmid.Size = new System.Drawing.Size(68, 84);
|
||||
this.frontmid.TabIndex = 11;
|
||||
this.frontmid.TextureName = "";
|
||||
//
|
||||
// fronthigh
|
||||
//
|
||||
this.fronthigh.Location = new System.Drawing.Point(252, 37);
|
||||
this.fronthigh.Name = "fronthigh";
|
||||
this.fronthigh.Required = false;
|
||||
this.fronthigh.Size = new System.Drawing.Size(68, 84);
|
||||
this.fronthigh.TabIndex = 10;
|
||||
this.fronthigh.TextureName = "";
|
||||
//
|
||||
// frontoffsety
|
||||
//
|
||||
this.frontoffsety.Location = new System.Drawing.Point(154, 101);
|
||||
this.frontoffsety.Name = "frontoffsety";
|
||||
this.frontoffsety.Size = new System.Drawing.Size(45, 20);
|
||||
this.frontoffsety.TabIndex = 9;
|
||||
//
|
||||
// frontoffsetx
|
||||
//
|
||||
this.frontoffsetx.Location = new System.Drawing.Point(103, 101);
|
||||
this.frontoffsetx.Name = "frontoffsetx";
|
||||
this.frontoffsetx.Size = new System.Drawing.Size(45, 20);
|
||||
this.frontoffsetx.TabIndex = 8;
|
||||
//
|
||||
// frontsector
|
||||
//
|
||||
this.frontsector.Location = new System.Drawing.Point(103, 37);
|
||||
this.frontsector.Name = "frontsector";
|
||||
this.frontsector.Size = new System.Drawing.Size(96, 24);
|
||||
this.frontsector.TabIndex = 6;
|
||||
this.frontsector.Text = "Select Sector";
|
||||
this.frontsector.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// LinedefEditForm
|
||||
//
|
||||
this.AcceptButton = this.apply;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(523, 422);
|
||||
this.Controls.Add(this.settingsgroup);
|
||||
this.Controls.Add(this.actiongroup);
|
||||
this.CancelButton = this.cancel;
|
||||
this.ClientSize = new System.Drawing.Size(543, 394);
|
||||
this.Controls.Add(this.tabs);
|
||||
this.Controls.Add(this.cancel);
|
||||
this.Controls.Add(this.apply);
|
||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
|
@ -145,7 +504,16 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Edit Linedefs";
|
||||
this.actiongroup.ResumeLayout(false);
|
||||
this.actiongroup.PerformLayout();
|
||||
this.settingsgroup.ResumeLayout(false);
|
||||
this.tabs.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabPage2.PerformLayout();
|
||||
this.backgroup.ResumeLayout(false);
|
||||
this.backgroup.PerformLayout();
|
||||
this.frontgroup.ResumeLayout(false);
|
||||
this.frontgroup.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
@ -160,5 +528,26 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.Button browseaction;
|
||||
private ActionSelectorControl action;
|
||||
private NumericTextbox tag;
|
||||
private System.Windows.Forms.Button newtag;
|
||||
private System.Windows.Forms.TabControl tabs;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.GroupBox frontgroup;
|
||||
private System.Windows.Forms.CheckBox frontside;
|
||||
private System.Windows.Forms.Button frontsector;
|
||||
private NumericTextbox frontoffsety;
|
||||
private NumericTextbox frontoffsetx;
|
||||
private System.Windows.Forms.CheckBox backside;
|
||||
private System.Windows.Forms.GroupBox backgroup;
|
||||
private NumericTextbox backoffsety;
|
||||
private NumericTextbox backoffsetx;
|
||||
private System.Windows.Forms.Button backsector;
|
||||
private TextureSelectorControl frontlow;
|
||||
private TextureSelectorControl frontmid;
|
||||
private TextureSelectorControl fronthigh;
|
||||
private TextureSelectorControl backlow;
|
||||
private TextureSelectorControl backmid;
|
||||
private TextureSelectorControl backhigh;
|
||||
}
|
||||
}
|
|
@ -117,4 +117,154 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label2.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label3.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label3.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label4.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label4.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="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="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="label8.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label8.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label9.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label9.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<metadata name="label10.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="label10.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="actiongroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="newtag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tag.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="action.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="browseaction.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="settingsgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="flags.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="checkBox1.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="tabPage1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="tabPage2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="backside.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="backgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="backlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="backmid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="backhigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="backoffsety.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="backoffsetx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="backsector.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="frontside.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="frontgroup.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="frontlow.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="frontmid.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="fronthigh.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="frontoffsety.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="frontoffsetx.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="frontsector.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>
|
|
@ -43,10 +43,18 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// This shows the info
|
||||
public void ShowInfo(Linedef l)
|
||||
{
|
||||
// TODO: Get line action information
|
||||
string actioninfo = "";
|
||||
|
||||
// Get line action information
|
||||
if(General.Map.Config.LinedefActions.ContainsKey(l.Action))
|
||||
actioninfo = General.Map.Config.LinedefActions[l.Action].ToString();
|
||||
else if(l.Action == 0)
|
||||
actioninfo = l.Action.ToString() + " - None";
|
||||
else
|
||||
actioninfo = l.Action.ToString() + " - Unknown";
|
||||
|
||||
// Linedef info
|
||||
action.Text = l.Action.ToString();
|
||||
action.Text = actioninfo;
|
||||
length.Text = l.Length.ToString("0.##");
|
||||
angle.Text = l.AngleDeg.ToString() + "\u00B0";
|
||||
tag.Text = l.Tag.ToString();
|
||||
|
@ -59,9 +67,9 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
fronthighname.Text = l.Front.HighTexture;
|
||||
frontmidname.Text = l.Front.MiddleTexture;
|
||||
frontlowname.Text = l.Front.LowTexture;
|
||||
General.DisplayZoomedImage(fronthightex, General.Map.Data.GetTextureBitmap(l.Front.HighTexture));
|
||||
General.DisplayZoomedImage(frontmidtex, General.Map.Data.GetTextureBitmap(l.Front.MiddleTexture));
|
||||
General.DisplayZoomedImage(frontlowtex, General.Map.Data.GetTextureBitmap(l.Front.LowTexture));
|
||||
DisplaySidedefTexture(fronthightex, l.Front.HighTexture, l.Front.HighRequired());
|
||||
DisplaySidedefTexture(frontmidtex, l.Front.MiddleTexture, l.Front.MiddleRequired());
|
||||
DisplaySidedefTexture(frontlowtex, l.Front.LowTexture, l.Front.LowRequired());
|
||||
frontoffsetlabel.Enabled = true;
|
||||
frontoffset.Enabled = true;
|
||||
frontpanel.Enabled = true;
|
||||
|
@ -89,9 +97,9 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
backhighname.Text = l.Back.HighTexture;
|
||||
backmidname.Text = l.Back.MiddleTexture;
|
||||
backlowname.Text = l.Back.LowTexture;
|
||||
General.DisplayZoomedImage(backhightex, General.Map.Data.GetTextureBitmap(l.Back.HighTexture));
|
||||
General.DisplayZoomedImage(backmidtex, General.Map.Data.GetTextureBitmap(l.Back.MiddleTexture));
|
||||
General.DisplayZoomedImage(backlowtex, General.Map.Data.GetTextureBitmap(l.Back.LowTexture));
|
||||
DisplaySidedefTexture(backhightex, l.Back.HighTexture, l.Back.HighRequired());
|
||||
DisplaySidedefTexture(backmidtex, l.Back.MiddleTexture, l.Back.MiddleRequired());
|
||||
DisplaySidedefTexture(backlowtex, l.Back.LowTexture, l.Back.LowRequired());
|
||||
backoffsetlabel.Enabled = true;
|
||||
backoffset.Enabled = true;
|
||||
backpanel.Enabled = true;
|
||||
|
@ -133,5 +141,41 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
// Call base
|
||||
base.OnVisibleChanged(e);
|
||||
}
|
||||
|
||||
// This shows a sidedef texture in a panel
|
||||
private void DisplaySidedefTexture(Panel panel, string name, bool required)
|
||||
{
|
||||
// Check if name is a "none" texture
|
||||
if((name.Length < 1) || (name[0] == '-'))
|
||||
{
|
||||
// Determine image to show
|
||||
if(required)
|
||||
panel.BackgroundImage = CodeImp.DoomBuilder.Properties.Resources.MissingTexture;
|
||||
else
|
||||
panel.BackgroundImage = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the image
|
||||
panel.BackgroundImage = General.Map.Data.GetTextureBitmap(name);
|
||||
}
|
||||
|
||||
// Image not null?
|
||||
if(panel.BackgroundImage != null)
|
||||
{
|
||||
// Small enough to fit in panel?
|
||||
if((panel.BackgroundImage.Size.Width < panel.ClientRectangle.Width) &&
|
||||
(panel.BackgroundImage.Size.Height < panel.ClientRectangle.Height))
|
||||
{
|
||||
// Display centered
|
||||
panel.BackgroundImageLayout = ImageLayout.Center;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Display zoomed
|
||||
panel.BackgroundImageLayout = ImageLayout.Zoom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
71
Source/Interface/NumericTextbox.cs
Normal file
71
Source/Interface/NumericTextbox.cs
Normal file
|
@ -0,0 +1,71 @@
|
|||
|
||||
#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.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using System.Windows.Forms;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.Geometry;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using CodeImp.DoomBuilder.Editing;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
internal class NumericTextbox : TextBox
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// When a key is pressed
|
||||
protected override void OnKeyPress(KeyPressEventArgs e)
|
||||
{
|
||||
// Not numeric or control key?
|
||||
if("-+0123456789\b".IndexOf(e.KeyChar) == -1)
|
||||
{
|
||||
// Cancel this
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
// Call base
|
||||
base.OnKeyPress(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
6
Source/Interface/TextureBrowserForm.Designer.cs
generated
6
Source/Interface/TextureBrowserForm.Designer.cs
generated
|
@ -28,7 +28,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.browser = new CodeImp.DoomBuilder.Interface.ImageBrowser();
|
||||
this.browser = new CodeImp.DoomBuilder.Interface.ImageBrowserControl();
|
||||
this.cancel = new System.Windows.Forms.Button();
|
||||
this.apply = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
|
@ -44,7 +44,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
this.browser.Name = "browser";
|
||||
this.browser.Size = new System.Drawing.Size(689, 457);
|
||||
this.browser.TabIndex = 0;
|
||||
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Interface.ImageBrowser.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
|
||||
this.browser.SelectedItemChanged += new CodeImp.DoomBuilder.Interface.ImageBrowserControl.SelectedItemChangedDelegate(this.browser_SelectedItemChanged);
|
||||
//
|
||||
// cancel
|
||||
//
|
||||
|
@ -97,7 +97,7 @@ namespace CodeImp.DoomBuilder.Interface
|
|||
|
||||
#endregion
|
||||
|
||||
private ImageBrowser browser;
|
||||
private ImageBrowserControl browser;
|
||||
private System.Windows.Forms.Button cancel;
|
||||
private System.Windows.Forms.Button apply;
|
||||
}
|
||||
|
|
77
Source/Interface/TextureSelectorControl.cs
Normal file
77
Source/Interface/TextureSelectorControl.cs
Normal file
|
@ -0,0 +1,77 @@
|
|||
|
||||
#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.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Win32;
|
||||
using System.Diagnostics;
|
||||
using CodeImp.DoomBuilder.Controls;
|
||||
using CodeImp.DoomBuilder.Data;
|
||||
using CodeImp.DoomBuilder.Config;
|
||||
using CodeImp.DoomBuilder.Rendering;
|
||||
using SlimDX.Direct3D9;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Drawing.Drawing2D;
|
||||
using CodeImp.DoomBuilder.Map;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Interface
|
||||
{
|
||||
public class TextureSelectorControl : ImageSelectorControl
|
||||
{
|
||||
// Variables
|
||||
private bool required;
|
||||
|
||||
// Properties
|
||||
public bool Required { get { return required; } set { required = value; } }
|
||||
|
||||
// This finds the image we need for the given texture name
|
||||
protected override Image FindImage(string name)
|
||||
{
|
||||
// Check if name is a "none" texture
|
||||
if((name.Length < 1) || (name[0] == '-'))
|
||||
{
|
||||
// Determine image to show
|
||||
if(required)
|
||||
return CodeImp.DoomBuilder.Properties.Resources.MissingTexture;
|
||||
else
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the image
|
||||
return General.Map.Data.GetTextureBitmap(name);
|
||||
}
|
||||
}
|
||||
|
||||
// This browses for a texture
|
||||
protected override string BrowseImage(string name)
|
||||
{
|
||||
string result;
|
||||
|
||||
// Browse for texture
|
||||
result = TextureBrowserForm.Browse(this.ParentForm, name);
|
||||
if(result != null) return result; else return name;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -201,6 +201,47 @@ namespace CodeImp.DoomBuilder.Map
|
|||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// This checks if a texture is required
|
||||
public bool HighRequired()
|
||||
{
|
||||
// Doublesided?
|
||||
if(Other != null)
|
||||
{
|
||||
// Texture is required when ceiling of other side is lower
|
||||
return (Other.sector.CeilHeight < this.sector.CeilHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// This checks if a texture is required
|
||||
public bool MiddleRequired()
|
||||
{
|
||||
// Texture is required when the line is singlesided
|
||||
return (Other == null);
|
||||
}
|
||||
|
||||
// This checks if a texture is required
|
||||
public bool LowRequired()
|
||||
{
|
||||
// Doublesided?
|
||||
if(Other != null)
|
||||
{
|
||||
// Texture is required when floor of other side is higher
|
||||
return (Other.sector.FloorHeight > this.sector.FloorHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Changes
|
||||
|
||||
// This updates all properties
|
||||
|
|
36
Source/Map/SidedefPart.cs
Normal file
36
Source/Map/SidedefPart.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace CodeImp.DoomBuilder.Map
|
||||
{
|
||||
public enum SidedefPart
|
||||
{
|
||||
None = 0,
|
||||
Upper = 1,
|
||||
Middle = 2,
|
||||
Lower = 3
|
||||
}
|
||||
}
|
7
Source/Properties/Resources.Designer.cs
generated
7
Source/Properties/Resources.Designer.cs
generated
|
@ -130,6 +130,13 @@ namespace CodeImp.DoomBuilder.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap MissingTexture {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MissingTexture", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap NewMap {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("NewMap", resourceCulture);
|
||||
|
|
|
@ -160,9 +160,6 @@
|
|||
<data name="SectorsMode" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\SectorsMode.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="UnknownImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UnknownImage.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Grid2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Grid2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
|
@ -199,4 +196,10 @@
|
|||
<data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MissingTexture" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MissingTexture.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="UnknownImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\UnknownImage.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Source/Resources/MissingTexture.png
Normal file
BIN
Source/Resources/MissingTexture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 586 B |
Loading…
Reference in a new issue