working on script editor

This commit is contained in:
codeimp 2008-11-10 16:11:44 +00:00
parent 291b159f84
commit fc44793fd2
21 changed files with 773 additions and 268 deletions

View file

@ -46,6 +46,7 @@
-->
<ItemGroup>
<Compile Include="Config\ArgumentInfo.cs" />
<Compile Include="Config\MapLumpInfo.cs" />
<Compile Include="Config\ScriptConfiguration.cs" />
<Compile Include="Config\DefinedTextureSet.cs" />
<Compile Include="Config\EnumItem.cs" />
@ -349,11 +350,11 @@
<Compile Include="Windows\ResourceOptionsForm.Designer.cs">
<DependentUpon>ResourceOptionsForm.cs</DependentUpon>
</Compile>
<Compile Include="Windows\ScriptEditTestForm.cs">
<Compile Include="Windows\ScriptEditorForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Windows\ScriptEditTestForm.Designer.cs">
<DependentUpon>ScriptEditTestForm.cs</DependentUpon>
<Compile Include="Windows\ScriptEditorForm.Designer.cs">
<DependentUpon>ScriptEditorForm.cs</DependentUpon>
</Compile>
<Compile Include="Windows\SectorEditForm.cs">
<SubType>Form</SubType>
@ -646,6 +647,7 @@
<None Include="Resources\Cut.png" />
<None Include="Resources\Close.png" />
<Content Include="Resources\DB2.ico" />
<None Include="Resources\Script2.png" />
<None Include="Resources\ScriptCompile.png" />
<None Include="Resources\ScriptConstant.xpm" />
<None Include="Resources\ScriptError.xpm" />
@ -702,9 +704,9 @@
<SubType>Designer</SubType>
<DependentUpon>CustomFieldsForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\ScriptEditTestForm.resx">
<EmbeddedResource Include="Windows\ScriptEditorForm.resx">
<SubType>Designer</SubType>
<DependentUpon>ScriptEditTestForm.cs</DependentUpon>
<DependentUpon>ScriptEditorForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\TextEditForm.resx">
<SubType>Designer</SubType>

View file

@ -69,7 +69,8 @@ namespace CodeImp.DoomBuilder.Config
private List<SkillInfo> skills;
// Map lumps
private IDictionary maplumpnames;
private IDictionary maplumpnames; // This is old, we should use maplumps instead
private Dictionary<string, MapLumpInfo> maplumps;
// Texture/flat sources
private IDictionary textureranges;
@ -138,6 +139,7 @@ namespace CodeImp.DoomBuilder.Config
// Map lumps
public IDictionary MapLumpNames { get { return maplumpnames; } }
public Dictionary<string, MapLumpInfo> MapLumps { get { return maplumps; } }
// Texture/flat sources
public IDictionary TextureRanges { get { return textureranges; } }
@ -203,6 +205,7 @@ namespace CodeImp.DoomBuilder.Config
this.skills = new List<SkillInfo>();
this.texturesets = new List<DefinedTextureSet>();
this.makedoorargs = new int[Linedef.NUM_ARGS];
this.maplumps = new Dictionary<string, MapLumpInfo>();
// Read general settings
configname = cfg.ReadSetting("game", "<unnamed game>");
@ -242,6 +245,9 @@ namespace CodeImp.DoomBuilder.Config
textureranges = cfg.ReadSetting("textures", new Hashtable());
flatranges = cfg.ReadSetting("flats", new Hashtable());
// Map lumps
LoadMapLumps();
// Skills
LoadSkills();
@ -284,7 +290,22 @@ namespace CodeImp.DoomBuilder.Config
#endregion
#region ================== Loading
// This loads the map lumps
private void LoadMapLumps()
{
IDictionary dic;
// Get map lumps list
dic = cfg.ReadSetting("maplumpnames", new Hashtable());
foreach(DictionaryEntry de in dic)
{
// Make map lumps
MapLumpInfo lumpinfo = new MapLumpInfo(de.Key.ToString(), cfg);
maplumps.Add(de.Key.ToString(), lumpinfo);
}
}
// This loads the enumerations
private void LoadEnums()
{

View file

@ -0,0 +1,76 @@
#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;
using System.Collections.ObjectModel;
#endregion
namespace CodeImp.DoomBuilder.Config
{
public struct MapLumpInfo
{
// Members
public string name;
public bool required;
public bool blindcopy;
public bool nodebuild;
public bool allowempty;
internal ScriptConfiguration script;
// Construct from IDictionary
internal MapLumpInfo(string name, Configuration cfg)
{
string scriptconfig = "";
// Apply settings
this.name = name;
this.script = null;
this.required = cfg.ReadSetting("maplumpnames." + name + ".required", false);
this.blindcopy = cfg.ReadSetting("maplumpnames." + name + ".blindcopy", false);
this.nodebuild = cfg.ReadSetting("maplumpnames." + name + ".nodebuild", false);
this.allowempty = cfg.ReadSetting("maplumpnames." + name + ".allowempty", false);
scriptconfig = cfg.ReadSetting("maplumpnames." + name + ".script", "");
// Find script configuration
if(scriptconfig.Length > 0)
{
if(General.ScriptConfigs.ContainsKey(scriptconfig.ToLowerInvariant()))
{
this.script = General.ScriptConfigs[scriptconfig.ToLowerInvariant()];
}
else
{
General.WriteLogLine("WARNING: Map lump '" + name + "' specifies unknown script configuration '" + scriptconfig + "'. Using plain text instead.");
this.script = new ScriptConfiguration();
}
}
}
}
}

View file

@ -78,6 +78,7 @@ namespace CodeImp.DoomBuilder.Controls
this.ClientSize.Height - EDITOR_BORDER_TOP - EDITOR_BORDER_BOTTOM);
editor.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
editor.Name = "editor";
editor.TabStop = true;
editor.TabIndex = 0;
this.Controls.Add(editor);
}
@ -151,6 +152,26 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Events
// Mouse released
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp(e);
// Focus to the editor!
editor.Focus();
editor.GrabFocus();
}
// Receiving focus?
protected override void OnGotFocus(EventArgs e)
{
base.OnGotFocus(e);
// Focus to the editor!
editor.Focus();
editor.GrabFocus();
}
#endregion
}
}

View file

@ -492,6 +492,12 @@ namespace CodeImp.DoomBuilder.Controls
scriptedit.Paste();
}
// This steals the focus (use with care!)
public void GrabFocus()
{
scriptedit.GrabFocus();
}
#endregion
#region ================== Events

View file

@ -62,7 +62,9 @@ namespace CodeImp.DoomBuilder.Controls
this.tabs.SelectedIndex = 0;
this.tabs.Size = new System.Drawing.Size(691, 435);
this.tabs.TabIndex = 0;
this.tabs.TabStop = false;
this.tabs.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabs_Selecting);
this.tabs.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tabs_MouseUp);
//
// toolbar
//

View file

@ -56,9 +56,13 @@ namespace CodeImp.DoomBuilder.Controls
// Constructor
public ScriptEditorPanel()
{
ToolStripMenuItem item;
InitializeComponent();
}
// This initializes the control
public void Initialize()
{
ToolStripMenuItem item;
// Make list of script configs
scriptconfigs = new List<ScriptConfiguration>(General.ScriptConfigs.Values);
@ -98,7 +102,20 @@ namespace CodeImp.DoomBuilder.Controls
}
}
openfile.Filter = "Script files|" + filterall + "|" + filterseperate + "|All files|*.*";
// Load the script lumps
foreach(MapLumpInfo maplumpinfo in General.Map.Config.MapLumps.Values)
{
// Is this a script lump?
if(maplumpinfo.script != null)
{
// Load this!
ScriptLumpDocumentTab t = new ScriptLumpDocumentTab(maplumpinfo.name, maplumpinfo.script);
tabs.TabPages.Add(t);
tabs.SelectedIndex = 0;
}
}
// Done
UpdateToolbar();
}
@ -106,20 +123,99 @@ namespace CodeImp.DoomBuilder.Controls
#endregion
#region ================== Methods
// This asks to save files and returns the result
public bool AskSaveAll()
{
foreach(ScriptDocumentTab t in tabs.TabPages)
{
if(t.ExplicitSave)
{
if(!CloseScript(t, true)) return false;
}
}
return true;
}
// This closes a script and returns true when closed
private bool CloseScript(ScriptDocumentTab t, bool saveonly)
{
if(t.IsChanged)
{
// Ask to save
DialogResult result = MessageBox.Show(this.ParentForm, "Do you want to save changes to " + t.Text + "?", "Close File", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if(result == DialogResult.Yes)
{
// Save file
if(!SaveScript(t)) return false;
}
else if(result == DialogResult.Cancel)
{
// Cancel
return false;
}
}
if(!saveonly)
{
// Close file
tabs.TabPages.Remove(t);
t.Dispose();
}
return true;
}
// This returns true when any of the implicit-save scripts are changed
public bool CheckImplicitChanges()
{
bool changes = false;
foreach(ScriptDocumentTab t in tabs.TabPages)
{
if(!t.ExplicitSave && t.IsChanged) changes = true;
}
return changes;
}
// This forces the focus to the script editor
public void ForceFocus()
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
tabs.Focus();
if(t != null) t.Focus();
}
// This does an implicit save on all documents that use implicit saving
// Call this to save the lumps before disposing the panel!
public void ImplicitSave()
{
// Save all scripts
foreach(ScriptDocumentTab t in tabs.TabPages)
{
if(!t.ExplicitSave) t.Save();
}
UpdateToolbar();
}
// This updates the toolbar for the current status
private void UpdateToolbar()
{
int numscriptsopen = tabs.TabPages.Count;
int explicitsavescripts = 0;
ScriptDocumentTab t = null;
// Any explicit save scripts?
foreach(ScriptDocumentTab dt in tabs.TabPages)
if(dt.ExplicitSave) explicitsavescripts++;
// Get current script, if any are open
if(numscriptsopen > 0)
t = (tabs.SelectedTab as ScriptDocumentTab);
// Enable/disable buttons
buttonsave.Enabled = (t != null) && t.ExplicitSave;
buttonsaveall.Enabled = (numscriptsopen > 0);
buttonsaveall.Enabled = (explicitsavescripts > 0);
buttoncompile.Enabled = (t != null) && (t.Config.Compiler != null);
buttonscriptconfig.Enabled = (t != null) && t.IsReconfigurable;
buttonundo.Enabled = (t != null);
@ -137,13 +233,16 @@ namespace CodeImp.DoomBuilder.Controls
ScriptConfiguration config = (item.Tag as ScriptConfiguration);
item.Checked = (config == t.Config);
}
// Focus to script editor
ForceFocus();
}
}
#endregion
#region ================== Events
// When the user changes the script configuration
private void buttonscriptconfig_Click(object sender, EventArgs e)
{
@ -156,7 +255,6 @@ namespace CodeImp.DoomBuilder.Controls
// Done
UpdateToolbar();
t.Focus();
}
// When new script is clicked
@ -172,7 +270,6 @@ namespace CodeImp.DoomBuilder.Controls
// Done
UpdateToolbar();
t.Focus();
}
// Open script clicked
@ -207,7 +304,6 @@ namespace CodeImp.DoomBuilder.Controls
// Done
UpdateToolbar();
t.Focus();
}
}
}
@ -218,6 +314,7 @@ namespace CodeImp.DoomBuilder.Controls
// Save the current script
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
SaveScript(t);
UpdateToolbar();
}
// Save All clicked
@ -226,8 +323,14 @@ namespace CodeImp.DoomBuilder.Controls
// Save all scripts
foreach(ScriptDocumentTab t in tabs.TabPages)
{
if(!SaveScript(t)) break;
// Use explicit save for this script?
if(t.ExplicitSave)
{
if(!SaveScript(t)) break;
}
}
UpdateToolbar();
}
// This is called by Save and Save All to save a script
@ -265,30 +368,13 @@ namespace CodeImp.DoomBuilder.Controls
{
UpdateToolbar();
}
// This closes the current file
private void buttonclose_Click(object sender, EventArgs e)
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
if(t.IsChanged)
{
// Ask to save
DialogResult result = MessageBox.Show(this.ParentForm, "Do you want to save changes to " + t.Text + "?", "Close File", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if(result == DialogResult.Yes)
{
// Save file
if(!SaveScript(t)) return;
}
else if(result == DialogResult.Cancel)
{
// Cancel
return;
}
}
// Close file
tabs.TabPages.Remove(t);
t.Dispose();
CloseScript(t, false);
UpdateToolbar();
}
// Undo clicked
@ -296,6 +382,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Undo();
UpdateToolbar();
}
// Redo clicked
@ -303,6 +390,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Redo();
UpdateToolbar();
}
// Cut clicked
@ -310,6 +398,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Cut();
UpdateToolbar();
}
// Copy clicked
@ -317,6 +406,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Copy();
UpdateToolbar();
}
// Paste clicked
@ -324,6 +414,13 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Paste();
UpdateToolbar();
}
// Mouse released on tabs
private void tabs_MouseUp(object sender, MouseEventArgs e)
{
ForceFocus();
}
#endregion

View file

@ -29,6 +29,7 @@ using CodeImp.DoomBuilder.Map;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Types;
using CodeImp.DoomBuilder.IO;
using System.IO;
#endregion
@ -49,6 +50,7 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Properties
public override bool ExplicitSave { get { return false; } }
public override bool IsSaveAsRequired { get { return false; } }
public override bool IsClosable { get { return false; } }
public override bool IsReconfigurable { get { return false; } }
@ -57,12 +59,24 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Constructor / Disposer
// Constructor
public ScriptLumpDocumentTab(string lumpname)
public ScriptLumpDocumentTab(string lumpname, ScriptConfiguration config)
{
// Initialize
this.lumpname = lumpname;
this.config = new ScriptConfiguration(); // TODO: Figure out script config
this.config = config;
editor.SetupStyles(config);
// Load the lump data
MemoryStream stream = General.Map.GetLumpData(lumpname);
if(stream != null)
{
StreamReader reader = new StreamReader(stream);
stream.Seek(0, SeekOrigin.Begin);
editor.Text = reader.ReadToEnd();
editor.ClearUndoRedo();
}
// Done
SetTitle(lumpname.ToUpper());
}
@ -76,6 +90,16 @@ namespace CodeImp.DoomBuilder.Controls
#region ================== Methods
// Implicit save
public override bool Save()
{
// Store the lump data
byte[] data = Encoding.ASCII.GetBytes(editor.Text);
MemoryStream stream = new MemoryStream(data);
General.Map.SetLumpData(lumpname, stream);
return true;
}
#endregion
#region ================== Events

View file

@ -134,7 +134,7 @@ namespace CodeImp.DoomBuilder
// States
private static bool debugbuild;
// Command line arguments
private static string[] cmdargs;
private static string autoloadfile = null;
@ -590,15 +590,16 @@ namespace CodeImp.DoomBuilder
try { D3DDevice.Startup(); }
catch(Direct3D9NotFoundException) { AskDownloadDirectX(); return; }
catch(Direct3DX9NotFoundException) { AskDownloadDirectX(); return; }
// Load plugin manager
General.WriteLogLine("Loading plugins...");
plugins = new PluginManager();
plugins.LoadAllPlugins();
// Now that all settings have been combined (core & plugins) apply the defaults
General.WriteLogLine("Applying configuration settings...");
actions.ApplyDefaultShortcutKeys();
mainwindow.ApplyShortcutKeys();
// Load game configurations
General.WriteLogLine("Loading game configurations...");
@ -763,7 +764,7 @@ namespace CodeImp.DoomBuilder
if(properexit)
{
General.WriteLogLine("Termination requested");
// Unbind static methods from actions
General.Actions.UnbindMethods(typeof(General));
@ -772,14 +773,14 @@ namespace CodeImp.DoomBuilder
// Save action controls
actions.SaveSettings();
// Save game configuration settings
foreach(ConfigurationInfo ci in configs) ci.SaveSettings();
// Save settings configuration
General.WriteLogLine("Saving program configuration...");
settings.Save(Path.Combine(settingspath, SETTINGS_FILE));
// Clean up
if(map != null) map.Dispose(); map = null;
if(mainwindow != null) mainwindow.Dispose();
@ -848,10 +849,10 @@ namespace CodeImp.DoomBuilder
{
MapOptions newoptions = new MapOptions();
MapOptionsForm optionswindow;
// Cancel volatile mode, if any
General.DisengageVolatileMode();
// Ask the user to save changes (if any)
if(General.AskSaveMap())
{
@ -863,10 +864,10 @@ namespace CodeImp.DoomBuilder
// Display status
mainwindow.DisplayStatus("Creating new map...");
Cursor.Current = Cursors.WaitCursor;
// Let the plugins know
plugins.OnMapNewBegin();
// Clear the display
mainwindow.ClearDisplay();
@ -1165,24 +1166,47 @@ namespace CodeImp.DoomBuilder
DialogResult result;
// Map open and not saved?
if((map != null) && map.IsChanged)
if(map != null)
{
// Ask to save changes
result = MessageBox.Show(mainwindow, "Do you want to save changes to " + map.FileTitle + " (" + map.Options.CurrentName + ")?", Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if(result == DialogResult.Yes)
if(map.IsChanged)
{
// Save map and return true on success
return SaveMap();
// Ask to save changes
result = MessageBox.Show(mainwindow, "Do you want to save changes to " + map.FileTitle + " (" + map.Options.CurrentName + ")?", Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
if(result == DialogResult.Yes)
{
// Save map
if(SaveMap())
{
// Ask to save changes to scripts
return map.AskSaveScriptChanges();
}
else
{
// Failed to save map
return false;
}
}
else if(result == DialogResult.Cancel)
{
// Abort
return false;
}
else
{
// Ask to save changes to scripts
return map.AskSaveScriptChanges();
}
}
else if(result == DialogResult.Cancel)
else
{
// Abort
return false;
// Ask to save changes to scripts
return map.AskSaveScriptChanges();
}
}
// Continue
return true;
else
{
return true;
}
}
#endregion
@ -1423,11 +1447,11 @@ namespace CodeImp.DoomBuilder
}
#endregion
[BeginAction("testaction")]
internal static void TestAction()
{
ScriptEditTestForm t = new ScriptEditTestForm();
ScriptEditorForm t = new ScriptEditorForm();
t.ShowDialog(mainwindow);
t.Dispose();
}

View file

@ -60,6 +60,7 @@ namespace CodeImp.DoomBuilder
// Status
private bool changed;
private bool scriptschanged;
// Map information
private string filetitle;
@ -86,6 +87,7 @@ namespace CodeImp.DoomBuilder
private CopyPasteManager copypaste;
private Launcher launcher;
private ThingsFilter thingsfilter;
private ScriptEditorForm scriptwindow;
// Disposing
private bool isdisposed = false;
@ -104,7 +106,7 @@ namespace CodeImp.DoomBuilder
public Type PreviousMode { get { return prevmode; } }
public Type PreviousStableMode { get { return prevstablemode; } }
public DataManager Data { get { return data; } }
public bool IsChanged { get { return changed; } set { changed |= value; } }
public bool IsChanged { get { return changed | CheckScriptChanged(); } set { changed |= value; } }
public bool IsDisposed { get { return isdisposed; } }
internal D3DDevice Graphics { get { return graphics; } }
public IRenderer2D Renderer2D { get { return renderer2d; } }
@ -118,7 +120,8 @@ namespace CodeImp.DoomBuilder
public IMapSetIO FormatInterface { get { return io; } }
internal Launcher Launcher { get { return launcher; } }
public ThingsFilter ThingsFilter { get { return thingsfilter; } }
public bool IsScriptsWindowOpen { get { return (scriptwindow != null) && !scriptwindow.IsDisposed; } }
#endregion
#region ================== Constructor / Disposer
@ -143,17 +146,20 @@ namespace CodeImp.DoomBuilder
}
// Disposer
internal void Dispose()
internal bool Dispose()
{
// Not already disposed?
if(!isdisposed)
{
// Close script editor
CloseScriptEditor(false);
// Change to no mode
ChangeMode((EditMode)null);
// Unbind any methods
General.Actions.UnbindMethods(this);
// Dispose
if(grid != null) grid.Dispose();
if(launcher != null) launcher.Dispose();
@ -183,6 +189,12 @@ namespace CodeImp.DoomBuilder
// Done
isdisposed = true;
return true;
}
else
{
// Already closed
return true;
}
}
@ -363,6 +375,9 @@ namespace CodeImp.DoomBuilder
General.WriteLogLine("Saving map to file: " + newfilepathname);
// If the scripts window is open, save the scripts first
if(IsScriptsWindowOpen) scriptwindow.Editor.ImplicitSave();
// Make a copy of the map data
outputset = map.Clone();
@ -1025,6 +1040,71 @@ namespace CodeImp.DoomBuilder
#endregion
#region ================== Script Editor
// Show the script editor
[BeginAction("openscripteditor")]
internal void ShowScriptEditor()
{
if(scriptwindow == null)
{
// Load the window
scriptwindow = new ScriptEditorForm();
}
// Show the window
scriptwindow.Show();
scriptwindow.Focus();
}
// This asks the user to save changes in script files
// Returns false when cancelled by the user
internal bool AskSaveScriptChanges()
{
// Window open?
if(scriptwindow != null)
{
// Ask to save changes
// This also saves implicitly
return scriptwindow.AskSaveAll();
}
else
{
// No problems
return true;
}
}
// Close the script editor
// Specify true for the closing parameter when
// the window is already in the closing process
internal void CloseScriptEditor(bool closing)
{
if(scriptwindow != null)
{
if(!scriptwindow.IsDisposed)
{
// Remember if lumps are changed
scriptschanged |= scriptwindow.Editor.CheckImplicitChanges();
// Close now
if(!closing) scriptwindow.Close();
}
// Done
scriptwindow = null;
}
}
// This checks if the scripts are changed
internal bool CheckScriptChanged()
{
// Check if lumps are changed
return scriptschanged || scriptwindow.Editor.CheckImplicitChanges();
}
#endregion
#region ================== Methods
// This changes thing filter

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:2.0.50727.1826
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -249,6 +249,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap Script2 {
get {
object obj = ResourceManager.GetObject("Script2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap ScriptCompile {
get {
object obj = ResourceManager.GetObject("ScriptCompile", resourceCulture);

View file

@ -121,44 +121,41 @@
<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>
<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="ScriptError" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptError.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<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="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="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 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="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="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 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="Status1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Status1.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 name="ScriptError" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptError.xpm;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Cut" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Cut.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Close" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Close.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Status2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Status2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<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 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="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 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>
<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>
@ -172,8 +169,8 @@
<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 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>
</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>
@ -184,8 +181,8 @@
<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>
@ -196,8 +193,8 @@
<data name="Failed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Failed.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="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="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>
@ -220,11 +217,14 @@
<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>
<data name="Splash3_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Splash3_small.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="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="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="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="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>
@ -232,8 +232,8 @@
<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="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>
<data name="Splash3_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Splash3_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Filter" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Filter.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -244,6 +244,9 @@
<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>
@ -253,19 +256,19 @@
<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="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="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="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="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="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="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 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="Close" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Close.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Script2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Script2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -660,3 +660,13 @@ assigngroup10
allowmouse = true;
allowscroll = false;
}
openscripteditor
{
title = "Script Editor";
category = "tools";
description = "This opens the script editor that allows you to edit any scripts in your map or any script files.";
allowkeys = true;
allowmouse = true;
allowscroll = false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

View file

@ -76,6 +76,8 @@ namespace CodeImp.DoomBuilder.Windows
this.menumode = new System.Windows.Forms.ToolStripMenuItem();
this.menutools = new System.Windows.Forms.ToolStripMenuItem();
this.itemreloadresources = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem8 = new System.Windows.Forms.ToolStripSeparator();
this.itemscripteditor = new System.Windows.Forms.ToolStripMenuItem();
this.configurationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.preferencesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuhelp = new System.Windows.Forms.ToolStripMenuItem();
@ -85,6 +87,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonopenmap = new System.Windows.Forms.ToolStripButton();
this.buttonsavemap = new System.Windows.Forms.ToolStripButton();
this.buttonmapoptions = new System.Windows.Forms.ToolStripButton();
this.buttonscripteditor = new System.Windows.Forms.ToolStripButton();
this.buttonundo = new System.Windows.Forms.ToolStripButton();
this.buttonredo = new System.Windows.Forms.ToolStripButton();
this.buttoncut = new System.Windows.Forms.ToolStripButton();
@ -164,17 +167,17 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem1
//
toolStripMenuItem1.Name = "toolStripMenuItem1";
toolStripMenuItem1.Size = new System.Drawing.Size(198, 6);
toolStripMenuItem1.Size = new System.Drawing.Size(187, 6);
//
// toolStripMenuItem2
//
toolStripMenuItem2.Name = "toolStripMenuItem2";
toolStripMenuItem2.Size = new System.Drawing.Size(198, 6);
toolStripMenuItem2.Size = new System.Drawing.Size(187, 6);
//
// toolStripMenuItem3
//
toolStripMenuItem3.Name = "toolStripMenuItem3";
toolStripMenuItem3.Size = new System.Drawing.Size(198, 6);
toolStripMenuItem3.Size = new System.Drawing.Size(187, 6);
//
// toolStripSeparator1
//
@ -185,7 +188,7 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripSeparator4
//
toolStripSeparator4.Name = "toolStripSeparator4";
toolStripSeparator4.Size = new System.Drawing.Size(194, 6);
toolStripSeparator4.Size = new System.Drawing.Size(183, 6);
//
// toolStripSeparator9
//
@ -208,7 +211,7 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripSeparator11
//
toolStripSeparator11.Name = "toolStripSeparator11";
toolStripSeparator11.Size = new System.Drawing.Size(162, 6);
toolStripSeparator11.Size = new System.Drawing.Size(151, 6);
//
// toolstripSeperator1
//
@ -219,7 +222,7 @@ namespace CodeImp.DoomBuilder.Windows
// toolstripSeperator6
//
toolstripSeperator6.Name = "toolstripSeperator6";
toolstripSeperator6.Size = new System.Drawing.Size(162, 6);
toolstripSeperator6.Size = new System.Drawing.Size(151, 6);
//
// toolStripSeparator7
//
@ -236,12 +239,12 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem4
//
toolStripMenuItem4.Name = "toolStripMenuItem4";
toolStripMenuItem4.Size = new System.Drawing.Size(161, 6);
toolStripMenuItem4.Size = new System.Drawing.Size(150, 6);
//
// toolStripSeparator2
//
toolStripSeparator2.Name = "toolStripSeparator2";
toolStripSeparator2.Size = new System.Drawing.Size(164, 6);
toolStripSeparator2.Size = new System.Drawing.Size(153, 6);
//
// buttoneditmodesseperator
//
@ -294,7 +297,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemnewmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.File;
this.itemnewmap.Name = "itemnewmap";
this.itemnewmap.ShortcutKeyDisplayString = "";
this.itemnewmap.Size = new System.Drawing.Size(201, 22);
this.itemnewmap.Size = new System.Drawing.Size(190, 22);
this.itemnewmap.Tag = "builder_newmap";
this.itemnewmap.Text = "New Map";
this.itemnewmap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -303,7 +306,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemopenmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.OpenMap;
this.itemopenmap.Name = "itemopenmap";
this.itemopenmap.Size = new System.Drawing.Size(201, 22);
this.itemopenmap.Size = new System.Drawing.Size(190, 22);
this.itemopenmap.Tag = "builder_openmap";
this.itemopenmap.Text = "Open Map...";
this.itemopenmap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -311,7 +314,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemclosemap
//
this.itemclosemap.Name = "itemclosemap";
this.itemclosemap.Size = new System.Drawing.Size(201, 22);
this.itemclosemap.Size = new System.Drawing.Size(190, 22);
this.itemclosemap.Tag = "builder_closemap";
this.itemclosemap.Text = "Close Map";
this.itemclosemap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -320,7 +323,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemsavemap.Image = global::CodeImp.DoomBuilder.Properties.Resources.SaveMap;
this.itemsavemap.Name = "itemsavemap";
this.itemsavemap.Size = new System.Drawing.Size(201, 22);
this.itemsavemap.Size = new System.Drawing.Size(190, 22);
this.itemsavemap.Tag = "builder_savemap";
this.itemsavemap.Text = "Save Map";
this.itemsavemap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -328,7 +331,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemsavemapas
//
this.itemsavemapas.Name = "itemsavemapas";
this.itemsavemapas.Size = new System.Drawing.Size(201, 22);
this.itemsavemapas.Size = new System.Drawing.Size(190, 22);
this.itemsavemapas.Tag = "builder_savemapas";
this.itemsavemapas.Text = "Save Map As...";
this.itemsavemapas.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -336,7 +339,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemsavemapinto
//
this.itemsavemapinto.Name = "itemsavemapinto";
this.itemsavemapinto.Size = new System.Drawing.Size(201, 22);
this.itemsavemapinto.Size = new System.Drawing.Size(190, 22);
this.itemsavemapinto.Tag = "builder_savemapinto";
this.itemsavemapinto.Text = "Save Map Into...";
this.itemsavemapinto.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -344,13 +347,13 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(198, 6);
this.toolStripMenuItem5.Size = new System.Drawing.Size(187, 6);
//
// itemtestmap
//
this.itemtestmap.Image = global::CodeImp.DoomBuilder.Properties.Resources.Test;
this.itemtestmap.Name = "itemtestmap";
this.itemtestmap.Size = new System.Drawing.Size(201, 22);
this.itemtestmap.Size = new System.Drawing.Size(190, 22);
this.itemtestmap.Tag = "builder_testmap";
this.itemtestmap.Text = "Test Map";
this.itemtestmap.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -359,13 +362,13 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemnorecent.Enabled = false;
this.itemnorecent.Name = "itemnorecent";
this.itemnorecent.Size = new System.Drawing.Size(201, 22);
this.itemnorecent.Size = new System.Drawing.Size(190, 22);
this.itemnorecent.Text = "No recently opened files";
//
// itemexit
//
this.itemexit.Name = "itemexit";
this.itemexit.Size = new System.Drawing.Size(201, 22);
this.itemexit.Size = new System.Drawing.Size(190, 22);
this.itemexit.Text = "Exit";
this.itemexit.Click += new System.EventHandler(this.itemexit_Click);
//
@ -395,7 +398,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemundo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Undo;
this.itemundo.Name = "itemundo";
this.itemundo.Size = new System.Drawing.Size(165, 22);
this.itemundo.Size = new System.Drawing.Size(154, 22);
this.itemundo.Tag = "builder_undo";
this.itemundo.Text = "Undo";
this.itemundo.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -404,7 +407,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemredo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Redo;
this.itemredo.Name = "itemredo";
this.itemredo.Size = new System.Drawing.Size(165, 22);
this.itemredo.Size = new System.Drawing.Size(154, 22);
this.itemredo.Tag = "builder_redo";
this.itemredo.Text = "Redo";
this.itemredo.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -412,13 +415,13 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem7
//
this.toolStripMenuItem7.Name = "toolStripMenuItem7";
this.toolStripMenuItem7.Size = new System.Drawing.Size(162, 6);
this.toolStripMenuItem7.Size = new System.Drawing.Size(151, 6);
//
// itemcut
//
this.itemcut.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut;
this.itemcut.Name = "itemcut";
this.itemcut.Size = new System.Drawing.Size(165, 22);
this.itemcut.Size = new System.Drawing.Size(154, 22);
this.itemcut.Tag = "builder_cutselection";
this.itemcut.Text = "Cut";
this.itemcut.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -427,7 +430,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemcopy.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy;
this.itemcopy.Name = "itemcopy";
this.itemcopy.Size = new System.Drawing.Size(165, 22);
this.itemcopy.Size = new System.Drawing.Size(154, 22);
this.itemcopy.Tag = "builder_copyselection";
this.itemcopy.Text = "Copy";
this.itemcopy.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -436,7 +439,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itempaste.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste;
this.itempaste.Name = "itempaste";
this.itempaste.Size = new System.Drawing.Size(165, 22);
this.itempaste.Size = new System.Drawing.Size(154, 22);
this.itempaste.Tag = "builder_pasteselection";
this.itempaste.Text = "Paste";
this.itempaste.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -447,7 +450,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemsnaptogrid.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemsnaptogrid.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid4;
this.itemsnaptogrid.Name = "itemsnaptogrid";
this.itemsnaptogrid.Size = new System.Drawing.Size(165, 22);
this.itemsnaptogrid.Size = new System.Drawing.Size(154, 22);
this.itemsnaptogrid.Tag = "builder_togglesnap";
this.itemsnaptogrid.Text = "Snap to Grid";
this.itemsnaptogrid.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -458,7 +461,7 @@ namespace CodeImp.DoomBuilder.Windows
this.itemautomerge.CheckState = System.Windows.Forms.CheckState.Checked;
this.itemautomerge.Image = global::CodeImp.DoomBuilder.Properties.Resources.mergegeometry2;
this.itemautomerge.Name = "itemautomerge";
this.itemautomerge.Size = new System.Drawing.Size(165, 22);
this.itemautomerge.Size = new System.Drawing.Size(154, 22);
this.itemautomerge.Tag = "builder_toggleautomerge";
this.itemautomerge.Text = "Merge Geometry";
this.itemautomerge.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -466,12 +469,12 @@ namespace CodeImp.DoomBuilder.Windows
// toolStripMenuItem6
//
this.toolStripMenuItem6.Name = "toolStripMenuItem6";
this.toolStripMenuItem6.Size = new System.Drawing.Size(162, 6);
this.toolStripMenuItem6.Size = new System.Drawing.Size(151, 6);
//
// itemgridinc
//
this.itemgridinc.Name = "itemgridinc";
this.itemgridinc.Size = new System.Drawing.Size(165, 22);
this.itemgridinc.Size = new System.Drawing.Size(154, 22);
this.itemgridinc.Tag = "builder_gridinc";
this.itemgridinc.Text = "Increase Grid";
this.itemgridinc.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -479,7 +482,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgriddec
//
this.itemgriddec.Name = "itemgriddec";
this.itemgriddec.Size = new System.Drawing.Size(165, 22);
this.itemgriddec.Size = new System.Drawing.Size(154, 22);
this.itemgriddec.Tag = "builder_griddec";
this.itemgriddec.Text = "Decrease Grid";
this.itemgriddec.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -488,7 +491,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemgridsetup.Image = global::CodeImp.DoomBuilder.Properties.Resources.Grid2;
this.itemgridsetup.Name = "itemgridsetup";
this.itemgridsetup.Size = new System.Drawing.Size(165, 22);
this.itemgridsetup.Size = new System.Drawing.Size(154, 22);
this.itemgridsetup.Tag = "builder_gridsetup";
this.itemgridsetup.Text = "Grid Setup...";
this.itemgridsetup.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -497,7 +500,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.itemmapoptions.Image = global::CodeImp.DoomBuilder.Properties.Resources.Properties;
this.itemmapoptions.Name = "itemmapoptions";
this.itemmapoptions.Size = new System.Drawing.Size(165, 22);
this.itemmapoptions.Size = new System.Drawing.Size(154, 22);
this.itemmapoptions.Tag = "builder_mapoptions";
this.itemmapoptions.Text = "Map Options....";
this.itemmapoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -512,6 +515,8 @@ namespace CodeImp.DoomBuilder.Windows
//
this.menutools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.itemreloadresources,
this.toolStripMenuItem8,
this.itemscripteditor,
toolStripSeparator4,
this.configurationToolStripMenuItem,
this.preferencesToolStripMenuItem});
@ -522,15 +527,29 @@ namespace CodeImp.DoomBuilder.Windows
// itemreloadresources
//
this.itemreloadresources.Name = "itemreloadresources";
this.itemreloadresources.Size = new System.Drawing.Size(197, 22);
this.itemreloadresources.Size = new System.Drawing.Size(186, 22);
this.itemreloadresources.Tag = "builder_reloadresources";
this.itemreloadresources.Text = "Reload Resources";
this.itemreloadresources.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// toolStripMenuItem8
//
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
this.toolStripMenuItem8.Size = new System.Drawing.Size(183, 6);
//
// itemscripteditor
//
this.itemscripteditor.Image = global::CodeImp.DoomBuilder.Properties.Resources.Script2;
this.itemscripteditor.Name = "itemscripteditor";
this.itemscripteditor.Size = new System.Drawing.Size(186, 22);
this.itemscripteditor.Tag = "builder_openscripteditor";
this.itemscripteditor.Text = "Script Editor";
this.itemscripteditor.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// configurationToolStripMenuItem
//
this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem";
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.configurationToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.configurationToolStripMenuItem.Tag = "builder_configuration";
this.configurationToolStripMenuItem.Text = "Game Configurations...";
this.configurationToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -538,7 +557,7 @@ namespace CodeImp.DoomBuilder.Windows
// preferencesToolStripMenuItem
//
this.preferencesToolStripMenuItem.Name = "preferencesToolStripMenuItem";
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(197, 22);
this.preferencesToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.preferencesToolStripMenuItem.Tag = "builder_preferences";
this.preferencesToolStripMenuItem.Text = "Preferences...";
this.preferencesToolStripMenuItem.Click += new System.EventHandler(this.InvokeTaggedAction);
@ -554,7 +573,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemhelpabout
//
this.itemhelpabout.Name = "itemhelpabout";
this.itemhelpabout.Size = new System.Drawing.Size(191, 22);
this.itemhelpabout.Size = new System.Drawing.Size(180, 22);
this.itemhelpabout.Text = "About Doom Builder...";
this.itemhelpabout.Click += new System.EventHandler(this.itemhelpabout_Click);
//
@ -567,6 +586,7 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonsavemap,
toolStripSeparator3,
this.buttonmapoptions,
this.buttonscripteditor,
toolStripSeparator10,
this.buttonundo,
this.buttonredo,
@ -639,6 +659,17 @@ namespace CodeImp.DoomBuilder.Windows
this.buttonmapoptions.Text = "Map Options";
this.buttonmapoptions.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonscripteditor
//
this.buttonscripteditor.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonscripteditor.Image = global::CodeImp.DoomBuilder.Properties.Resources.Script2;
this.buttonscripteditor.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonscripteditor.Name = "buttonscripteditor";
this.buttonscripteditor.Size = new System.Drawing.Size(23, 22);
this.buttonscripteditor.Tag = "builder_openscripteditor";
this.buttonscripteditor.Text = "Open Script Editor";
this.buttonscripteditor.Click += new System.EventHandler(this.InvokeTaggedAction);
//
// buttonundo
//
this.buttonundo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -921,7 +952,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid1024
//
this.itemgrid1024.Name = "itemgrid1024";
this.itemgrid1024.Size = new System.Drawing.Size(164, 22);
this.itemgrid1024.Size = new System.Drawing.Size(153, 22);
this.itemgrid1024.Tag = "1024";
this.itemgrid1024.Text = "1024 mp";
this.itemgrid1024.Click += new System.EventHandler(this.itemgridsize_Click);
@ -929,7 +960,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid512
//
this.itemgrid512.Name = "itemgrid512";
this.itemgrid512.Size = new System.Drawing.Size(164, 22);
this.itemgrid512.Size = new System.Drawing.Size(153, 22);
this.itemgrid512.Tag = "512";
this.itemgrid512.Text = "512 mp";
this.itemgrid512.Click += new System.EventHandler(this.itemgridsize_Click);
@ -937,7 +968,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid256
//
this.itemgrid256.Name = "itemgrid256";
this.itemgrid256.Size = new System.Drawing.Size(164, 22);
this.itemgrid256.Size = new System.Drawing.Size(153, 22);
this.itemgrid256.Tag = "256";
this.itemgrid256.Text = "256 mp";
this.itemgrid256.Click += new System.EventHandler(this.itemgridsize_Click);
@ -945,7 +976,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid128
//
this.itemgrid128.Name = "itemgrid128";
this.itemgrid128.Size = new System.Drawing.Size(164, 22);
this.itemgrid128.Size = new System.Drawing.Size(153, 22);
this.itemgrid128.Tag = "128";
this.itemgrid128.Text = "128 mp";
this.itemgrid128.Click += new System.EventHandler(this.itemgridsize_Click);
@ -953,7 +984,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid64
//
this.itemgrid64.Name = "itemgrid64";
this.itemgrid64.Size = new System.Drawing.Size(164, 22);
this.itemgrid64.Size = new System.Drawing.Size(153, 22);
this.itemgrid64.Tag = "64";
this.itemgrid64.Text = "64 mp";
this.itemgrid64.Click += new System.EventHandler(this.itemgridsize_Click);
@ -961,7 +992,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid32
//
this.itemgrid32.Name = "itemgrid32";
this.itemgrid32.Size = new System.Drawing.Size(164, 22);
this.itemgrid32.Size = new System.Drawing.Size(153, 22);
this.itemgrid32.Tag = "32";
this.itemgrid32.Text = "32 mp";
this.itemgrid32.Click += new System.EventHandler(this.itemgridsize_Click);
@ -969,7 +1000,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid16
//
this.itemgrid16.Name = "itemgrid16";
this.itemgrid16.Size = new System.Drawing.Size(164, 22);
this.itemgrid16.Size = new System.Drawing.Size(153, 22);
this.itemgrid16.Tag = "16";
this.itemgrid16.Text = "16 mp";
this.itemgrid16.Click += new System.EventHandler(this.itemgridsize_Click);
@ -977,7 +1008,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid8
//
this.itemgrid8.Name = "itemgrid8";
this.itemgrid8.Size = new System.Drawing.Size(164, 22);
this.itemgrid8.Size = new System.Drawing.Size(153, 22);
this.itemgrid8.Tag = "8";
this.itemgrid8.Text = "8 mp";
this.itemgrid8.Click += new System.EventHandler(this.itemgridsize_Click);
@ -985,7 +1016,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgrid4
//
this.itemgrid4.Name = "itemgrid4";
this.itemgrid4.Size = new System.Drawing.Size(164, 22);
this.itemgrid4.Size = new System.Drawing.Size(153, 22);
this.itemgrid4.Tag = "4";
this.itemgrid4.Text = "4 mp";
this.itemgrid4.Click += new System.EventHandler(this.itemgridsize_Click);
@ -993,7 +1024,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemgridcustom
//
this.itemgridcustom.Name = "itemgridcustom";
this.itemgridcustom.Size = new System.Drawing.Size(164, 22);
this.itemgridcustom.Size = new System.Drawing.Size(153, 22);
this.itemgridcustom.Text = "Customize...";
this.itemgridcustom.Click += new System.EventHandler(this.itemgridcustom_Click);
//
@ -1032,7 +1063,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom200
//
this.itemzoom200.Name = "itemzoom200";
this.itemzoom200.Size = new System.Drawing.Size(167, 22);
this.itemzoom200.Size = new System.Drawing.Size(156, 22);
this.itemzoom200.Tag = "200";
this.itemzoom200.Text = "200%";
this.itemzoom200.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1040,7 +1071,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom100
//
this.itemzoom100.Name = "itemzoom100";
this.itemzoom100.Size = new System.Drawing.Size(167, 22);
this.itemzoom100.Size = new System.Drawing.Size(156, 22);
this.itemzoom100.Tag = "100";
this.itemzoom100.Text = "100%";
this.itemzoom100.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1048,7 +1079,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom50
//
this.itemzoom50.Name = "itemzoom50";
this.itemzoom50.Size = new System.Drawing.Size(167, 22);
this.itemzoom50.Size = new System.Drawing.Size(156, 22);
this.itemzoom50.Tag = "50";
this.itemzoom50.Text = "50%";
this.itemzoom50.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1056,7 +1087,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom25
//
this.itemzoom25.Name = "itemzoom25";
this.itemzoom25.Size = new System.Drawing.Size(167, 22);
this.itemzoom25.Size = new System.Drawing.Size(156, 22);
this.itemzoom25.Tag = "25";
this.itemzoom25.Text = "25%";
this.itemzoom25.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1064,7 +1095,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom10
//
this.itemzoom10.Name = "itemzoom10";
this.itemzoom10.Size = new System.Drawing.Size(167, 22);
this.itemzoom10.Size = new System.Drawing.Size(156, 22);
this.itemzoom10.Tag = "10";
this.itemzoom10.Text = "10%";
this.itemzoom10.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1072,7 +1103,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoom5
//
this.itemzoom5.Name = "itemzoom5";
this.itemzoom5.Size = new System.Drawing.Size(167, 22);
this.itemzoom5.Size = new System.Drawing.Size(156, 22);
this.itemzoom5.Tag = "5";
this.itemzoom5.Text = "5%";
this.itemzoom5.Click += new System.EventHandler(this.itemzoomto_Click);
@ -1080,7 +1111,7 @@ namespace CodeImp.DoomBuilder.Windows
// itemzoomfittoscreen
//
this.itemzoomfittoscreen.Name = "itemzoomfittoscreen";
this.itemzoomfittoscreen.Size = new System.Drawing.Size(167, 22);
this.itemzoomfittoscreen.Size = new System.Drawing.Size(156, 22);
this.itemzoomfittoscreen.Text = "Fit to screen";
this.itemzoomfittoscreen.Click += new System.EventHandler(this.itemzoomfittoscreen_Click);
//
@ -1346,5 +1377,8 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ToolStripButton buttonviewbrightness;
private System.Windows.Forms.ToolStripButton buttonviewfloors;
private System.Windows.Forms.ToolStripButton buttonviewceilings;
private System.Windows.Forms.ToolStripMenuItem itemscripteditor;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem8;
private System.Windows.Forms.ToolStripButton buttonscripteditor;
}
}

View file

@ -1734,10 +1734,12 @@ namespace CodeImp.DoomBuilder.Windows
{
// Enable/disable items
itemreloadresources.Enabled = (General.Map != null);
itemscripteditor.Enabled = (General.Map != null);
// Toolbar icons
thingfilters.Enabled = (General.Map != null);
buttonthingsfilter.Enabled = (General.Map != null);
buttonscripteditor.Enabled = (General.Map != null);
UpdateThingsFilters();
}
@ -1807,7 +1809,7 @@ namespace CodeImp.DoomBuilder.Windows
// Done
prefform.Dispose();
}
#endregion
#region ================== Info Panels

View file

@ -1,61 +0,0 @@
namespace CodeImp.DoomBuilder.Windows
{
partial class ScriptEditTestForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if(disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.scripts = new CodeImp.DoomBuilder.Controls.ScriptEditorPanel();
this.SuspendLayout();
//
// scripts
//
this.scripts.Dock = System.Windows.Forms.DockStyle.Fill;
this.scripts.Location = new System.Drawing.Point(0, 0);
this.scripts.Name = "scripts";
this.scripts.Size = new System.Drawing.Size(667, 511);
this.scripts.TabIndex = 0;
//
// ScriptEditTestForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(667, 511);
this.Controls.Add(this.scripts);
this.Name = "ScriptEditTestForm";
this.Text = "ScriptEditTestForm";
this.ResumeLayout(false);
}
#endregion
private CodeImp.DoomBuilder.Controls.ScriptEditorPanel scripts;
}
}

View file

@ -1,41 +0,0 @@
#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.Data;
using CodeImp.DoomBuilder.Map;
#endregion
namespace CodeImp.DoomBuilder.Windows
{
public partial class ScriptEditTestForm : Form
{
public ScriptEditTestForm()
{
InitializeComponent();
}
}
}

View file

@ -0,0 +1,63 @@
namespace CodeImp.DoomBuilder.Windows
{
partial class ScriptEditorForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if(disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScriptEditorForm));
this.editor = new CodeImp.DoomBuilder.Controls.ScriptEditorPanel();
this.SuspendLayout();
//
// editor
//
this.editor.BackColor = System.Drawing.SystemColors.Control;
this.editor.Dock = System.Windows.Forms.DockStyle.Fill;
this.editor.Location = new System.Drawing.Point(0, 0);
this.editor.Name = "editor";
this.editor.Size = new System.Drawing.Size(729, 495);
this.editor.TabIndex = 0;
//
// ScriptEditorForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(729, 495);
this.Controls.Add(this.editor);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ScriptEditorForm";
this.Opacity = 0;
this.Text = "Doom Builder Script Editor";
this.Shown += new System.EventHandler(this.ScriptEditorForm_Shown);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ScriptEditorForm_FormClosing);
this.ResumeLayout(false);
}
#endregion
private CodeImp.DoomBuilder.Controls.ScriptEditorPanel editor;
}
}

View file

@ -0,0 +1,113 @@
#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 CodeImp.DoomBuilder.Map;
using System.IO;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Controls;
#endregion
namespace CodeImp.DoomBuilder.Windows
{
internal partial class ScriptEditorForm : DelayedForm
{
#region ================== Variables
private bool appclose;
#endregion
#region ================== Properties
public ScriptEditorPanel Editor { get { return editor; } }
#endregion
#region ================== Constructor
// Constructor
public ScriptEditorForm()
{
InitializeComponent();
editor.Initialize();
}
#endregion
#region ================== Methods
// This asks to save files and returns the result
// Also does implicit saves
// Returns false when cancelled by the user
public bool AskSaveAll()
{
// Implicit-save the script lumps
editor.ImplicitSave();
// Save other scripts
return editor.AskSaveAll();
}
// Close the window
new public void Close()
{
appclose = true;
base.Close();
}
#endregion
#region ================== Events
// Window is shown
private void ScriptEditorForm_Shown(object sender, EventArgs e)
{
// Focus to script editor
editor.ForceFocus();
}
// Window is closing
private void ScriptEditorForm_FormClosing(object sender, FormClosingEventArgs e)
{
// Only when closed by the user
if(!appclose)
{
// Ask to save scripts
if(AskSaveAll())
{
// Let the general call close the editor
General.Map.CloseScriptEditor(true);
}
else
{
// Cancel
e.Cancel = true;
}
}
}
#endregion
}
}

View file

@ -117,7 +117,29 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AACQWzEBkFsxRJBbMWiQWzGBkFsxnpBbMbqQWzHYkFsx9ZVhOf+aaUH/o3RP/62CX/+QWzG4kFsxCgAA
AAAAAAAAlF8zKriQbf/WuqP/38az/+fUw//u39P/9eri//v07//9+vb///79//vr3//77+b/wZ2A/5Rf
MzAAAAAAAAAAAJlkNknHpIX////////////////////////+/P/++/f//vfx//728f/krob/+ujb/86v
lf+ZZDZLAAAAAAAAAACeaTkdnmk57bSFWf/ZpXv/2J5v/9ebav/YlmP/1pJd/9SPWf/Tjlf/4p1p//rj
0f/Yu6L/nmk5YQAAAAAAAAAApG88AaRvPHLVroz//fDl//bGof/2zqz/+NS0//bYu//127//997D//rk
zP/99ez/4s66/6RvPH0AAAAAAAAAAAAAAACqdUAGt4ZW//7+/f/ozrT/z7ae/861n//OtZ//zreg/9a7
pP/63MP//eve/+zczf+qdUCgAAAAAAAAAAAAAAAAsXtDA7mGUv/+/Pn/99q9/+3Rtf/u0rf/8tS8//LV
u//z173/+dzC//vn1P/17eL/sXtDywAAAAAAAAAAAAAAAAAAAAC5hUv//vv3/+/Tuf/QuaD/z7ig/8+3
of/PuKD/z7ig//HWvP/74sv//Pn1/7eCR/cAAAAAAAAAAAAAAAAAAAAAvYhL8/z28P/538f/8dW3//LV
uP/y1Lr/8ta8//LWu//43MP/++DJ///8+v/BjVP/AAAAAAAAAAAAAAAAAAAAAMSOTrr159j/+eTR/9K4
n//SuZ//07mh/9O7o//Tu6P/8ta+//vhyP///fv/yJRX/8SOTgEAAAAAAAAAAAAAAADKlFKJ8NnB//vt
4f/42b//+NvB//fcw//43sX/99/H//ffyv/65dD///79/8uPWv/KlFLjypRSEgAAAAAAAAAA0JpVae3Q
sv//9vD/6NG7/8+7qP/Pu6v/z76u/8/AsP/Xx7j//Orb/////f/SnXH/7tnB/9CaVc0AAAAAAAAAANWf
WFPryqX///37//vn0//66NX/+ufY//vr3f/77uD//PDj//zw5P//////4KBw///7+f/fuIf/AAAAAAAA
AADapFtE68aa///////87+L//fDn//3x6//99e7//fjx//369////Pr///////779//02sD/2qRb1gAA
AAAAAAAA3qhdLurAjP///////////////////////fn0//vz6v/469n/+ObT//Xfxv/py6b/3qhd3N6o
XSEAAAAAAAAAAOKsXwvirF+Z6ryB/+i3d//msm3/5LBo/+KsX+HirF/K4qxfqOKsX6PirF+J4qxfbuKs
XxYAAAAAAAOsQQADrEEAA6xBAAOsQQADrEGAA6xBgAOsQcADrEHAA6xBwAGsQcAArEHAAKxBwACsQcAA
rEHAAKxBwAGsQQ==
</value>
</data>
</root>