Exposed more DECORATE information to plugins and Things now have an Actor property (ActorStructure) when they are loaded from DECORATE

Added two new type handlers that can be used in UDMF ('Thing Type' and 'Thing Class')
Polished the browse icons and browse buttons.
Added more events for plugins to intercept.
This commit is contained in:
codeimp 2010-08-22 11:36:09 +00:00
parent 97b96df5dc
commit 6a685b7678
46 changed files with 711 additions and 457 deletions

View file

@ -153,28 +153,7 @@ textures
/*
ADDITIONAL UNIVERSAL DOOM MAP FORMAT FIELD DEFINITIONS
Only add fields here that Doom Builder does not edit with its own user-interface!
The "default" field must match the UDMF specifications!
Field data types:
0 = integer *
1 = float
2 = string
3 = bool
4 = linedeftype (integer) *
5 = sectoreffect (integer) *
6 = texture (string)
7 = flat (string)
8 = angle in degrees (integer)
9 = angle in radians (float)
10 = XXRRGGBB color (integer)
11 = enum option (integer) *
12 = enum bits (integer) *
13 = sector tag (integer) *
14 = thing tag (integer) *
15 = linedef tag (integer) *
16 = enum option (string)
17 = angle in degrees (float)
See Documents\fielddatatypes.txt for informtion on the types.
*/
universalfields
{

View file

@ -21,6 +21,8 @@ all supported data types:
15 = linedef tag (integer) *
16 = enum option (string)
17 = angle in degrees (float)
18 = thing type (integer)
19 = thing class (string)
- Only types indicates with * are usable for standard hexen args
- When no type is specified, the default type is 0 (integer)

BIN
Resources/Icons/Angle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 1 KiB

BIN
Resources/Icons/List.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

BIN
Resources/Icons/Text.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

View file

@ -243,7 +243,9 @@ namespace CodeImp.DoomBuilder.Actions
internal void Begin()
{
List<ActionDelegate> delegateslist;
General.Plugins.OnActionBegin(this);
// Method bound?
if(begindelegates.Count > 0)
{
@ -277,6 +279,8 @@ namespace CodeImp.DoomBuilder.Actions
General.Actions.ResetExclusiveRequest();
General.Actions.Current = null;
}
General.Plugins.OnActionEnd(this);
}
// This checks if the action qualifies for a key combination

View file

@ -704,6 +704,8 @@
<Compile Include="Rendering\SurfaceBufferSet.cs" />
<Compile Include="Rendering\SurfaceEntry.cs" />
<Compile Include="Rendering\SurfaceManager.cs" />
<Compile Include="Types\ThingClassHandler.cs" />
<Compile Include="Types\ThingTypeHandler.cs" />
<Compile Include="Windows\ErrorsForm.cs">
<SubType>Form</SubType>
</Compile>
@ -762,7 +764,11 @@
<Compile Include="General\StepsList.cs" />
<None Include="Resources\Builder16.png" />
<None Include="Resources\CLogo.png" />
<None Include="Resources\Angle.png" />
<Content Include="Resources\DB2.ico" />
<None Include="Resources\Text.png" />
<None Include="Resources\List_Images.png" />
<None Include="Resources\List.png" />
<None Include="Resources\PasteSpecial.png" />
<None Include="Resources\ScriptHelp.png" />
<None Include="Resources\ErrorLarge.png" />

View file

@ -53,6 +53,7 @@ namespace CodeImp.DoomBuilder.Config
private int index;
private string title;
private string sprite;
private ActorStructure actor;
private long spritelongname;
private int color;
private bool arrow;
@ -75,6 +76,7 @@ namespace CodeImp.DoomBuilder.Config
public int Index { get { return index; } }
public string Title { get { return title; } }
public string Sprite { get { return sprite; } }
public ActorStructure Actor { get { return actor; } }
public long SpriteLongName { get { return spritelongname; } }
public int Color { get { return color; } }
public bool Arrow { get { return arrow; } }
@ -101,6 +103,7 @@ namespace CodeImp.DoomBuilder.Config
// Initialize
this.index = index;
this.category = null;
this.actor = null;
this.title = "<" + index.ToString(CultureInfo.InvariantCulture) + ">";
this.sprite = DataManager.INTERNAL_PREFIX + "unknownthing";
this.color = 0;
@ -131,6 +134,7 @@ namespace CodeImp.DoomBuilder.Config
this.category = cat;
this.args = new ArgumentInfo[Linedef.NUM_ARGS];
this.isknown = true;
this.actor = null;
// Read properties
this.title = cfg.ReadSetting("thingtypes." + cat.Name + "." + key + ".title", "<" + key + ">");
@ -173,6 +177,7 @@ namespace CodeImp.DoomBuilder.Config
this.index = index;
this.category = cat;
this.title = title;
this.actor = null;
this.isknown = true;
this.args = new ArgumentInfo[Linedef.NUM_ARGS];
for(int i = 0; i < Linedef.NUM_ARGS; i++) this.args[i] = new ArgumentInfo(i);
@ -210,6 +215,7 @@ namespace CodeImp.DoomBuilder.Config
this.index = actor.DoomEdNum;
this.category = cat;
this.title = "";
this.actor = actor;
this.isknown = true;
this.args = new ArgumentInfo[Linedef.NUM_ARGS];
for(int i = 0; i < Linedef.NUM_ARGS; i++) this.args[i] = new ArgumentInfo(i);
@ -244,6 +250,9 @@ namespace CodeImp.DoomBuilder.Config
// This updates the properties from a decorate actor
internal void ModifyByDecorateActor(ActorStructure actor)
{
// Keep reference to actor
this.actor = actor;
// Set the title
if(actor.HasPropertyWithValue("$title"))
title = actor.GetPropertyAllValues("$title");

View file

@ -47,11 +47,10 @@ namespace CodeImp.DoomBuilder.Controls
//
this.button.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button.Image = global::CodeImp.DoomBuilder.Properties.Resources.treeview;
this.button.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
this.button.Location = new System.Drawing.Point(153, 0);
this.button.Name = "button";
this.button.Padding = new System.Windows.Forms.Padding(0, 0, 1, 2);
this.button.Size = new System.Drawing.Size(30, 24);
this.button.Size = new System.Drawing.Size(28, 24);
this.button.TabIndex = 1;
this.button.UseVisualStyleBackColor = true;
this.button.Visible = false;

View file

@ -197,6 +197,7 @@ namespace CodeImp.DoomBuilder.Controls
{
// Show the button
button.Visible = true;
button.Image = typehandler.BrowseImage;
scrollbuttons.Visible = false;
combobox.DropDownStyle = ComboBoxStyle.Simple;
}

View file

@ -29,10 +29,10 @@ namespace CodeImp.DoomBuilder.Controls
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
this.fieldslist = new System.Windows.Forms.DataGridView();
this.fieldname = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.fieldtype = new System.Windows.Forms.DataGridViewComboBoxColumn();
@ -57,14 +57,14 @@ namespace CodeImp.DoomBuilder.Controls
this.fieldname,
this.fieldtype,
this.fieldvalue});
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle4.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.fieldslist.DefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle24.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle24.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle24.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle24.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle24.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.fieldslist.DefaultCellStyle = dataGridViewCellStyle24;
this.fieldslist.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.fieldslist.Location = new System.Drawing.Point(0, 0);
this.fieldslist.MultiSelect = false;
@ -91,12 +91,12 @@ namespace CodeImp.DoomBuilder.Controls
//
// fieldname
//
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.NullValue = null;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.fieldname.DefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle21.NullValue = null;
dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.fieldname.DefaultCellStyle = dataGridViewCellStyle21;
this.fieldname.Frozen = true;
this.fieldname.HeaderText = "Property";
this.fieldname.Name = "fieldname";
@ -105,11 +105,11 @@ namespace CodeImp.DoomBuilder.Controls
// fieldtype
//
this.fieldtype.AutoComplete = false;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.fieldtype.DefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.fieldtype.DefaultCellStyle = dataGridViewCellStyle22;
this.fieldtype.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.Nothing;
this.fieldtype.HeaderText = "Type";
this.fieldtype.Name = "fieldtype";
@ -119,11 +119,11 @@ namespace CodeImp.DoomBuilder.Controls
//
// fieldvalue
//
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.fieldvalue.DefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.fieldvalue.DefaultCellStyle = dataGridViewCellStyle23;
this.fieldvalue.HeaderText = "Value";
this.fieldvalue.Name = "fieldvalue";
this.fieldvalue.Resizable = System.Windows.Forms.DataGridViewTriState.True;
@ -136,13 +136,14 @@ namespace CodeImp.DoomBuilder.Controls
//
// browsebutton
//
this.browsebutton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.browsebutton.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browsebutton.Image = global::CodeImp.DoomBuilder.Properties.Resources.treeview;
this.browsebutton.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
this.browsebutton.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
this.browsebutton.Location = new System.Drawing.Point(343, 75);
this.browsebutton.Name = "browsebutton";
this.browsebutton.Size = new System.Drawing.Size(28, 26);
this.browsebutton.Size = new System.Drawing.Size(28, 22);
this.browsebutton.TabIndex = 2;
this.browsebutton.TabStop = false;
this.browsebutton.UseVisualStyleBackColor = true;
this.browsebutton.Click += new System.EventHandler(this.browsebutton_Click);
//

View file

@ -592,6 +592,7 @@ namespace CodeImp.DoomBuilder.Controls
{
// Browse
(row as FieldsEditorRow).Browse(this.ParentForm);
fieldslist.Focus();
}
}
}
@ -711,24 +712,11 @@ namespace CodeImp.DoomBuilder.Controls
// Show button
enumscombo.Visible = false;
browsebutton.Image = frow.TypeHandler.BrowseImage;
browsebutton.Location = new Point(cellrect.Right - browsebutton.Width, cellrect.Top);
browsebutton.Height = cellrect.Height;
Console.WriteLine(cellrect.Height.ToString());
browsebutton.Visible = true;
/*
// Determine image/text
if((frow.Type == UniversalFieldType.SectorEffect) ||
(frow.Type == UniversalFieldType.LinedefAction))
{
browsebutton.Image = CodeImp.DoomBuilder.Properties.Resources.treeview;
browsebutton.Text = "";
}
else
{
browsebutton.Image = null;
browsebutton.Text = "...";
}
*/
}
else
{

View file

@ -188,6 +188,7 @@ namespace CodeImp.DoomBuilder.Editing
{
// Cancel
disengaging = true;
General.Plugins.OnEditCancel();
mode.OnCancel();
return true;
}
@ -355,7 +356,11 @@ namespace CodeImp.DoomBuilder.Editing
{
// Disenagage old mode
disengaging = true;
if(oldmode != null) oldmode.OnDisengage();
if(oldmode != null)
{
General.Plugins.OnEditDisengage(oldmode, newmode);
oldmode.OnDisengage();
}
// Reset cursor
General.Interface.SetCursor(Cursors.Default);
@ -367,7 +372,11 @@ namespace CodeImp.DoomBuilder.Editing
disengaging = false;
// Engage new mode
if(newmode != null) newmode.OnEngage();
if(newmode != null)
{
newmode.OnEngage();
General.Plugins.OnEditEngage(oldmode, newmode);
}
// Bind new switch actions
UnbindSwitchActions();
@ -426,7 +435,10 @@ namespace CodeImp.DoomBuilder.Editing
{
// Let the mode know
if(mode != null)
{
General.Plugins.OnEditCancel();
mode.OnCancel();
}
}
/// <summary>
@ -437,7 +449,10 @@ namespace CodeImp.DoomBuilder.Editing
{
// Let the mode know
if(mode != null)
{
General.Plugins.OnEditAccept();
mode.OnAccept();
}
}
#endregion

View file

@ -6,7 +6,9 @@ using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.IO;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Map;
@ -121,101 +123,73 @@ namespace CodeImp.DoomBuilder.Plugins
/// This iscalled when the ceiling surface buffer is updated for a sector. The plugin can
/// modify the vertices to change how the surface is presented to the user.
/// </summary>
public virtual void OnSectorCeilingSurfaceUpdate(Sector s, ref FlatVertex[] vertices)
{
}
public virtual void OnSectorCeilingSurfaceUpdate(Sector s, ref FlatVertex[] vertices) { }
/// <summary>
/// This iscalled when the floor surface buffer is updated for a sector. The plugin can
/// modify the vertices to change how the surface is presented to the user.
/// </summary>
public virtual void OnSectorFloorSurfaceUpdate(Sector s, ref FlatVertex[] vertices)
{
}
public virtual void OnSectorFloorSurfaceUpdate(Sector s, ref FlatVertex[] vertices) { }
/// <summary>
/// Occurs before a map is opened.
/// </summary>
public virtual void OnMapOpenBegin()
{
}
public virtual void OnMapOpenBegin() { }
/// <summary>
/// Occurs after a map is opened.
/// </summary>
public virtual void OnMapOpenEnd()
{
}
public virtual void OnMapOpenEnd() { }
/// <summary>
/// Occurs before a new map is created.
/// </summary>
public virtual void OnMapNewBegin()
{
}
public virtual void OnMapNewBegin() { }
/// <summary>
/// Occurs after a new map is created.
/// </summary>
public virtual void OnMapNewEnd()
{
}
public virtual void OnMapNewEnd() { }
/// <summary>
/// Occurs before the map is closed.
/// </summary>
public virtual void OnMapCloseBegin()
{
}
public virtual void OnMapCloseBegin() { }
/// <summary>
/// Occurs after a the map is closed.
/// </summary>
public virtual void OnMapCloseEnd()
{
}
public virtual void OnMapCloseEnd() { }
/// <summary>
/// Occurs before a map is saved.
/// </summary>
public virtual void OnMapSaveBegin(SavePurpose purpose)
{
}
public virtual void OnMapSaveBegin(SavePurpose purpose) { }
/// <summary>
/// Occurs after a map is saved.
/// </summary>
public virtual void OnMapSaveEnd(SavePurpose purpose)
{
}
public virtual void OnMapSaveEnd(SavePurpose purpose) { }
/// <summary>
/// Occurs before the MapSet is changed. This means that the active MapSet will be disposed and changed to a new one.
/// </summary>
public virtual void OnMapSetChangeBegin()
{
}
public virtual void OnMapSetChangeBegin() { }
/// <summary>
/// Occurs after the MapSet is changed.
/// </summary>
public virtual void OnMapSetChangeEnd()
{
}
public virtual void OnMapSetChangeEnd() { }
/// <summary>
/// This is called after the constructor to allow a plugin to initialize.
/// </summary>
public virtual void OnInitialize()
{
}
public virtual void OnInitialize() { }
/// <summary>
/// This is called when the user chose to reload the resources.
/// </summary>
public virtual void OnReloadResources()
{
}
public virtual void OnReloadResources() { }
/// <summary>
/// This is called by the Doom Builder core when the editing mode changes.
@ -223,121 +197,132 @@ namespace CodeImp.DoomBuilder.Plugins
/// </summary>
/// <param name="oldmode">The previous editing mode</param>
/// <param name="newmode">The new editing mode</param>
public virtual bool OnModeChange(EditMode oldmode, EditMode newmode)
{
return true;
}
public virtual bool OnModeChange(EditMode oldmode, EditMode newmode) { return true; }
/// <summary>
/// Called by the Doom Builder core when the user changes the program configuration (F5).
/// </summary>
public virtual void OnProgramReconfigure()
{
}
public virtual void OnProgramReconfigure() { }
/// <summary>
/// Called by the Doom Builder core when the user changes the map settings (F2).
/// </summary>
public virtual void OnMapReconfigure()
{
}
public virtual void OnMapReconfigure() { }
/// <summary>
/// Called by the Doom Builder core when the user wants to copy selected geometry.
/// Return false to abort the copy operation.
/// The result parameter is false when the operation was already aborted by another plugin.
/// </summary>
public virtual bool OnCopyBegin(bool result)
{
return true;
}
public virtual bool OnCopyBegin(bool result) { return true; }
/// <summary>
/// Called by the Doom Builder core when the user has copied geometry.
/// </summary>
public virtual void OnCopyEnd()
{
}
public virtual void OnCopyEnd() { }
/// <summary>
/// Called by the Doom Builder core when the user wants to paste geometry into the map.
/// Return false to abort the paste operation.
/// The result parameter is false when the operation was already aborted by another plugin.
/// </summary>
public virtual bool OnPasteBegin(PasteOptions options, bool result)
{
return true;
}
public virtual bool OnPasteBegin(PasteOptions options, bool result) { return true; }
/// <summary>
/// Called by the Doom Builder core when the user pastes geometry into the map. The new geometry is created and marked before this method is called.
/// </summary>
public virtual void OnPasteEnd(PasteOptions options)
{
}
public virtual void OnPasteEnd(PasteOptions options) { }
/// <summary>
/// Called by the Doom Builder core when the user wants to undo the previous action.
/// Return false to abort the operation.
/// The result parameter is false when the operation was already aborted by another plugin.
/// </summary>
public virtual bool OnUndoBegin(bool result)
{
return true;
}
public virtual bool OnUndoBegin(bool result) { return true; }
/// <summary>
/// Called by the Doom Builder core when the user has undone the previous action.
/// </summary>
public virtual void OnUndoEnd()
{
}
public virtual void OnUndoEnd() { }
/// <summary>
/// Called by the Doom Builder core when the user wants to redo the previously undone action.
/// Return false to abort the operation.
/// The result parameter is false when the operation was already aborted by another plugin.
/// </summary>
public virtual bool OnRedoBegin(bool result)
{
return true;
}
public virtual bool OnRedoBegin(bool result) { return true; }
/// <summary>
/// Called by the Doom Builder core when the user has redone the action.
/// </summary>
public virtual void OnRedoEnd()
{
}
public virtual void OnRedoEnd() { }
/// <summary>
/// Called by the Doom Builder core when a new undo level has been created.
/// </summary>
public virtual void OnUndoCreated()
{
}
public virtual void OnUndoCreated() { }
/// <summary>
/// Called by the Doom Builder core when an undo level has been withdrawn.
/// </summary>
public virtual void OnUndoWithdrawn()
{
}
public virtual void OnUndoWithdrawn() { }
/// <summary>
/// Called when the user opens the Preferences dialog.
/// </summary>
public virtual void OnShowPreferences(PreferencesController controller)
{
}
public virtual void OnShowPreferences(PreferencesController controller) { }
/// <summary>
/// Called when the user closes the Preferences dialog by either accepting the changes or cancelling.
/// </summary>
public virtual void OnClosePreferences(PreferencesController controller)
{
}
public virtual void OnClosePreferences(PreferencesController controller) { }
/// <summary>
/// Called when an Action begins.
/// </summary>
public virtual void OnActionBegin(CodeImp.DoomBuilder.Actions.Action action) { }
/// <summary>
/// Called when an Action ends.
/// </summary>
public virtual void OnActionEnd(CodeImp.DoomBuilder.Actions.Action action) { }
/// <summary>
/// Called when an Editing Mode engages
/// </summary>
public virtual void OnEditEngage(EditMode oldmode, EditMode newmode) { }
/// <summary>
/// Called when an Editing Mode disengages
/// </summary>
public virtual void OnEditDisengage(EditMode oldmode, EditMode newmode) { }
/// <summary>
/// Called when an Editing Mode is cancelled
/// </summary>
public virtual void OnEditCancel() { }
/// <summary>
/// Called when an Editing Mode is accepted
/// </summary>
public virtual void OnEditAccept() { }
// Interface events
public virtual void OnEditMouseClick(MouseEventArgs e) { }
public virtual void OnEditMouseDoubleClick(MouseEventArgs e) { }
public virtual void OnEditMouseDown(MouseEventArgs e) { }
public virtual void OnEditMouseEnter(EventArgs e) { }
public virtual void OnEditMouseLeave(EventArgs e) { }
public virtual void OnEditMouseMove(MouseEventArgs e) { }
public virtual void OnEditMouseUp(MouseEventArgs e) { }
public virtual void OnEditKeyDown(KeyEventArgs e) { }
public virtual void OnEditKeyUp(KeyEventArgs e) { }
public virtual void OnEditMouseInput(Vector2D delta) { }
// Rendering events
public virtual void OnEditRedrawDisplayBegin() { }
public virtual void OnEditRedrawDisplayEnd() { }
#endregion
}
}

View file

@ -22,8 +22,10 @@ using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.IO;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Editing;
using System.Reflection;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Rendering;
using CodeImp.DoomBuilder.Windows;
@ -221,14 +223,7 @@ namespace CodeImp.DoomBuilder.Plugins
#endregion
#region ================== Events
public void ReloadResources()
{
foreach(Plugin p in plugins) p.Plug.OnReloadResources();
}
public bool ModeChanges(EditMode oldmode, EditMode newmode)
{
bool result = true;
@ -236,19 +231,6 @@ namespace CodeImp.DoomBuilder.Plugins
return result;
}
public void ProgramReconfigure()
{
foreach(Plugin p in plugins) p.Plug.OnProgramReconfigure();
}
public void MapReconfigure()
{
foreach(Plugin p in plugins) p.Plug.OnMapReconfigure();
}
public bool OnCopyBegin()
{
bool result = true;
@ -256,13 +238,6 @@ namespace CodeImp.DoomBuilder.Plugins
return result;
}
public void OnCopyEnd()
{
foreach(Plugin p in plugins) p.Plug.OnCopyEnd();
}
public bool OnPasteBegin(PasteOptions options)
{
bool result = true;
@ -270,13 +245,6 @@ namespace CodeImp.DoomBuilder.Plugins
return result;
}
public void OnPasteEnd(PasteOptions options)
{
foreach(Plugin p in plugins) p.Plug.OnPasteEnd(options.Copy());
}
public bool OnUndoBegin()
{
bool result = true;
@ -284,13 +252,6 @@ namespace CodeImp.DoomBuilder.Plugins
return result;
}
public void OnUndoEnd()
{
foreach(Plugin p in plugins) p.Plug.OnUndoEnd();
}
public bool OnRedoBegin()
{
bool result = true;
@ -298,107 +259,47 @@ namespace CodeImp.DoomBuilder.Plugins
return result;
}
public void OnRedoEnd()
{
foreach(Plugin p in plugins) p.Plug.OnRedoEnd();
}
public void OnUndoCreated()
{
foreach(Plugin p in plugins) p.Plug.OnUndoCreated();
}
public void OnUndoWithdrawn()
{
foreach(Plugin p in plugins) p.Plug.OnUndoWithdrawn();
}
public void OnMapOpenBegin()
{
foreach(Plugin p in plugins) p.Plug.OnMapOpenBegin();
}
public void OnMapOpenEnd()
{
foreach(Plugin p in plugins) p.Plug.OnMapOpenEnd();
}
public void OnMapNewBegin()
{
foreach(Plugin p in plugins) p.Plug.OnMapNewBegin();
}
public void OnMapNewEnd()
{
foreach(Plugin p in plugins) p.Plug.OnMapNewEnd();
}
public void OnMapCloseBegin()
{
foreach(Plugin p in plugins) p.Plug.OnMapCloseBegin();
}
public void OnMapCloseEnd()
{
foreach(Plugin p in plugins) p.Plug.OnMapCloseEnd();
}
public void OnMapSaveBegin(SavePurpose purpose)
{
foreach(Plugin p in plugins) p.Plug.OnMapSaveBegin(purpose);
}
public void OnMapSaveEnd(SavePurpose purpose)
{
foreach(Plugin p in plugins) p.Plug.OnMapSaveEnd(purpose);
}
public void OnMapSetChangeBegin()
{
foreach(Plugin p in plugins) p.Plug.OnMapSetChangeBegin();
}
public void OnMapSetChangeEnd()
{
foreach(Plugin p in plugins) p.Plug.OnMapSetChangeEnd();
}
public void OnSectorCeilingSurfaceUpdate(Sector s, ref FlatVertex[] vertices)
{
foreach(Plugin p in plugins) p.Plug.OnSectorCeilingSurfaceUpdate(s, ref vertices);
}
public void OnSectorFloorSurfaceUpdate(Sector s, ref FlatVertex[] vertices)
{
foreach(Plugin p in plugins) p.Plug.OnSectorFloorSurfaceUpdate(s, ref vertices);
}
public void OnShowPreferences(PreferencesController controller)
{
foreach(Plugin p in plugins) p.Plug.OnShowPreferences(controller);
}
public void OnClosePreferences(PreferencesController controller)
{
foreach(Plugin p in plugins) p.Plug.OnClosePreferences(controller);
}
public void ReloadResources() { foreach(Plugin p in plugins) p.Plug.OnReloadResources(); }
public void ProgramReconfigure() { foreach(Plugin p in plugins) p.Plug.OnProgramReconfigure(); }
public void MapReconfigure() { foreach(Plugin p in plugins) p.Plug.OnMapReconfigure(); }
public void OnCopyEnd() { foreach(Plugin p in plugins) p.Plug.OnCopyEnd(); }
public void OnPasteEnd(PasteOptions options) { foreach(Plugin p in plugins) p.Plug.OnPasteEnd(options.Copy()); }
public void OnUndoEnd() { foreach(Plugin p in plugins) p.Plug.OnUndoEnd(); }
public void OnRedoEnd() { foreach(Plugin p in plugins) p.Plug.OnRedoEnd(); }
public void OnUndoCreated() { foreach(Plugin p in plugins) p.Plug.OnUndoCreated(); }
public void OnUndoWithdrawn() { foreach(Plugin p in plugins) p.Plug.OnUndoWithdrawn(); }
public void OnMapOpenBegin() { foreach(Plugin p in plugins) p.Plug.OnMapOpenBegin(); }
public void OnMapOpenEnd() { foreach(Plugin p in plugins) p.Plug.OnMapOpenEnd(); }
public void OnMapNewBegin() { foreach(Plugin p in plugins) p.Plug.OnMapNewBegin(); }
public void OnMapNewEnd() { foreach(Plugin p in plugins) p.Plug.OnMapNewEnd(); }
public void OnMapCloseBegin() { foreach(Plugin p in plugins) p.Plug.OnMapCloseBegin(); }
public void OnMapCloseEnd() { foreach(Plugin p in plugins) p.Plug.OnMapCloseEnd(); }
public void OnMapSaveBegin(SavePurpose purpose) { foreach(Plugin p in plugins) p.Plug.OnMapSaveBegin(purpose); }
public void OnMapSaveEnd(SavePurpose purpose) { foreach(Plugin p in plugins) p.Plug.OnMapSaveEnd(purpose); }
public void OnMapSetChangeBegin() { foreach(Plugin p in plugins) p.Plug.OnMapSetChangeBegin(); }
public void OnMapSetChangeEnd() { foreach(Plugin p in plugins) p.Plug.OnMapSetChangeEnd(); }
public void OnSectorCeilingSurfaceUpdate(Sector s, ref FlatVertex[] vertices) { foreach(Plugin p in plugins) p.Plug.OnSectorCeilingSurfaceUpdate(s, ref vertices); }
public void OnSectorFloorSurfaceUpdate(Sector s, ref FlatVertex[] vertices) { foreach(Plugin p in plugins) p.Plug.OnSectorFloorSurfaceUpdate(s, ref vertices); }
public void OnShowPreferences(PreferencesController controller) { foreach(Plugin p in plugins) p.Plug.OnShowPreferences(controller); }
public void OnClosePreferences(PreferencesController controller) { foreach(Plugin p in plugins) p.Plug.OnClosePreferences(controller); }
public void OnActionBegin(CodeImp.DoomBuilder.Actions.Action action) { foreach(Plugin p in plugins) p.Plug.OnActionBegin(action); }
public void OnActionEnd(CodeImp.DoomBuilder.Actions.Action action) { foreach(Plugin p in plugins) p.Plug.OnActionEnd(action); }
public void OnEditEngage(EditMode oldmode, EditMode newmode) { foreach(Plugin p in plugins) p.Plug.OnEditEngage(oldmode, newmode); }
public void OnEditDisengage(EditMode oldmode, EditMode newmode) { foreach(Plugin p in plugins) p.Plug.OnEditDisengage(oldmode, newmode); }
public void OnEditCancel() { foreach(Plugin p in plugins) p.Plug.OnEditCancel(); }
public void OnEditAccept() { foreach(Plugin p in plugins) p.Plug.OnEditAccept(); }
public void OnEditMouseClick(MouseEventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditMouseClick(e); }
public void OnEditMouseDoubleClick(MouseEventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditMouseDoubleClick(e); }
public void OnEditMouseDown(MouseEventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditMouseDown(e); }
public void OnEditMouseEnter(EventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditMouseEnter(e); }
public void OnEditMouseLeave(EventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditMouseLeave(e); }
public void OnEditMouseMove(MouseEventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditMouseMove(e); }
public void OnEditMouseUp(MouseEventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditMouseUp(e); }
public void OnEditKeyDown(KeyEventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditKeyDown(e); }
public void OnEditKeyUp(KeyEventArgs e) { foreach(Plugin p in plugins) p.Plug.OnEditKeyUp(e); }
public void OnEditMouseInput(Vector2D delta) { foreach(Plugin p in plugins) p.Plug.OnEditMouseInput(delta); }
public void OnEditRedrawDisplayBegin() { foreach(Plugin p in plugins) p.Plug.OnEditRedrawDisplayBegin(); }
public void OnEditRedrawDisplayEnd() { foreach(Plugin p in plugins) p.Plug.OnEditRedrawDisplayEnd(); }
#endregion
}

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3082
// Runtime Version:2.0.50727.3615
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -60,6 +60,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap Angle {
get {
object obj = ResourceManager.GetObject("Angle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap CLogo {
get {
object obj = ResourceManager.GetObject("CLogo", resourceCulture);
@ -172,6 +179,20 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap List {
get {
object obj = ResourceManager.GetObject("List", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap List_Images {
get {
object obj = ResourceManager.GetObject("List_Images", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap mergegeometry {
get {
object obj = ResourceManager.GetObject("mergegeometry", resourceCulture);
@ -424,6 +445,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap Text {
get {
object obj = ResourceManager.GetObject("Text", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap treeview {
get {
object obj = ResourceManager.GetObject("treeview", resourceCulture);

View file

@ -121,17 +121,23 @@
<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>
<data name="Grid2_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Grid2_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ScriptHelp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptHelp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScriptConstant" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptConstant.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Grid4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Grid4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PasteSpecial" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PasteSpecial.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="Hourglass" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Hourglass.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Status11" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Status11.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -139,9 +145,6 @@
<data name="Status10" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Status10.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="mergegeometry" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mergegeometry.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CLogo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -166,14 +169,17 @@
<data name="KnownTextureSet" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\KnownTextureSet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NewScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NewScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Status12" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Status12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Redo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Redo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OpenMap" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\OpenMap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="SaveAll" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SaveAll.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ViewTextureFloor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewTextureFloor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -187,23 +193,23 @@
<data name="Monster2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Monster2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Hourglass" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Hourglass.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WarningLarge" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WarningLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="File" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NewMap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Copy.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScriptPalette" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptPalette.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NewMap" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NewMap2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ViewNormal" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewNormal.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Grid2_arrowup" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Grid2_arrowup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SaveMap" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SaveMap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -217,14 +223,11 @@
<data name="Status0" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Status0.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScriptHelp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptHelp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Prefab" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Prefab.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Splash3_trans" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Splash3_trans.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<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="Zoom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -247,6 +250,9 @@
<data name="WarningOff" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WarningOff.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OpenScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\OpenScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ViewTextureCeiling" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewTextureCeiling.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -259,14 +265,14 @@
<data name="mergegeometry2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mergegeometry2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Prefab2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Prefab2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ViewNormal" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewNormal.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Question" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Question.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SaveAll" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SaveAll.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="mergegeometry" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\mergegeometry.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ColorPick" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ColorPick.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -280,11 +286,8 @@
<data name="ScriptCompile" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptCompile.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SaveScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SaveScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OpenScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\OpenScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Prefab2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Prefab2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Paste" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Paste.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -292,11 +295,11 @@
<data name="Folder" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Folder.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Grid4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Grid4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Splash3_trans" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Splash3_trans.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 name="OpenMap" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\OpenMap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ErrorLarge" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ErrorLarge.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -304,10 +307,19 @@
<data name="Warning" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NewScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NewScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="SaveScript" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SaveScript.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PasteSpecial" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PasteSpecial.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="List" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\List.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="List_Images" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\List_Images.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Text" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Text.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -50,6 +51,8 @@ namespace CodeImp.DoomBuilder.Types
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.Angle; } }
#endregion
#region ================== Constructor

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -50,6 +51,8 @@ namespace CodeImp.DoomBuilder.Types
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.Angle; } }
#endregion
#region ================== Constructor

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -51,6 +52,8 @@ namespace CodeImp.DoomBuilder.Types
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.Angle; } }
#endregion
#region ================== Constructor

View file

@ -51,6 +51,8 @@ namespace CodeImp.DoomBuilder.Types
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.ColorPick; } }
#endregion
#region ================== Constructor

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -50,6 +51,8 @@ namespace CodeImp.DoomBuilder.Types
#region ================== Properties
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.List; } }
#endregion

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -49,6 +50,8 @@ namespace CodeImp.DoomBuilder.Types
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.List_Images; } }
#endregion
#region ================== Methods

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -50,6 +51,8 @@ namespace CodeImp.DoomBuilder.Types
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.List; } }
#endregion
#region ================== Constructor

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -50,6 +51,8 @@ namespace CodeImp.DoomBuilder.Types
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.List; } }
#endregion
#region ================== Constructor

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -48,6 +49,8 @@ namespace CodeImp.DoomBuilder.Types
#region ================== Properties
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.Text; } }
#endregion

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -49,6 +50,8 @@ namespace CodeImp.DoomBuilder.Types
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.List_Images; } }
#endregion
#region ================== Methods

View file

@ -0,0 +1,109 @@

#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.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Data;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Windows;
#endregion
namespace CodeImp.DoomBuilder.Types
{
[TypeHandler(UniversalType.ThingClass, "Thing Class", true)]
internal class ThingClassHandler : TypeHandler
{
#region ================== Constants
#endregion
#region ================== Variables
private string value = "";
#endregion
#region ================== Properties
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.List; } }
#endregion
#region ================== Methods
public override void Browse(IWin32Window parent)
{
int tid = 0;
// Find the thing with this class name
foreach(ThingTypeInfo t in General.Map.Data.ThingTypes)
{
if((t.Actor != null) && (string.Compare(t.Actor.ClassName, value, true) == 0))
{
tid = t.Index;
break;
}
}
//tid = ThingBrowserForm.BrowseThing(parent, tid);
ThingBrowserForm f = new ThingBrowserForm(tid);
if(f.ShowDialog(Form.ActiveForm) == DialogResult.OK)
{
// Find the class name for this thing
ThingTypeInfo t = General.Map.Data.GetThingInfo(f.SelectedType);
if(t.Actor != null)
this.value = t.Actor.ClassName;
else
this.value = "";
}
f.Dispose();
}
public override void SetValue(object value)
{
if(value != null)
this.value = value.ToString();
else
this.value = "";
}
public override object GetValue()
{
return this.value;
}
public override string GetStringValue()
{
return this.value;
}
#endregion
}
}

View file

@ -0,0 +1,115 @@

#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.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.Data;
using System.IO;
using System.Diagnostics;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Windows;
using System.Windows.Forms;
#endregion
namespace CodeImp.DoomBuilder.Types
{
[TypeHandler(UniversalType.ThingType, "Thing Type", true)]
internal class ThingTypeHandler : TypeHandler
{
#region ================== Constants
#endregion
#region ================== Variables
private int value;
#endregion
#region ================== Properties
public override bool IsBrowseable { get { return true; } }
public override Image BrowseImage { get { return Properties.Resources.List; } }
#endregion
#region ================== Constructor
#endregion
#region ================== Methods
public override void Browse(IWin32Window parent)
{
this.value = ThingBrowserForm.BrowseThing(parent, this.value);
}
public override void SetValue(object value)
{
int result;
// Null?
if(value == null)
{
this.value = 0;
}
// Compatible type?
else if((value is int) || (value is float) || (value is bool))
{
// Set directly
this.value = Convert.ToInt32(value);
}
else
{
// Try parsing as string
if(int.TryParse(value.ToString(), NumberStyles.Integer, CultureInfo.CurrentCulture, out result))
{
this.value = result;
}
else
{
this.value = 0;
}
}
}
public override object GetValue()
{
return this.value;
}
public override int GetIntValue()
{
return this.value;
}
public override string GetStringValue()
{
return this.value.ToString();
}
#endregion
}
}

View file

@ -19,6 +19,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Text;
using CodeImp.DoomBuilder.IO;
@ -64,6 +65,8 @@ namespace CodeImp.DoomBuilder.Types
public virtual bool IsBrowseable { get { return false; } }
public virtual bool IsEnumerable { get { return false; } }
public virtual bool IsLimitedToEnums { get { return false; } }
public virtual Image BrowseImage { get { return null; } }
#endregion

View file

@ -46,6 +46,8 @@ namespace CodeImp.DoomBuilder.Types
ThingTag = 14,
LinedefTag = 15,
EnumStrings = 16,
AngleDegreesFloat = 17
AngleDegreesFloat = 17,
ThingType = 18,
ThingClass = 19
}
}

View file

@ -58,7 +58,6 @@ namespace CodeImp.DoomBuilder.Windows
this.hexenpanel = new System.Windows.Forms.Panel();
this.activation = new System.Windows.Forms.ComboBox();
this.action = new CodeImp.DoomBuilder.Controls.ActionSelectorControl();
this.browseaction = new System.Windows.Forms.Button();
this.udmfpanel = new System.Windows.Forms.Panel();
this.udmfactivates = new CodeImp.DoomBuilder.Controls.CheckboxArrayControl();
this.newtag = new System.Windows.Forms.Button();
@ -68,16 +67,23 @@ namespace CodeImp.DoomBuilder.Windows
this.tabs = new System.Windows.Forms.TabControl();
this.tabproperties = new System.Windows.Forms.TabPage();
this.idgroup = new System.Windows.Forms.GroupBox();
this.tag = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.tabsidedefs = new System.Windows.Forms.TabPage();
this.splitter = new System.Windows.Forms.SplitContainer();
this.frontside = new System.Windows.Forms.CheckBox();
this.frontgroup = new System.Windows.Forms.GroupBox();
this.frontoffsety = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.frontoffsetx = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.customfrontbutton = new System.Windows.Forms.Button();
this.frontlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
this.frontmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
this.fronthigh = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
this.backside = new System.Windows.Forms.CheckBox();
this.backgroup = new System.Windows.Forms.GroupBox();
this.backoffsety = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.backoffsetx = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.custombackbutton = new System.Windows.Forms.Button();
this.backlow = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
this.backmid = new CodeImp.DoomBuilder.Controls.TextureSelectorControl();
@ -86,13 +92,7 @@ namespace CodeImp.DoomBuilder.Windows
this.fieldslist = new CodeImp.DoomBuilder.Controls.FieldsEditorControl();
this.heightpanel1 = new System.Windows.Forms.Panel();
this.heightpanel2 = new System.Windows.Forms.Panel();
this.tag = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.frontsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.frontoffsetx = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.frontoffsety = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.backoffsety = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.backoffsetx = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.backsector = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.browseaction = new System.Windows.Forms.Button();
label2 = new System.Windows.Forms.Label();
taglabel = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
@ -420,19 +420,6 @@ namespace CodeImp.DoomBuilder.Windows
this.action.Value = 402;
this.action.ValueChanges += new System.EventHandler(this.action_ValueChanges);
//
// browseaction
//
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.treeview;
this.browseaction.Location = new System.Drawing.Point(469, 26);
this.browseaction.Name = "browseaction";
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browseaction.Size = new System.Drawing.Size(30, 23);
this.browseaction.TabIndex = 1;
this.browseaction.Text = " ";
this.browseaction.UseVisualStyleBackColor = true;
this.browseaction.Click += new System.EventHandler(this.browseaction_Click);
//
// udmfpanel
//
this.udmfpanel.Controls.Add(this.udmfactivates);
@ -542,6 +529,18 @@ namespace CodeImp.DoomBuilder.Windows
this.idgroup.TabStop = false;
this.idgroup.Text = " Identification ";
//
// tag
//
this.tag.AllowDecimal = false;
this.tag.AllowNegative = false;
this.tag.AllowRelative = true;
this.tag.ButtonStep = 1;
this.tag.Location = new System.Drawing.Point(62, 26);
this.tag.Name = "tag";
this.tag.Size = new System.Drawing.Size(75, 24);
this.tag.StepValues = null;
this.tag.TabIndex = 7;
//
// tabsidedefs
//
this.tabsidedefs.Controls.Add(this.splitter);
@ -611,6 +610,42 @@ namespace CodeImp.DoomBuilder.Windows
this.frontgroup.TabStop = false;
this.frontgroup.Text = " ";
//
// frontoffsety
//
this.frontoffsety.AllowDecimal = false;
this.frontoffsety.AllowNegative = true;
this.frontoffsety.AllowRelative = true;
this.frontoffsety.ButtonStep = 1;
this.frontoffsety.Location = new System.Drawing.Point(171, 74);
this.frontoffsety.Name = "frontoffsety";
this.frontoffsety.Size = new System.Drawing.Size(62, 24);
this.frontoffsety.StepValues = null;
this.frontoffsety.TabIndex = 16;
//
// frontoffsetx
//
this.frontoffsetx.AllowDecimal = false;
this.frontoffsetx.AllowNegative = true;
this.frontoffsetx.AllowRelative = true;
this.frontoffsetx.ButtonStep = 1;
this.frontoffsetx.Location = new System.Drawing.Point(103, 74);
this.frontoffsetx.Name = "frontoffsetx";
this.frontoffsetx.Size = new System.Drawing.Size(62, 24);
this.frontoffsetx.StepValues = null;
this.frontoffsetx.TabIndex = 15;
//
// frontsector
//
this.frontsector.AllowDecimal = false;
this.frontsector.AllowNegative = false;
this.frontsector.AllowRelative = false;
this.frontsector.ButtonStep = 1;
this.frontsector.Location = new System.Drawing.Point(103, 35);
this.frontsector.Name = "frontsector";
this.frontsector.Size = new System.Drawing.Size(130, 24);
this.frontsector.StepValues = null;
this.frontsector.TabIndex = 14;
//
// customfrontbutton
//
this.customfrontbutton.Location = new System.Drawing.Point(103, 124);
@ -685,6 +720,42 @@ namespace CodeImp.DoomBuilder.Windows
this.backgroup.TabStop = false;
this.backgroup.Text = " ";
//
// backoffsety
//
this.backoffsety.AllowDecimal = false;
this.backoffsety.AllowNegative = true;
this.backoffsety.AllowRelative = true;
this.backoffsety.ButtonStep = 1;
this.backoffsety.Location = new System.Drawing.Point(171, 74);
this.backoffsety.Name = "backoffsety";
this.backoffsety.Size = new System.Drawing.Size(62, 24);
this.backoffsety.StepValues = null;
this.backoffsety.TabIndex = 19;
//
// backoffsetx
//
this.backoffsetx.AllowDecimal = false;
this.backoffsetx.AllowNegative = true;
this.backoffsetx.AllowRelative = true;
this.backoffsetx.ButtonStep = 1;
this.backoffsetx.Location = new System.Drawing.Point(103, 74);
this.backoffsetx.Name = "backoffsetx";
this.backoffsetx.Size = new System.Drawing.Size(62, 24);
this.backoffsetx.StepValues = null;
this.backoffsetx.TabIndex = 18;
//
// backsector
//
this.backsector.AllowDecimal = false;
this.backsector.AllowNegative = false;
this.backsector.AllowRelative = false;
this.backsector.ButtonStep = 1;
this.backsector.Location = new System.Drawing.Point(103, 35);
this.backsector.Name = "backsector";
this.backsector.Size = new System.Drawing.Size(130, 24);
this.backsector.StepValues = null;
this.backsector.TabIndex = 17;
//
// custombackbutton
//
this.custombackbutton.Location = new System.Drawing.Point(103, 124);
@ -730,7 +801,7 @@ namespace CodeImp.DoomBuilder.Windows
this.tabcustom.Location = new System.Drawing.Point(4, 23);
this.tabcustom.Name = "tabcustom";
this.tabcustom.Padding = new System.Windows.Forms.Padding(3);
this.tabcustom.Size = new System.Drawing.Size(533, 538);
this.tabcustom.Size = new System.Drawing.Size(549, 538);
this.tabcustom.TabIndex = 2;
this.tabcustom.Text = "Custom";
this.tabcustom.UseVisualStyleBackColor = true;
@ -766,75 +837,18 @@ namespace CodeImp.DoomBuilder.Windows
this.heightpanel2.TabIndex = 4;
this.heightpanel2.Visible = false;
//
// tag
// browseaction
//
this.tag.AllowNegative = false;
this.tag.AllowRelative = true;
this.tag.ButtonStep = 1;
this.tag.Location = new System.Drawing.Point(62, 26);
this.tag.Name = "tag";
this.tag.Size = new System.Drawing.Size(75, 24);
this.tag.TabIndex = 7;
//
// frontsector
//
this.frontsector.AllowNegative = false;
this.frontsector.AllowRelative = false;
this.frontsector.ButtonStep = 1;
this.frontsector.Location = new System.Drawing.Point(103, 35);
this.frontsector.Name = "frontsector";
this.frontsector.Size = new System.Drawing.Size(130, 24);
this.frontsector.TabIndex = 14;
//
// frontoffsetx
//
this.frontoffsetx.AllowNegative = true;
this.frontoffsetx.AllowRelative = true;
this.frontoffsetx.ButtonStep = 1;
this.frontoffsetx.Location = new System.Drawing.Point(103, 74);
this.frontoffsetx.Name = "frontoffsetx";
this.frontoffsetx.Size = new System.Drawing.Size(62, 24);
this.frontoffsetx.TabIndex = 15;
//
// frontoffsety
//
this.frontoffsety.AllowNegative = true;
this.frontoffsety.AllowRelative = true;
this.frontoffsety.ButtonStep = 1;
this.frontoffsety.Location = new System.Drawing.Point(171, 74);
this.frontoffsety.Name = "frontoffsety";
this.frontoffsety.Size = new System.Drawing.Size(62, 24);
this.frontoffsety.TabIndex = 16;
//
// backoffsety
//
this.backoffsety.AllowNegative = true;
this.backoffsety.AllowRelative = true;
this.backoffsety.ButtonStep = 1;
this.backoffsety.Location = new System.Drawing.Point(171, 74);
this.backoffsety.Name = "backoffsety";
this.backoffsety.Size = new System.Drawing.Size(62, 24);
this.backoffsety.TabIndex = 19;
//
// backoffsetx
//
this.backoffsetx.AllowNegative = true;
this.backoffsetx.AllowRelative = true;
this.backoffsetx.ButtonStep = 1;
this.backoffsetx.Location = new System.Drawing.Point(103, 74);
this.backoffsetx.Name = "backoffsetx";
this.backoffsetx.Size = new System.Drawing.Size(62, 24);
this.backoffsetx.TabIndex = 18;
//
// backsector
//
this.backsector.AllowNegative = false;
this.backsector.AllowRelative = false;
this.backsector.ButtonStep = 1;
this.backsector.Location = new System.Drawing.Point(103, 35);
this.backsector.Name = "backsector";
this.backsector.Size = new System.Drawing.Size(130, 24);
this.backsector.TabIndex = 17;
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
this.browseaction.Location = new System.Drawing.Point(469, 26);
this.browseaction.Name = "browseaction";
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browseaction.Size = new System.Drawing.Size(28, 23);
this.browseaction.TabIndex = 1;
this.browseaction.Text = " ";
this.browseaction.UseVisualStyleBackColor = true;
this.browseaction.Click += new System.EventHandler(this.browseaction_Click);
//
// LinedefEditForm
//

View file

@ -891,7 +891,9 @@ namespace CodeImp.DoomBuilder.Windows
{
if((General.Map != null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditRedrawDisplayBegin();
General.Editing.Mode.OnRedrawDisplay();
General.Plugins.OnEditRedrawDisplayEnd();
}
else
{
@ -974,13 +976,21 @@ namespace CodeImp.DoomBuilder.Windows
// Mouse click
private void display_MouseClick(object sender, MouseEventArgs e)
{
if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnMouseClick(e);
if((General.Map != null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditMouseClick(e);
General.Editing.Mode.OnMouseClick(e);
}
}
// Mouse doubleclick
private void display_MouseDoubleClick(object sender, MouseEventArgs e)
{
if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnMouseDoubleClick(e);
if((General.Map != null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditMouseDoubleClick(e);
General.Editing.Mode.OnMouseDoubleClick(e);
}
}
// Mouse down
@ -1012,27 +1022,43 @@ namespace CodeImp.DoomBuilder.Windows
General.Actions.KeyPressed(key | mod);
// Invoke on editing mode
if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnMouseDown(e);
if((General.Map != null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditMouseDown(e);
General.Editing.Mode.OnMouseDown(e);
}
}
// Mouse enters
private void display_MouseEnter(object sender, EventArgs e)
{
mouseinside = true;
if((General.Map != null) && (mouseinput == null) && (General.Editing.Mode != null)) General.Editing.Mode.OnMouseEnter(e);
if((General.Map != null) && (mouseinput == null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditMouseEnter(e);
General.Editing.Mode.OnMouseEnter(e);
}
}
// Mouse leaves
private void display_MouseLeave(object sender, EventArgs e)
{
mouseinside = false;
if((General.Map != null) && (mouseinput == null) && (General.Editing.Mode != null)) General.Editing.Mode.OnMouseLeave(e);
if((General.Map != null) && (mouseinput == null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditMouseLeave(e);
General.Editing.Mode.OnMouseLeave(e);
}
}
// Mouse moves
private void display_MouseMove(object sender, MouseEventArgs e)
{
if((General.Map != null) && (mouseinput == null) && (General.Editing.Mode != null)) General.Editing.Mode.OnMouseMove(e);
if((General.Map != null) && (mouseinput == null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditMouseMove(e);
General.Editing.Mode.OnMouseMove(e);
}
}
// Mouse up
@ -1062,7 +1088,11 @@ namespace CodeImp.DoomBuilder.Windows
General.Actions.KeyReleased(key | mod);
// Invoke on editing mode
if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnMouseUp(e);
if((General.Map != null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditMouseUp(e);
General.Editing.Mode.OnMouseUp(e);
}
}
#endregion
@ -1221,7 +1251,11 @@ namespace CodeImp.DoomBuilder.Windows
e.Handled = General.Actions.KeyPressed((int)e.KeyData);
// Invoke on editing mode
if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnKeyDown(e);
if((General.Map != null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditKeyDown(e);
General.Editing.Mode.OnKeyDown(e);
}
// Handled
if(e.Handled)
@ -1271,7 +1305,11 @@ namespace CodeImp.DoomBuilder.Windows
e.Handled = General.Actions.KeyReleased((int)e.KeyData);
// Invoke on editing mode
if((General.Map != null) && (General.Editing.Mode != null)) General.Editing.Mode.OnKeyUp(e);
if((General.Map != null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditKeyUp(e);
General.Editing.Mode.OnKeyUp(e);
}
// Handled
if(e.Handled)
@ -2574,7 +2612,10 @@ namespace CodeImp.DoomBuilder.Windows
// Process mouse input
deltamouse = mouseinput.Process();
if((General.Map != null) && (General.Editing.Mode != null))
{
General.Plugins.OnEditMouseInput(deltamouse);
General.Editing.Mode.OnMouseInput(deltamouse);
}
}
// Process signal

View file

@ -150,7 +150,7 @@ namespace CodeImp.DoomBuilder.Windows
this.browsewad.Location = new System.Drawing.Point(315, 36);
this.browsewad.Name = "browsewad";
this.browsewad.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsewad.Size = new System.Drawing.Size(30, 23);
this.browsewad.Size = new System.Drawing.Size(28, 23);
this.browsewad.TabIndex = 1;
this.browsewad.Text = " ";
this.browsewad.UseVisualStyleBackColor = true;
@ -235,7 +235,7 @@ namespace CodeImp.DoomBuilder.Windows
this.browsedir.Location = new System.Drawing.Point(315, 36);
this.browsedir.Name = "browsedir";
this.browsedir.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsedir.Size = new System.Drawing.Size(30, 23);
this.browsedir.Size = new System.Drawing.Size(28, 23);
this.browsedir.TabIndex = 1;
this.browsedir.UseVisualStyleBackColor = true;
this.browsedir.Click += new System.EventHandler(this.browsedir_Click);
@ -296,7 +296,7 @@ namespace CodeImp.DoomBuilder.Windows
this.browsepk3.Location = new System.Drawing.Point(315, 36);
this.browsepk3.Name = "browsepk3";
this.browsepk3.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browsepk3.Size = new System.Drawing.Size(30, 23);
this.browsepk3.Size = new System.Drawing.Size(28, 23);
this.browsepk3.TabIndex = 1;
this.browsepk3.UseVisualStyleBackColor = true;
this.browsepk3.Click += new System.EventHandler(this.browsepk3_Click);

View file

@ -113,12 +113,14 @@ namespace CodeImp.DoomBuilder.Windows
//
// tag
//
this.tag.AllowDecimal = false;
this.tag.AllowNegative = false;
this.tag.AllowRelative = true;
this.tag.ButtonStep = 1;
this.tag.Location = new System.Drawing.Point(89, 26);
this.tag.Name = "tag";
this.tag.Size = new System.Drawing.Size(73, 24);
this.tag.StepValues = null;
this.tag.TabIndex = 25;
//
// taglabel
@ -158,22 +160,24 @@ namespace CodeImp.DoomBuilder.Windows
//
// brightness
//
this.brightness.AllowDecimal = false;
this.brightness.AllowNegative = false;
this.brightness.AllowRelative = true;
this.brightness.ButtonStep = 8;
this.brightness.Location = new System.Drawing.Point(89, 61);
this.brightness.Name = "brightness";
this.brightness.Size = new System.Drawing.Size(73, 24);
this.brightness.StepValues = null;
this.brightness.TabIndex = 24;
//
// browseeffect
//
this.browseeffect.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browseeffect.Image = global::CodeImp.DoomBuilder.Properties.Resources.treeview;
this.browseeffect.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
this.browseeffect.Location = new System.Drawing.Point(385, 27);
this.browseeffect.Name = "browseeffect";
this.browseeffect.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browseeffect.Size = new System.Drawing.Size(30, 23);
this.browseeffect.Size = new System.Drawing.Size(28, 23);
this.browseeffect.TabIndex = 1;
this.browseeffect.Text = " ";
this.browseeffect.UseVisualStyleBackColor = true;
@ -232,23 +236,27 @@ namespace CodeImp.DoomBuilder.Windows
//
// floorheight
//
this.floorheight.AllowDecimal = false;
this.floorheight.AllowNegative = true;
this.floorheight.AllowRelative = true;
this.floorheight.ButtonStep = 8;
this.floorheight.Location = new System.Drawing.Point(112, 69);
this.floorheight.Name = "floorheight";
this.floorheight.Size = new System.Drawing.Size(88, 24);
this.floorheight.StepValues = null;
this.floorheight.TabIndex = 23;
this.floorheight.WhenTextChanged += new System.EventHandler(this.floorheight_TextChanged);
//
// ceilingheight
//
this.ceilingheight.AllowDecimal = false;
this.ceilingheight.AllowNegative = true;
this.ceilingheight.AllowRelative = true;
this.ceilingheight.ButtonStep = 8;
this.ceilingheight.Location = new System.Drawing.Point(112, 35);
this.ceilingheight.Name = "ceilingheight";
this.ceilingheight.Size = new System.Drawing.Size(88, 24);
this.ceilingheight.StepValues = null;
this.ceilingheight.TabIndex = 22;
this.ceilingheight.WhenTextChanged += new System.EventHandler(this.ceilingheight_TextChanged);
//

View file

@ -419,11 +419,11 @@ namespace CodeImp.DoomBuilder.Windows
// browseaction
//
this.browseaction.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.treeview;
this.browseaction.Image = global::CodeImp.DoomBuilder.Properties.Resources.List;
this.browseaction.Location = new System.Drawing.Point(530, 26);
this.browseaction.Name = "browseaction";
this.browseaction.Padding = new System.Windows.Forms.Padding(0, 0, 1, 3);
this.browseaction.Size = new System.Drawing.Size(30, 23);
this.browseaction.Size = new System.Drawing.Size(28, 23);
this.browseaction.TabIndex = 1;
this.browseaction.Text = " ";
this.browseaction.UseVisualStyleBackColor = true;

View file

@ -488,7 +488,7 @@ namespace CodeImp.DoomBuilder.ZDoom
/// <summary>
/// This returns a specific state, or null when the state can't be found.
/// </summary>
internal StateStructure GetState(string statename)
public StateStructure GetState(string statename)
{
if(states.ContainsKey(statename))
return states[statename];
@ -501,7 +501,7 @@ namespace CodeImp.DoomBuilder.ZDoom
/// <summary>
/// This creates a list of all states, also those inherited from the base class.
/// </summary>
internal Dictionary<string, StateStructure> GetAllStates()
public Dictionary<string, StateStructure> GetAllStates()
{
Dictionary<string, StateStructure> list = new Dictionary<string, StateStructure>(states);

View file

@ -31,7 +31,7 @@ using CodeImp.DoomBuilder.Compilers;
namespace CodeImp.DoomBuilder.ZDoom
{
internal sealed class StateStructure
public sealed class StateStructure
{
#region ================== Constants
@ -50,7 +50,9 @@ namespace CodeImp.DoomBuilder.ZDoom
#endregion
#region ================== Properties
public int SpritesCount { get { return sprites.Count; } }
#endregion
#region ================== Constructor / Disposer

View file

@ -1186,7 +1186,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(!cancelled)
{
modealreadyswitching = true;
this.OnAccept();
//this.OnAccept(); // BAD! Any other plugins won't know this mode was accepted
General.Editing.AcceptMode();
}
// Update