Added, Script Editor: added "Script Navigator" tab. It shows and allows to open text resources loaded by the editor.

WARNING: because of the large amount of added/modified code, bugs are possible, so backup your resources, save often and report bugs.
This commit is contained in:
MaxED 2016-11-24 11:55:11 +00:00
parent 36ff694e79
commit 894279b4ba
72 changed files with 4890 additions and 660 deletions

View file

@ -24,7 +24,7 @@ argumentdelimiter = ",";
terminator = ";";
keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K";
snippetsdir = "acs";
scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate
scripttype = "ACS";
keywords
{

View file

@ -12,6 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/GLDEFS";
scripttype = "GLDEFS";
keywords
{

View file

@ -12,7 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/MODELDEF";
scripttype = 2; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate
scripttype = "MODELDEF";
keywords
{

View file

@ -24,7 +24,7 @@ argumentdelimiter = ",";
terminator = ";";
keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K";
snippetsdir = "acs";
scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate
scripttype = "ACS";
keywords
{

View file

@ -25,7 +25,7 @@ terminator = ";";
extrawordchars = "#"; // Extra characters to be treated as a part of a word by the Script Editor
keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K";
snippetsdir = "acs";
scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate
scripttype = "ACS";
keywords
{

View file

@ -0,0 +1,50 @@
/*******************************************************************\
GZDoom Builder Script highlighting definitions for ANIMDEFS
\*******************************************************************/
// Editor settings
description = "ZDoom ANIMDEFS";
codepage = 0;
extensions = "txt";
casesensitive = false;
codeblockopen = "{";
codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/ANIMDEFS";
scripttype = "ANIMDEFS";
properties
{
texture;
flat;
tics;
rand;
range;
fit;
switch;
sound;
animateddoor;
pic;
warp;
warp2;
on;
off;
opensound;
closesound;
cameratexture;
worldpanning;
}
constants
{
allowdecals;
doom;
heretic;
hexen;
strife;
optional;
random;
oscillate;
}

View file

@ -11,6 +11,7 @@ terminator = ";";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/CVARINFO";
scripttype = "CVARINFO";
properties
{

View file

@ -19,7 +19,7 @@ argumentdelimiter = ",";
terminator = ";";
extrawordchars = "#.$"; // Extra characters to be treated as a part of a word by the Script Editor
keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K";
scripttype = 3; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate
scripttype = "DECORATE";
keywords
{

View file

@ -9,16 +9,20 @@ extensions = "txt";
casesensitive = false;
codeblockopen = "{";
codeblockclose = "}";
extrawordchars = "$"; // Extra characters to be treated as a part of a word by the Script Editor
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/LOCKDEFS";
scripttype = "LOCKDEFS";
keywords
{
$Title = "//$Title \"[EP]\"";
Lock = "Lock locknumber [game]";
Any = "Any { keyname1 keyname2 ... }";
Message = "Message \"door message\"";
RemoteMessage = "RemoteMessage \"door message\"";
Any = "Any { [EP] }";
Message = "Message \"[EP]\"";
RemoteMessage = "RemoteMessage \"[EP]\"";
MapColor = "MapColor r g b";
LockedSound = "LockedSound soundname";
}

View file

@ -12,6 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/MAPINFO";
scripttype = "MAPINFO";
properties
{

View file

@ -12,6 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/MENUDEF";
scripttype = "MENUDEF";
properties
{

View file

@ -10,6 +10,7 @@ casesensitive = false;
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/REVERBS";
scripttype = "REVERBS";
keywords
{
@ -49,4 +50,10 @@ keywords
RoomHF = "RoomHF int";
RoomLF = "RoomLF int";
RoomRolloffFactor = "RoomRolloffFactor float";
}
constants
{
true;
false;
}

View file

@ -12,6 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/SBARINFO";
scripttype = "SBARINFO";
keywords
{

View file

@ -12,6 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/SNDINFO";
scripttype = "SNDINFO";
properties
{

View file

@ -10,6 +10,7 @@ casesensitive = false;
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/SNDSEQ";
scripttype = "SNDSEQ";
keywords
{
@ -22,7 +23,7 @@ keywords
delayonce = "delayonce <time>";
delayrand = "delayrand <min> <max>";
volume = "volume <volume>";
//volumerel = "volumerel";
volumerel = "volumerel <volume>";
volumerand = "volumerand <min> <max>";
attenuation = "attenuation <mode>";
door = "door <index>";

View file

@ -12,6 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/TERRAIN";
scripttype = "TERRAIN";
properties
{

View file

@ -12,6 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/TEXTURES";
scripttype = "TEXTURES";
properties
{

View file

@ -12,6 +12,7 @@ lexer = 35; // CPP-style, case-insensitive
codeblockopen = "{";
codeblockclose = "}";
terminator = ";";
scripttype = "USDF";
keywords
{

View file

@ -12,6 +12,7 @@ codeblockclose = "}";
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/VOXELDEF";
scripttype = "VOXELDEF";
properties
{

View file

@ -0,0 +1,23 @@
/*******************************************************************\
GZDoom Builder Script highlighting definitions for X11R6RGB
\*******************************************************************/
// Editor settings
description = "ZDoom X11R6RGB";
codepage = 0;
extensions = "txt";
casesensitive = false;
insertcase = 1; // 0=Normal, 1=Lowercase, 2=Uppercase
lexer = 35; // CPP-style, case-insensitive
keywordhelp = "http://zdoom.org/wiki/X11R6RGB";
scripttype = "X11R6RGB";
keywords
{
}
constants
{
}

View file

@ -25,7 +25,7 @@ terminator = ";";
extrawordchars = "#"; // Extra characters to be treated as a part of a word by the Script Editor
keywordhelp = "http://www.zdoom.org/wiki/index.php?title=%K";
snippetsdir = "acs";
scripttype = 1; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate
scripttype = "ACS";
keywords
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 810 B

After

Width:  |  Height:  |  Size: 793 B

View file

@ -698,6 +698,9 @@
<EmbeddedResource Include="Controls\Scripting\ScriptEditorPreviewControl.resx">
<DependentUpon>ScriptEditorPreviewControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Controls\Scripting\ScriptResourcesControl.resx">
<DependentUpon>ScriptResourcesControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Resources\SkySphere.md3" />
<None Include="Resources\ThingStatistics.png" />
<None Include="Resources\Copy.png" />
@ -706,6 +709,20 @@
<Compile Include="Actions\HintsManager.cs" />
<Compile Include="Config\AllTexturesSet.cs" />
<Compile Include="Config\FlagTranslation.cs" />
<Compile Include="Controls\Scripting\ScriptIconsManager.cs" />
<Compile Include="Controls\Scripting\ScriptResourceDocumentTab.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Scripting\ScriptResourcesControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Controls\Scripting\ScriptResourcesControl.designer.cs">
<DependentUpon>ScriptResourcesControl.cs</DependentUpon>
</Compile>
<Compile Include="Controls\VisualStudioTabControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Data\Scripting\ScriptResource.cs" />
<Compile Include="Rendering\RenderModeEnums.cs" />
<Compile Include="Config\PasteOptions.cs" />
<Compile Include="Config\ScriptDocumentSettings.cs" />
@ -899,6 +916,12 @@
<Compile Include="Rendering\VisualVertexHandle.cs" />
<Compile Include="Geometry\Line3D.cs" />
<Compile Include="Data\Scripting\ScriptHandlerAttribute.cs" />
<Compile Include="Windows\ScriptGoToLineForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Windows\ScriptGoToLineForm.Designer.cs">
<DependentUpon>ScriptGoToLineForm.cs</DependentUpon>
</Compile>
<Compile Include="ZDoom\AmbientSoundInfo.cs" />
<Compile Include="ZDoom\DecorateCategoryInfo.cs" />
<Compile Include="ZDoom\LockDefsParser.cs" />
@ -1111,6 +1134,9 @@
<EmbeddedResource Include="Windows\ExceptionDialog.resx">
<DependentUpon>ExceptionDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\ScriptGoToLineForm.resx">
<DependentUpon>ScriptGoToLineForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\TagStatisticsForm.resx">
<DependentUpon>TagStatisticsForm.cs</DependentUpon>
</EmbeddedResource>
@ -1184,6 +1210,7 @@
<None Include="Resources\ModelDisabled.png" />
<None Include="Resources\ModelFiltered.png" />
<Content Include="Resources\Model_selected.png" />
<None Include="Resources\Script.png" />
<None Include="Resources\SplitSectors.png" />
<None Include="Resources\ScriptProperty.png" />
<None Include="Resources\TextWhitespace.png" />
@ -1264,7 +1291,6 @@
<DependentUpon>AngleForm.cs</DependentUpon>
</Compile>
<Compile Include="Windows\PreferencesController.cs" />
<None Include="Resources\Script2.png" />
<None Include="Resources\ScriptCompile.png" />
<None Include="Resources\ScriptPalette.png" />
<None Include="Resources\SaveAll.png" />

View file

@ -46,6 +46,9 @@ namespace CodeImp.DoomBuilder.Config
CVARINFO,
SNDINFO,
LOCKDEFS,
MENUDEF,
SBARINFO,
USDF,
}
internal class ScriptConfiguration : IComparable<ScriptConfiguration>
@ -203,9 +206,29 @@ namespace CodeImp.DoomBuilder.Config
arrayclose = cfg.ReadSetting("arrayclose", ""); //mxd
argumentdelimiter = cfg.ReadSetting("argumentdelimiter", "");
terminator = cfg.ReadSetting("terminator", "");
scripttype = (ScriptType)cfg.ReadSetting("scripttype", (int)ScriptType.UNKNOWN); //mxd
extrawordchars = cfg.ReadSetting("extrawordchars", ""); //mxd
//mxd. Get script type...
string scripttypestr = cfg.ReadSetting("scripttype", string.Empty);
if(!string.IsNullOrEmpty(scripttypestr))
{
List<string> typenames = new List<string>(Enum.GetNames(typeof(ScriptType)));
int pos = typenames.IndexOf(scripttypestr.ToUpperInvariant());
if(pos == -1)
{
scripttype = ScriptType.UNKNOWN;
General.ErrorLogger.Add(ErrorType.Warning, "Unknown script type \"" + scripttypestr.ToUpperInvariant() + "\" in \"" + description + "\" script configuration.");
}
else
{
scripttype = (ScriptType)pos;
}
}
else
{
scripttype = ScriptType.UNKNOWN;
}
//mxd. Make braces array
if(!string.IsNullOrEmpty(functionopen)) braces.Add(functionopen[0]);
if(!string.IsNullOrEmpty(functionclose)) braces.Add(functionclose[0]);

View file

@ -8,7 +8,17 @@ namespace CodeImp.DoomBuilder.Config
public int CaretPosition;
public int FirstVisibleLine;
public string Filename;
public string ResourceLocation; // Used by ScriptResourceDocumentTab only
public ScriptType ScriptType; // Used by ScriptResourceDocumentTab only
public ScriptDocumentTabType TabType;
public bool IsActiveTab;
public long Hash;
}
internal enum ScriptDocumentTabType
{
LUMP,
RESOURCE,
FILE,
}
}

View file

@ -49,6 +49,7 @@ namespace CodeImp.DoomBuilder.Controls
// The script edit control
protected readonly ScriptEditorControl editor;
private string title; //mxd
protected ScriptDocumentTabType tabtype; //mxd
// Derived classes must set this!
protected ScriptConfiguration config;
@ -64,9 +65,10 @@ namespace CodeImp.DoomBuilder.Controls
public virtual bool IsSaveAsRequired { get { return true; } }
public virtual bool IsClosable { get { return true; } }
public virtual bool IsReconfigurable { get { return true; } }
public virtual bool IsReadOnly { get { return false; } } //mxd
public virtual string Filename { get { return null; } }
public ScriptEditorPanel Panel { get { return panel; } }
internal Scintilla Scintilla { get { return editor.Scintilla; } } //mxd
public ScriptEditorControl Editor { get { return editor; } } //mxd
public string Title { get { return title; } } //mxd
public bool IsChanged { get { return editor.IsChanged; } }
public int SelectionStart { get { return editor.SelectionStart; } set { editor.SelectionStart = value; } }
@ -92,6 +94,7 @@ namespace CodeImp.DoomBuilder.Controls
// Keep panel and config
this.panel = panel;
this.config = config; //mxd
this.BackColor = SystemColors.ControlLightLight; //mxd
// Make the script control
editor = new ScriptEditorControl();
@ -111,12 +114,21 @@ namespace CodeImp.DoomBuilder.Controls
editor.OnFindNext += panel.FindNext;
editor.OnFindPrevious += panel.FindPrevious; //mxd
editor.OnTextChanged += editor_TextChanged; //mxd
editor.OnGoToLine += panel.GoToLine; //mxd
editor.OnCompileScript -= Compile; //mxd
//mxd. Bind functionbar events
editor.OnFunctionBarDropDown += functionbar_DropDown;
//mxd. Setup styles
editor.SetupStyles(config);
//mxd. Apply panel settings
editor.ShowWhitespace = panel.ShowWhitespace;
editor.WrapLongLines = panel.WrapLongLines;
//mxd. Set icon
this.ImageIndex = panel.Icons.GetScriptIcon(config.ScriptType);
}
// Disposer
@ -129,6 +141,8 @@ namespace CodeImp.DoomBuilder.Controls
editor.OnFindNext -= panel.FindNext;
editor.OnFindPrevious -= panel.FindPrevious; //mxd
editor.OnTextChanged -= editor_TextChanged; //mxd
editor.OnGoToLine -= panel.GoToLine; //mxd
editor.OnCompileScript -= Compile; //mxd
base.Dispose(disposing);
}
@ -208,6 +222,7 @@ namespace CodeImp.DoomBuilder.Controls
editor.SetupStyles(newconfig); //mxd
List<CompilerError> errors = UpdateNavigator(); //mxd
if(panel.ActiveTab == this) panel.ShowErrors(errors, true); //mxd
this.ImageIndex = panel.Icons.GetScriptIcon(config.ScriptType); //mxd. Set icon
}
// Call this to set the tab title
@ -315,21 +330,23 @@ namespace CodeImp.DoomBuilder.Controls
}
//mxd
internal void SetViewSettings(ScriptDocumentSettings settings)
internal virtual void SetViewSettings(ScriptDocumentSettings settings)
{
if(settings.TabType != tabtype) throw new Exception("TabType mismatch!");
// Text must be exactly the same
long hash = MurmurHash2.Hash(Text);
bool applyfolding = General.Settings.ScriptShowFolding && (Scintilla.Lexer == Lexer.Cpp || Scintilla.Lexer == Lexer.CppNoCase);
bool applyfolding = General.Settings.ScriptShowFolding && (editor.Scintilla.Lexer == Lexer.Cpp || editor.Scintilla.Lexer == Lexer.CppNoCase);
if(hash == settings.Hash)
{
// Restore fold levels
if(applyfolding) ApplyFolding(settings.FoldLevels ?? GetFoldLevels());
// Restore scroll
Scintilla.FirstVisibleLine = settings.FirstVisibleLine;
editor.Scintilla.FirstVisibleLine = settings.FirstVisibleLine;
// Restore caret position
Scintilla.SetEmptySelection(settings.CaretPosition);
editor.Scintilla.SetEmptySelection(settings.CaretPosition);
}
// Do what Visual Studio does: fold all #regions
else if(applyfolding)
@ -340,7 +357,7 @@ namespace CodeImp.DoomBuilder.Controls
internal void SetDefaultViewSettings()
{
if(General.Settings.ScriptShowFolding && (Scintilla.Lexer == Lexer.Cpp || Scintilla.Lexer == Lexer.CppNoCase))
if(General.Settings.ScriptShowFolding && (editor.Scintilla.Lexer == Lexer.Cpp || editor.Scintilla.Lexer == Lexer.CppNoCase))
ApplyFolding(GetFoldLevels());
}
@ -356,7 +373,7 @@ namespace CodeImp.DoomBuilder.Controls
foreach(int level in foldlevels)
{
foreach(int line in foldlevelsarr[level])
Scintilla.Lines[line].FoldLine(FoldAction.Contract);
editor.Scintilla.Lines[line].FoldLine(FoldAction.Contract);
}
}
@ -365,9 +382,9 @@ namespace CodeImp.DoomBuilder.Controls
Dictionary<int, HashSet<int>> foldlevels = new Dictionary<int, HashSet<int>>();
int foldlevel = NativeMethods.SC_FOLDLEVELBASE;
for(int i = 0; i < Scintilla.Lines.Count; i++)
for(int i = 0; i < editor.Scintilla.Lines.Count; i++)
{
string line = Scintilla.Lines[i].Text.TrimStart();
string line = editor.Scintilla.Lines[i].Text.TrimStart();
if(line.StartsWith("#region", true, CultureInfo.InvariantCulture))
{
foldlevel++;
@ -384,17 +401,17 @@ namespace CodeImp.DoomBuilder.Controls
}
//mxd
internal ScriptDocumentSettings GetViewSettings()
internal virtual ScriptDocumentSettings GetViewSettings()
{
Dictionary<int, HashSet<int>> foldlevels = new Dictionary<int, HashSet<int>>();
for(int i = 0; i < Scintilla.Lines.Count; i++)
for(int i = 0; i < editor.Scintilla.Lines.Count; i++)
{
if(!Scintilla.Lines[i].Expanded)
if(!editor.Scintilla.Lines[i].Expanded)
{
if(!foldlevels.ContainsKey(Scintilla.Lines[i].FoldLevel))
foldlevels.Add(Scintilla.Lines[i].FoldLevel, new HashSet<int>());
foldlevels[Scintilla.Lines[i].FoldLevel].Add(i);
if(!foldlevels.ContainsKey(editor.Scintilla.Lines[i].FoldLevel))
foldlevels.Add(editor.Scintilla.Lines[i].FoldLevel, new HashSet<int>());
foldlevels[editor.Scintilla.Lines[i].FoldLevel].Add(i);
}
}
@ -402,9 +419,11 @@ namespace CodeImp.DoomBuilder.Controls
{
Filename = this.Filename,
FoldLevels = foldlevels,
CaretPosition = Scintilla.SelectionStart,
ScriptType = config.ScriptType,
CaretPosition = editor.Scintilla.SelectionStart,
TabType = tabtype,
IsActiveTab = (this.Panel.ActiveTab == this),
FirstVisibleLine = Scintilla.FirstVisibleLine,
FirstVisibleLine = editor.Scintilla.FirstVisibleLine,
Hash = MurmurHash2.Hash(Text),
};
}

View file

@ -82,6 +82,8 @@ namespace CodeImp.DoomBuilder.Controls
public delegate void OpenFindReplaceDelegate();
public delegate void FindNextDelegate();
public delegate void FindPreviousDelegate(); //mxd
public delegate void GoToLineDelegate(); //mxd
public delegate void CompileScriptDelegate(); //mxd
public event ExplicitSaveTabDelegate OnExplicitSaveTab;
public event OpenScriptBrowserDelegate OnOpenScriptBrowser;
@ -90,6 +92,8 @@ namespace CodeImp.DoomBuilder.Controls
public event FindPreviousDelegate OnFindPrevious; //mxd
public new event EventHandler OnTextChanged; //mxd
public event EventHandler OnFunctionBarDropDown; //mxd
public event GoToLineDelegate OnGoToLine; //mxd
public event CompileScriptDelegate OnCompileScript; //mxd
#endregion
@ -126,7 +130,7 @@ namespace CodeImp.DoomBuilder.Controls
public string SelectedText { get { return scriptedit.SelectedText; } } //mxd
public bool ShowWhitespace { get { return scriptedit.ViewWhitespace != WhitespaceMode.Invisible; } set { scriptedit.ViewWhitespace = value ? WhitespaceMode.VisibleAlways : WhitespaceMode.Invisible; } }
public bool WrapLongLines { get { return scriptedit.WrapMode != WrapMode.None; } set { scriptedit.WrapMode = (value ? WrapMode.Char : WrapMode.None); } }
public Scintilla Scintilla { get { return scriptedit; } } //mxd
internal Scintilla Scintilla { get { return scriptedit; } } //mxd
#endregion
@ -238,6 +242,9 @@ namespace CodeImp.DoomBuilder.Controls
// This moves the caret to a given line and ensures the line is visible
public void MoveToLine(int linenumber)
{
//mxd. Safety required
linenumber = General.Clamp(linenumber, 0, scriptedit.Lines.Count);
scriptedit.Lines[linenumber].Goto();
EnsureLineVisible(linenumber);
scriptedit.SetEmptySelection(scriptedit.Lines[linenumber].Position);
@ -735,6 +742,12 @@ namespace CodeImp.DoomBuilder.Controls
}
}
//mxd
public void DuplicateLine()
{
scriptedit.DirectMessage(NativeMethods.SCI_LINEDUPLICATE);
}
//mxd
internal List<CompilerError> UpdateNavigator(ScriptDocumentTab tab)
{
@ -883,6 +896,13 @@ namespace CodeImp.DoomBuilder.Controls
return true;
}
//mxd. F5 for Compile Script
if(keydata == Keys.F5)
{
if(OnCompileScript != null) OnCompileScript();
return true;
}
// CTRL+F for find & replace
if(keydata == (Keys.Control | Keys.F))
{
@ -890,8 +910,15 @@ namespace CodeImp.DoomBuilder.Controls
return true;
}
// CTRL+G for go to line
if(keydata == (Keys.Control | Keys.G))
{
if(OnGoToLine != null) OnGoToLine();
return true;
}
// CTRL+S for save
if(keydata == (Keys.Control | Keys.S))
if(!scriptedit.ReadOnly && keydata == (Keys.Control | Keys.S))
{
if(OnExplicitSaveTab != null) OnExplicitSaveTab();
return true;
@ -905,7 +932,7 @@ namespace CodeImp.DoomBuilder.Controls
}
// CTRL+Space to autocomplete
if(keydata == (Keys.Control | Keys.Space))
if(!scriptedit.ReadOnly && keydata == (Keys.Control | Keys.Space))
{
// Hide call tip if any
scriptedit.CallTipCancel();
@ -916,7 +943,7 @@ namespace CodeImp.DoomBuilder.Controls
}
//mxd. Tab to expand code snippet. Do it only when the text cursor is at the end of a keyword.
if(keydata == Keys.Tab && !scriptedit.AutoCActive)
if(!scriptedit.ReadOnly && keydata == Keys.Tab && !scriptedit.AutoCActive)
{
string curword = GetCurrentWord().ToLowerInvariant();
if(scriptconfig.Snippets.Contains(curword) && scriptedit.CurrentPosition == scriptedit.WordEndPosition(scriptedit.CurrentPosition, true))
@ -1041,7 +1068,7 @@ namespace CodeImp.DoomBuilder.Controls
}
}
if(General.Settings.ScriptAutoShowAutocompletion)
if(!scriptedit.ReadOnly && General.Settings.ScriptAutoShowAutocompletion)
{
// Display the autocompletion list
handler.ShowAutoCompletionList();
@ -1163,25 +1190,28 @@ namespace CodeImp.DoomBuilder.Controls
{
InsertSnippet(lines);
}
// Format editor comment?
else if(e.Text.StartsWith("$"))
else
{
string definition = scriptconfig.GetFunctionDefinition(e.Text);
if(!string.IsNullOrEmpty(definition))
{
int entrypos = definition.IndexOf(ENTRY_POSITION_MARKER, StringComparison.OrdinalIgnoreCase);
// Remove the marker
if(entrypos != -1) definition = definition.Remove(entrypos, 4);
// Replace insterted text with expanded comment
int startpos = scriptedit.WordStartPosition(scriptedit.CurrentPosition, true);
scriptedit.SelectionStart = startpos;
scriptedit.SelectionEnd = scriptedit.WordEndPosition(scriptedit.CurrentPosition, true);
scriptedit.ReplaceSelection(definition);
// Update caret position
if(entrypos != -1) scriptedit.SetEmptySelection(startpos + entrypos);
// Replace inserted text with expanded version?
if(e.Text.StartsWith("$") || entrypos != -1)
{
// Remove the marker
if(entrypos != -1) definition = definition.Remove(entrypos, 4);
// Replace insterted text with expanded comment
int startpos = scriptedit.WordStartPosition(scriptedit.CurrentPosition, true);
scriptedit.SelectionStart = startpos;
scriptedit.SelectionEnd = scriptedit.WordEndPosition(scriptedit.CurrentPosition, true);
scriptedit.ReplaceSelection(definition);
// Update caret position
if(entrypos != -1) scriptedit.SetEmptySelection(startpos + entrypos);
}
}
}
}

View file

@ -30,10 +30,10 @@ namespace CodeImp.DoomBuilder.Controls
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScriptEditorPanel));
this.tabs = new System.Windows.Forms.TabControl();
this.toolbar = new System.Windows.Forms.ToolStrip();
this.buttonnew = new System.Windows.Forms.ToolStripDropDownButton();
this.buttonopen = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.buttonsave = new System.Windows.Forms.ToolStripButton();
this.buttonsaveall = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
@ -53,7 +53,6 @@ namespace CodeImp.DoomBuilder.Controls
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.buttonscriptconfig = new System.Windows.Forms.ToolStripDropDownButton();
this.buttoncompile = new System.Windows.Forms.ToolStripButton();
this.buttonclose = new System.Windows.Forms.ToolStripButton();
this.buttonkeywordhelp = new System.Windows.Forms.ToolStripButton();
this.buttonsearch = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
@ -64,12 +63,6 @@ namespace CodeImp.DoomBuilder.Controls
this.searchwholeword = new System.Windows.Forms.ToolStripButton();
this.openfile = new System.Windows.Forms.OpenFileDialog();
this.savefile = new System.Windows.Forms.SaveFileDialog();
this.splitter = new System.Windows.Forms.SplitContainer();
this.label1 = new System.Windows.Forms.Label();
this.errorlist = new System.Windows.Forms.ListView();
this.colIndex = new System.Windows.Forms.ColumnHeader();
this.colDescription = new System.Windows.Forms.ColumnHeader();
this.colFile = new System.Windows.Forms.ColumnHeader();
this.errorimages = new System.Windows.Forms.ImageList(this.components);
this.statusbar = new System.Windows.Forms.StatusStrip();
this.statuslabel = new System.Windows.Forms.ToolStripStatusLabel();
@ -77,29 +70,66 @@ namespace CodeImp.DoomBuilder.Controls
this.scripttype = new System.Windows.Forms.ToolStripStatusLabel();
this.statusflasher = new System.Windows.Forms.Timer(this.components);
this.statusresetter = new System.Windows.Forms.Timer(this.components);
this.menustrip = new System.Windows.Forms.MenuStrip();
this.filemenuitem = new System.Windows.Forms.ToolStripMenuItem();
this.menunew = new System.Windows.Forms.ToolStripMenuItem();
this.menuopen = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.menusave = new System.Windows.Forms.ToolStripMenuItem();
this.menusaveall = new System.Windows.Forms.ToolStripMenuItem();
this.editmenuitem = new System.Windows.Forms.ToolStripMenuItem();
this.menuundo = new System.Windows.Forms.ToolStripMenuItem();
this.menuredo = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.menucut = new System.Windows.Forms.ToolStripMenuItem();
this.menucopy = new System.Windows.Forms.ToolStripMenuItem();
this.menupaste = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.menusnippets = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.menuindent = new System.Windows.Forms.ToolStripMenuItem();
this.menuunindent = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator();
this.menugotoline = new System.Windows.Forms.ToolStripMenuItem();
this.menuduplicateline = new System.Windows.Forms.ToolStripMenuItem();
this.viewmenuitem = new System.Windows.Forms.ToolStripMenuItem();
this.menuwhitespace = new System.Windows.Forms.ToolStripMenuItem();
this.menuwordwrap = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.menustayontop = new System.Windows.Forms.ToolStripMenuItem();
this.searchmenuitem = new System.Windows.Forms.ToolStripMenuItem();
this.menufind = new System.Windows.Forms.ToolStripMenuItem();
this.menufindnext = new System.Windows.Forms.ToolStripMenuItem();
this.menufindprevious = new System.Windows.Forms.ToolStripMenuItem();
this.toolsmenu = new System.Windows.Forms.ToolStripMenuItem();
this.menucompile = new System.Windows.Forms.ToolStripMenuItem();
this.scripticons = new System.Windows.Forms.ImageList(this.components);
this.projecticons = new System.Windows.Forms.ImageList(this.components);
this.mainsplitter = new CodeImp.DoomBuilder.Controls.CollapsibleSplitContainer();
this.projecttabs = new System.Windows.Forms.TabControl();
this.tabresources = new System.Windows.Forms.TabPage();
this.scriptresources = new CodeImp.DoomBuilder.Controls.ScriptResourcesControl();
this.splitter = new System.Windows.Forms.SplitContainer();
this.tabs = new CodeImp.DoomBuilder.Controls.VSTabControl();
this.label1 = new System.Windows.Forms.Label();
this.errorlist = new System.Windows.Forms.ListView();
this.colIndex = new System.Windows.Forms.ColumnHeader();
this.colDescription = new System.Windows.Forms.ColumnHeader();
this.colFile = new System.Windows.Forms.ColumnHeader();
this.toolbar.SuspendLayout();
this.statusbar.SuspendLayout();
this.menustrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.mainsplitter)).BeginInit();
this.mainsplitter.Panel1.SuspendLayout();
this.mainsplitter.Panel2.SuspendLayout();
this.mainsplitter.SuspendLayout();
this.projecttabs.SuspendLayout();
this.tabresources.SuspendLayout();
this.splitter.Panel1.SuspendLayout();
this.splitter.Panel2.SuspendLayout();
this.splitter.SuspendLayout();
this.statusbar.SuspendLayout();
this.SuspendLayout();
//
// tabs
//
this.tabs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabs.Location = new System.Drawing.Point(3, 8);
this.tabs.Margin = new System.Windows.Forms.Padding(3, 8, 3, 3);
this.tabs.Name = "tabs";
this.tabs.Padding = new System.Drawing.Point(12, 3);
this.tabs.SelectedIndex = 0;
this.tabs.Size = new System.Drawing.Size(794, 379);
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
//
this.toolbar.AllowMerge = false;
@ -107,6 +137,7 @@ namespace CodeImp.DoomBuilder.Controls
this.toolbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.buttonnew,
this.buttonopen,
this.toolStripSeparator7,
this.buttonsave,
this.buttonsaveall,
this.toolStripSeparator1,
@ -126,7 +157,6 @@ namespace CodeImp.DoomBuilder.Controls
this.toolStripSeparator4,
this.buttonscriptconfig,
this.buttoncompile,
this.buttonclose,
this.buttonkeywordhelp,
this.buttonsearch,
this.toolStripSeparator5,
@ -135,17 +165,17 @@ namespace CodeImp.DoomBuilder.Controls
this.searchnext,
this.searchmatchcase,
this.searchwholeword});
this.toolbar.Location = new System.Drawing.Point(0, 0);
this.toolbar.Location = new System.Drawing.Point(0, 24);
this.toolbar.Name = "toolbar";
this.toolbar.Size = new System.Drawing.Size(800, 25);
this.toolbar.Size = new System.Drawing.Size(928, 25);
this.toolbar.TabIndex = 1;
//
// buttonnew
//
this.buttonnew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonnew.Image = global::CodeImp.DoomBuilder.Properties.Resources.NewScript;
this.buttonnew.Image = global::CodeImp.DoomBuilder.Properties.Resources.ScriptNew;
this.buttonnew.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonnew.Margin = new System.Windows.Forms.Padding(6, 1, 0, 2);
this.buttonnew.Margin = new System.Windows.Forms.Padding(7, 1, 0, 2);
this.buttonnew.Name = "buttonnew";
this.buttonnew.Size = new System.Drawing.Size(29, 22);
this.buttonnew.Text = "New File";
@ -153,19 +183,24 @@ namespace CodeImp.DoomBuilder.Controls
// buttonopen
//
this.buttonopen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonopen.Image = global::CodeImp.DoomBuilder.Properties.Resources.OpenScript;
this.buttonopen.Image = global::CodeImp.DoomBuilder.Properties.Resources.OpenMap;
this.buttonopen.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonopen.Margin = new System.Windows.Forms.Padding(3, 1, 0, 2);
this.buttonopen.Name = "buttonopen";
this.buttonopen.Size = new System.Drawing.Size(23, 22);
this.buttonopen.Text = "Open File";
this.buttonopen.Click += new System.EventHandler(this.buttonopen_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(6, 25);
//
// buttonsave
//
this.buttonsave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonsave.Enabled = false;
this.buttonsave.Image = global::CodeImp.DoomBuilder.Properties.Resources.SaveScript;
this.buttonsave.Image = global::CodeImp.DoomBuilder.Properties.Resources.SaveMap;
this.buttonsave.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonsave.Name = "buttonsave";
this.buttonsave.Size = new System.Drawing.Size(23, 22);
@ -330,23 +365,11 @@ namespace CodeImp.DoomBuilder.Controls
this.buttoncompile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttoncompile.Image = global::CodeImp.DoomBuilder.Properties.Resources.ScriptCompile;
this.buttoncompile.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttoncompile.Margin = new System.Windows.Forms.Padding(3, 1, 0, 2);
this.buttoncompile.Name = "buttoncompile";
this.buttoncompile.Size = new System.Drawing.Size(23, 22);
this.buttoncompile.Text = "Compile Script";
this.buttoncompile.Click += new System.EventHandler(this.buttoncompile_Click);
//
// buttonclose
//
this.buttonclose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.buttonclose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.buttonclose.Image = global::CodeImp.DoomBuilder.Properties.Resources.Close;
this.buttonclose.ImageTransparentColor = System.Drawing.Color.Magenta;
this.buttonclose.Name = "buttonclose";
this.buttonclose.Size = new System.Drawing.Size(23, 22);
this.buttonclose.Text = "Close File";
this.buttonclose.Click += new System.EventHandler(this.buttonclose_Click);
//
// buttonkeywordhelp
//
this.buttonkeywordhelp.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
@ -435,12 +458,484 @@ namespace CodeImp.DoomBuilder.Controls
//
this.savefile.Title = "Save Script As";
//
// errorimages
//
this.errorimages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("errorimages.ImageStream")));
this.errorimages.TransparentColor = System.Drawing.Color.Transparent;
this.errorimages.Images.SetKeyName(0, "ScriptError3.png");
//
// statusbar
//
this.statusbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.statuslabel,
this.positionlabel,
this.scripttype});
this.statusbar.Location = new System.Drawing.Point(0, 498);
this.statusbar.Name = "statusbar";
this.statusbar.Size = new System.Drawing.Size(928, 22);
this.statusbar.TabIndex = 3;
this.statusbar.Text = "statusStrip1";
//
// statuslabel
//
this.statuslabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.statuslabel.Image = global::CodeImp.DoomBuilder.Properties.Resources.Status0;
this.statuslabel.Margin = new System.Windows.Forms.Padding(3, 3, 0, 2);
this.statuslabel.Name = "statuslabel";
this.statuslabel.Size = new System.Drawing.Size(60, 17);
this.statuslabel.Text = "Ready.";
//
// positionlabel
//
this.positionlabel.Name = "positionlabel";
this.positionlabel.Size = new System.Drawing.Size(762, 17);
this.positionlabel.Spring = true;
this.positionlabel.Text = "100 : 12 (120)";
this.positionlabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// scripttype
//
this.scripttype.Margin = new System.Windows.Forms.Padding(30, 3, 0, 2);
this.scripttype.Name = "scripttype";
this.scripttype.Size = new System.Drawing.Size(58, 17);
this.scripttype.Text = "Plain Text";
this.scripttype.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// statusflasher
//
this.statusflasher.Tick += new System.EventHandler(this.statusflasher_Tick);
//
// statusresetter
//
this.statusresetter.Tick += new System.EventHandler(this.statusresetter_Tick);
//
// menustrip
//
this.menustrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.filemenuitem,
this.editmenuitem,
this.viewmenuitem,
this.searchmenuitem,
this.toolsmenu});
this.menustrip.Location = new System.Drawing.Point(0, 0);
this.menustrip.Name = "menustrip";
this.menustrip.Size = new System.Drawing.Size(928, 24);
this.menustrip.TabIndex = 4;
this.menustrip.Text = "menuStrip1";
//
// filemenuitem
//
this.filemenuitem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menunew,
this.menuopen,
this.toolStripSeparator13,
this.menusave,
this.menusaveall});
this.filemenuitem.Name = "filemenuitem";
this.filemenuitem.Size = new System.Drawing.Size(37, 20);
this.filemenuitem.Text = "File";
this.filemenuitem.DropDownOpening += new System.EventHandler(this.filemenuitem_DropDownOpening);
//
// menunew
//
this.menunew.Image = global::CodeImp.DoomBuilder.Properties.Resources.ScriptNew;
this.menunew.Name = "menunew";
this.menunew.Size = new System.Drawing.Size(185, 22);
this.menunew.Text = "New";
//
// menuopen
//
this.menuopen.Image = global::CodeImp.DoomBuilder.Properties.Resources.OpenMap;
this.menuopen.Name = "menuopen";
this.menuopen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.menuopen.Size = new System.Drawing.Size(185, 22);
this.menuopen.Text = "Open...";
//
// toolStripSeparator13
//
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(182, 6);
//
// menusave
//
this.menusave.Image = global::CodeImp.DoomBuilder.Properties.Resources.SaveMap;
this.menusave.Name = "menusave";
this.menusave.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.menusave.Size = new System.Drawing.Size(185, 22);
this.menusave.Text = "Save";
this.menusave.Click += new System.EventHandler(this.buttonsave_Click);
//
// menusaveall
//
this.menusaveall.Image = global::CodeImp.DoomBuilder.Properties.Resources.SaveAll;
this.menusaveall.Name = "menusaveall";
this.menusaveall.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.S)));
this.menusaveall.Size = new System.Drawing.Size(185, 22);
this.menusaveall.Text = "Save all";
this.menusaveall.Click += new System.EventHandler(this.buttonsaveall_Click);
//
// editmenuitem
//
this.editmenuitem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuundo,
this.menuredo,
this.toolStripSeparator10,
this.menucut,
this.menucopy,
this.menupaste,
this.toolStripSeparator9,
this.menusnippets,
this.toolStripSeparator12,
this.menuindent,
this.menuunindent,
this.toolStripSeparator14,
this.menugotoline,
this.menuduplicateline});
this.editmenuitem.Name = "editmenuitem";
this.editmenuitem.Size = new System.Drawing.Size(39, 20);
this.editmenuitem.Text = "Edit";
this.editmenuitem.DropDownOpening += new System.EventHandler(this.editmenuitem_DropDownOpening);
//
// menuundo
//
this.menuundo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Undo;
this.menuundo.Name = "menuundo";
this.menuundo.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z)));
this.menuundo.Size = new System.Drawing.Size(188, 22);
this.menuundo.Text = "Undo";
this.menuundo.Click += new System.EventHandler(this.buttonundo_Click);
//
// menuredo
//
this.menuredo.Image = global::CodeImp.DoomBuilder.Properties.Resources.Redo;
this.menuredo.Name = "menuredo";
this.menuredo.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
this.menuredo.Size = new System.Drawing.Size(188, 22);
this.menuredo.Text = "Redo";
this.menuredo.Click += new System.EventHandler(this.buttonredo_Click);
//
// toolStripSeparator10
//
this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(185, 6);
//
// menucut
//
this.menucut.Image = global::CodeImp.DoomBuilder.Properties.Resources.Cut;
this.menucut.Name = "menucut";
this.menucut.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
this.menucut.Size = new System.Drawing.Size(188, 22);
this.menucut.Text = "Cut";
this.menucut.Click += new System.EventHandler(this.buttoncut_Click);
//
// menucopy
//
this.menucopy.Image = global::CodeImp.DoomBuilder.Properties.Resources.Copy;
this.menucopy.Name = "menucopy";
this.menucopy.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
this.menucopy.Size = new System.Drawing.Size(188, 22);
this.menucopy.Text = "Copy";
this.menucopy.Click += new System.EventHandler(this.buttoncopy_Click);
//
// menupaste
//
this.menupaste.Image = global::CodeImp.DoomBuilder.Properties.Resources.Paste;
this.menupaste.Name = "menupaste";
this.menupaste.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
this.menupaste.Size = new System.Drawing.Size(188, 22);
this.menupaste.Text = "Paste";
this.menupaste.Click += new System.EventHandler(this.buttonpaste_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(185, 6);
//
// menusnippets
//
this.menusnippets.Image = global::CodeImp.DoomBuilder.Properties.Resources.PuzzlePiece;
this.menusnippets.Name = "menusnippets";
this.menusnippets.Size = new System.Drawing.Size(188, 22);
this.menusnippets.Text = "Insert snippet";
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(185, 6);
//
// menuindent
//
this.menuindent.Image = global::CodeImp.DoomBuilder.Properties.Resources.TextIndent;
this.menuindent.Name = "menuindent";
this.menuindent.Size = new System.Drawing.Size(188, 22);
this.menuindent.Text = "Increase indentation";
this.menuindent.Click += new System.EventHandler(this.buttonindent_Click);
//
// menuunindent
//
this.menuunindent.Image = global::CodeImp.DoomBuilder.Properties.Resources.TextUnindent;
this.menuunindent.Name = "menuunindent";
this.menuunindent.Size = new System.Drawing.Size(188, 22);
this.menuunindent.Text = "Decrease indentation";
this.menuunindent.Click += new System.EventHandler(this.buttonunindent_Click);
//
// toolStripSeparator14
//
this.toolStripSeparator14.Name = "toolStripSeparator14";
this.toolStripSeparator14.Size = new System.Drawing.Size(185, 6);
//
// menugotoline
//
this.menugotoline.Name = "menugotoline";
this.menugotoline.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G)));
this.menugotoline.Size = new System.Drawing.Size(188, 22);
this.menugotoline.Text = "Go to line...";
this.menugotoline.Click += new System.EventHandler(this.menugotoline_Click);
//
// menuduplicateline
//
this.menuduplicateline.Name = "menuduplicateline";
this.menuduplicateline.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));
this.menuduplicateline.Size = new System.Drawing.Size(188, 22);
this.menuduplicateline.Text = "Duplicate line";
this.menuduplicateline.Click += new System.EventHandler(this.menuduplicateline_Click);
//
// viewmenuitem
//
this.viewmenuitem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuwhitespace,
this.menuwordwrap,
this.toolStripSeparator11,
this.menustayontop});
this.viewmenuitem.Name = "viewmenuitem";
this.viewmenuitem.Size = new System.Drawing.Size(44, 20);
this.viewmenuitem.Text = "View";
//
// menuwhitespace
//
this.menuwhitespace.CheckOnClick = true;
this.menuwhitespace.Image = global::CodeImp.DoomBuilder.Properties.Resources.TextWhitespace;
this.menuwhitespace.Name = "menuwhitespace";
this.menuwhitespace.Size = new System.Drawing.Size(165, 22);
this.menuwhitespace.Text = "Show whitespace";
this.menuwhitespace.Click += new System.EventHandler(this.buttonwhitespace_Click);
//
// menuwordwrap
//
this.menuwordwrap.CheckOnClick = true;
this.menuwordwrap.Image = global::CodeImp.DoomBuilder.Properties.Resources.WordWrap;
this.menuwordwrap.Name = "menuwordwrap";
this.menuwordwrap.Size = new System.Drawing.Size(165, 22);
this.menuwordwrap.Text = "Show word wrap";
this.menuwordwrap.Click += new System.EventHandler(this.buttonwordwrap_Click);
//
// toolStripSeparator11
//
this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(162, 6);
//
// menustayontop
//
this.menustayontop.CheckOnClick = true;
this.menustayontop.Image = global::CodeImp.DoomBuilder.Properties.Resources.Pin;
this.menustayontop.Name = "menustayontop";
this.menustayontop.Size = new System.Drawing.Size(165, 22);
this.menustayontop.Text = "Always on top";
this.menustayontop.Click += new System.EventHandler(this.menustayontop_Click);
//
// searchmenuitem
//
this.searchmenuitem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menufind,
this.menufindnext,
this.menufindprevious});
this.searchmenuitem.Name = "searchmenuitem";
this.searchmenuitem.Size = new System.Drawing.Size(54, 20);
this.searchmenuitem.Text = "Search";
this.searchmenuitem.DropDownOpening += new System.EventHandler(this.searchmenuitem_DropDownOpening);
//
// menufind
//
this.menufind.Image = global::CodeImp.DoomBuilder.Properties.Resources.Search;
this.menufind.Name = "menufind";
this.menufind.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.menufind.Size = new System.Drawing.Size(164, 22);
this.menufind.Text = "Find...";
this.menufind.Click += new System.EventHandler(this.buttonsearch_Click);
//
// menufindnext
//
this.menufindnext.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchNext;
this.menufindnext.Name = "menufindnext";
this.menufindnext.ShortcutKeys = System.Windows.Forms.Keys.F3;
this.menufindnext.Size = new System.Drawing.Size(164, 22);
this.menufindnext.Text = "Find next";
this.menufindnext.Click += new System.EventHandler(this.searchnext_Click);
//
// menufindprevious
//
this.menufindprevious.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchPrev;
this.menufindprevious.Name = "menufindprevious";
this.menufindprevious.ShortcutKeys = System.Windows.Forms.Keys.F2;
this.menufindprevious.Size = new System.Drawing.Size(164, 22);
this.menufindprevious.Text = "Find previous";
this.menufindprevious.Click += new System.EventHandler(this.searchprev_Click);
//
// toolsmenu
//
this.toolsmenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menucompile});
this.toolsmenu.Name = "toolsmenu";
this.toolsmenu.Size = new System.Drawing.Size(48, 20);
this.toolsmenu.Text = "Tools";
this.toolsmenu.DropDownOpening += new System.EventHandler(this.toolsmenu_DropDownOpening);
//
// menucompile
//
this.menucompile.Image = global::CodeImp.DoomBuilder.Properties.Resources.ScriptCompile;
this.menucompile.Name = "menucompile";
this.menucompile.ShortcutKeys = System.Windows.Forms.Keys.F5;
this.menucompile.Size = new System.Drawing.Size(138, 22);
this.menucompile.Text = "Compile";
this.menucompile.Click += new System.EventHandler(this.buttoncompile_Click);
//
// scripticons
//
this.scripticons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("scripticons.ImageStream")));
this.scripticons.TransparentColor = System.Drawing.Color.Transparent;
this.scripticons.Images.SetKeyName(0, "File.ico");
this.scripticons.Images.SetKeyName(1, "GroupUnknown.png");
this.scripticons.Images.SetKeyName(2, "PK3.ico");
this.scripticons.Images.SetKeyName(3, "ResourceMAP.png");
this.scripticons.Images.SetKeyName(4, "Script.png");
this.scripticons.Images.SetKeyName(5, "ScriptACS.png");
this.scripticons.Images.SetKeyName(6, "ScriptMODELDEF.png");
this.scripticons.Images.SetKeyName(7, "ScriptDECORATE.png");
this.scripticons.Images.SetKeyName(8, "ScriptGLDEFS.png");
this.scripticons.Images.SetKeyName(9, "ScriptSNDSEQ.png");
this.scripticons.Images.SetKeyName(10, "ScriptMAPINFO.png");
this.scripticons.Images.SetKeyName(11, "ScriptVOXELDEF.png");
this.scripticons.Images.SetKeyName(12, "ScriptTEXTURES.png");
this.scripticons.Images.SetKeyName(13, "ScriptANIMDEFS.png");
this.scripticons.Images.SetKeyName(14, "ScriptREVERBS.png");
this.scripticons.Images.SetKeyName(15, "ScriptTERRAIN.png");
this.scripticons.Images.SetKeyName(16, "ScriptX11.png");
this.scripticons.Images.SetKeyName(17, "ScriptCVARINFO.png");
this.scripticons.Images.SetKeyName(18, "ScriptSNDINFO.png");
this.scripticons.Images.SetKeyName(19, "ScriptLOCKDEFS.png");
this.scripticons.Images.SetKeyName(20, "ScriptMENUDEF.png");
this.scripticons.Images.SetKeyName(21, "ScriptSBARINFO.png");
this.scripticons.Images.SetKeyName(22, "ScriptUSDF.png");
this.scripticons.Images.SetKeyName(23, "GroupUnknown.png");
this.scripticons.Images.SetKeyName(24, "GroupACS.png");
this.scripticons.Images.SetKeyName(25, "GroupMODELDEF.png");
this.scripticons.Images.SetKeyName(26, "GroupDECORATE.png");
this.scripticons.Images.SetKeyName(27, "GroupGLDEFS.png");
this.scripticons.Images.SetKeyName(28, "GroupSNDSEQ.png");
this.scripticons.Images.SetKeyName(29, "GroupMAPINFO.png");
this.scripticons.Images.SetKeyName(30, "GroupVOXELDEF.png");
this.scripticons.Images.SetKeyName(31, "GroupTEXTURES.png");
this.scripticons.Images.SetKeyName(32, "GroupANIMDEFS.png");
this.scripticons.Images.SetKeyName(33, "GroupREVERBS.png");
this.scripticons.Images.SetKeyName(34, "GroupTERRAIN.png");
this.scripticons.Images.SetKeyName(35, "GroupX11.png");
this.scripticons.Images.SetKeyName(36, "GroupCVARINFO.png");
this.scripticons.Images.SetKeyName(37, "GroupSNDINFO.png");
this.scripticons.Images.SetKeyName(38, "GroupLOCKDEFS.png");
this.scripticons.Images.SetKeyName(39, "GroupMENUDEF.png");
this.scripticons.Images.SetKeyName(40, "GroupSBARINFO.png");
this.scripticons.Images.SetKeyName(41, "GroupUSDF.png");
this.scripticons.Images.SetKeyName(42, "GroupOpen.png");
this.scripticons.Images.SetKeyName(43, "OpenGroupACS.png");
this.scripticons.Images.SetKeyName(44, "OpenGroupMODELDEF.png");
this.scripticons.Images.SetKeyName(45, "OpenGroupDECORATE.png");
this.scripticons.Images.SetKeyName(46, "OpenGroupGLDEFS.png");
this.scripticons.Images.SetKeyName(47, "OpenGroupSNDSEQ.png");
this.scripticons.Images.SetKeyName(48, "OpenGroupMAPINFO.png");
this.scripticons.Images.SetKeyName(49, "OpenGroupVOXELDEF.png");
this.scripticons.Images.SetKeyName(50, "OpenGroupTEXTURES.png");
this.scripticons.Images.SetKeyName(51, "OpenGroupANIMDEFS.png");
this.scripticons.Images.SetKeyName(52, "OpenGroupREVERBS.png");
this.scripticons.Images.SetKeyName(53, "OpenGroupTERRAIN.png");
this.scripticons.Images.SetKeyName(54, "OpenGroupX11.png");
this.scripticons.Images.SetKeyName(55, "OpenGroupCVARINFO.png");
this.scripticons.Images.SetKeyName(56, "OpenGroupSNDINFO.png");
this.scripticons.Images.SetKeyName(57, "OpenGroupLOCKDEFS.png");
this.scripticons.Images.SetKeyName(58, "OpenGroupMENUDEF.png");
this.scripticons.Images.SetKeyName(59, "OpenGroupSBARINFO.png");
this.scripticons.Images.SetKeyName(60, "OpenGroupUSDF.png");
//
// projecticons
//
this.projecticons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("projecticons.ImageStream")));
this.projecticons.TransparentColor = System.Drawing.Color.Transparent;
this.projecticons.Images.SetKeyName(0, "Resources.png");
//
// mainsplitter
//
this.mainsplitter.Cursor = System.Windows.Forms.Cursors.Default;
this.mainsplitter.Dock = System.Windows.Forms.DockStyle.Fill;
this.mainsplitter.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.mainsplitter.Location = new System.Drawing.Point(0, 49);
this.mainsplitter.Name = "mainsplitter";
//
// mainsplitter.Panel1
//
this.mainsplitter.Panel1.Controls.Add(this.projecttabs);
this.mainsplitter.Panel1.Padding = new System.Windows.Forms.Padding(3, 3, 0, 0);
this.mainsplitter.Panel1MinSize = 180;
//
// mainsplitter.Panel2
//
this.mainsplitter.Panel2.Controls.Add(this.splitter);
this.mainsplitter.Panel2.Padding = new System.Windows.Forms.Padding(0, 3, 3, 1);
this.mainsplitter.Size = new System.Drawing.Size(928, 449);
this.mainsplitter.SplitterDistance = 200;
this.mainsplitter.SplitterWidth = 8;
this.mainsplitter.TabIndex = 1;
//
// projecttabs
//
this.projecttabs.Controls.Add(this.tabresources);
this.projecttabs.Dock = System.Windows.Forms.DockStyle.Fill;
this.projecttabs.ImageList = this.projecticons;
this.projecttabs.Location = new System.Drawing.Point(3, 3);
this.projecttabs.Name = "projecttabs";
this.projecttabs.Padding = new System.Drawing.Point(3, 3);
this.projecttabs.SelectedIndex = 0;
this.projecttabs.Size = new System.Drawing.Size(197, 446);
this.projecttabs.TabIndex = 0;
//
// tabresources
//
this.tabresources.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.tabresources.Controls.Add(this.scriptresources);
this.tabresources.ImageIndex = 0;
this.tabresources.Location = new System.Drawing.Point(4, 23);
this.tabresources.Name = "tabresources";
this.tabresources.Padding = new System.Windows.Forms.Padding(3);
this.tabresources.Size = new System.Drawing.Size(189, 419);
this.tabresources.TabIndex = 0;
this.tabresources.Text = " Resources ";
this.tabresources.UseVisualStyleBackColor = true;
//
// scriptresources
//
this.scriptresources.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.scriptresources.Dock = System.Windows.Forms.DockStyle.Fill;
this.scriptresources.Location = new System.Drawing.Point(3, 3);
this.scriptresources.Margin = new System.Windows.Forms.Padding(0);
this.scriptresources.Name = "scriptresources";
this.scriptresources.Size = new System.Drawing.Size(183, 413);
this.scriptresources.TabIndex = 0;
//
// splitter
//
this.splitter.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitter.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitter.IsSplitterFixed = true;
this.splitter.Location = new System.Drawing.Point(0, 25);
this.splitter.Location = new System.Drawing.Point(0, 3);
this.splitter.Name = "splitter";
this.splitter.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
@ -452,11 +947,35 @@ namespace CodeImp.DoomBuilder.Controls
//
this.splitter.Panel2.Controls.Add(this.label1);
this.splitter.Panel2.Controls.Add(this.errorlist);
this.splitter.Size = new System.Drawing.Size(800, 516);
this.splitter.SplitterDistance = 390;
this.splitter.Size = new System.Drawing.Size(717, 445);
this.splitter.SplitterDistance = 319;
this.splitter.TabIndex = 2;
this.splitter.TabStop = false;
//
// tabs
//
this.tabs.ActiveColor = System.Drawing.SystemColors.HotTrack;
this.tabs.AllowDrop = true;
this.tabs.BackTabColor = System.Drawing.SystemColors.Control;
this.tabs.BorderColor = System.Drawing.SystemColors.ControlDark;
this.tabs.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabs.HighlightColor = System.Drawing.SystemColors.Highlight;
this.tabs.ItemSize = new System.Drawing.Size(240, 22);
this.tabs.Location = new System.Drawing.Point(0, 0);
this.tabs.Name = "tabs";
this.tabs.Padding = new System.Drawing.Point(12, 3);
this.tabs.SelectedIndex = 0;
this.tabs.SelectedTextColor = System.Drawing.SystemColors.HighlightText;
this.tabs.ShowClosingButton = true;
this.tabs.ShowToolTips = true;
this.tabs.Size = new System.Drawing.Size(717, 319);
this.tabs.TabIndex = 0;
this.tabs.TabStop = false;
this.tabs.TextColor = System.Drawing.SystemColors.WindowText;
this.tabs.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabs_Selecting);
this.tabs.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tabs_MouseUp);
this.tabs.OnCloseTabClicked += new System.EventHandler<System.Windows.Forms.TabControlEventArgs>(this.tabs_OnCloseTabClicked);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@ -467,7 +986,7 @@ namespace CodeImp.DoomBuilder.Controls
this.label1.Location = new System.Drawing.Point(3, 0);
this.label1.Name = "label1";
this.label1.Padding = new System.Windows.Forms.Padding(1);
this.label1.Size = new System.Drawing.Size(794, 16);
this.label1.Size = new System.Drawing.Size(711, 16);
this.label1.TabIndex = 1;
this.label1.Text = "Errors";
//
@ -488,7 +1007,7 @@ namespace CodeImp.DoomBuilder.Controls
this.errorlist.MultiSelect = false;
this.errorlist.Name = "errorlist";
this.errorlist.ShowGroups = false;
this.errorlist.Size = new System.Drawing.Size(794, 100);
this.errorlist.Size = new System.Drawing.Size(711, 100);
this.errorlist.SmallImageList = this.errorimages;
this.errorlist.TabIndex = 0;
this.errorlist.TabStop = false;
@ -511,74 +1030,32 @@ namespace CodeImp.DoomBuilder.Controls
this.colFile.Text = "File";
this.colFile.Width = 150;
//
// errorimages
//
this.errorimages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("errorimages.ImageStream")));
this.errorimages.TransparentColor = System.Drawing.Color.Transparent;
this.errorimages.Images.SetKeyName(0, "ScriptError3.png");
//
// statusbar
//
this.statusbar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.statuslabel,
this.positionlabel,
this.scripttype});
this.statusbar.Location = new System.Drawing.Point(0, 541);
this.statusbar.Name = "statusbar";
this.statusbar.Size = new System.Drawing.Size(800, 22);
this.statusbar.TabIndex = 3;
this.statusbar.Text = "statusStrip1";
//
// statuslabel
//
this.statuslabel.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.statuslabel.Image = global::CodeImp.DoomBuilder.Properties.Resources.Status0;
this.statuslabel.Margin = new System.Windows.Forms.Padding(3, 3, 0, 2);
this.statuslabel.Name = "statuslabel";
this.statuslabel.Size = new System.Drawing.Size(60, 17);
this.statuslabel.Text = "Ready.";
//
// positionlabel
//
this.positionlabel.Name = "positionlabel";
this.positionlabel.Size = new System.Drawing.Size(634, 17);
this.positionlabel.Spring = true;
this.positionlabel.Text = "100 : 12 (120)";
this.positionlabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// scripttype
//
this.scripttype.Margin = new System.Windows.Forms.Padding(30, 3, 0, 2);
this.scripttype.Name = "scripttype";
this.scripttype.Size = new System.Drawing.Size(58, 17);
this.scripttype.Text = "Plain Text";
this.scripttype.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// statusflasher
//
this.statusflasher.Tick += new System.EventHandler(this.statusflasher_Tick);
//
// statusresetter
//
this.statusresetter.Tick += new System.EventHandler(this.statusresetter_Tick);
//
// ScriptEditorPanel
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.splitter);
this.Controls.Add(this.mainsplitter);
this.Controls.Add(this.statusbar);
this.Controls.Add(this.toolbar);
this.Controls.Add(this.menustrip);
this.Name = "ScriptEditorPanel";
this.Size = new System.Drawing.Size(800, 563);
this.Size = new System.Drawing.Size(928, 520);
this.toolbar.ResumeLayout(false);
this.toolbar.PerformLayout();
this.statusbar.ResumeLayout(false);
this.statusbar.PerformLayout();
this.menustrip.ResumeLayout(false);
this.menustrip.PerformLayout();
this.mainsplitter.Panel1.ResumeLayout(false);
this.mainsplitter.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.mainsplitter)).EndInit();
this.mainsplitter.ResumeLayout(false);
this.projecttabs.ResumeLayout(false);
this.tabresources.ResumeLayout(false);
this.splitter.Panel1.ResumeLayout(false);
this.splitter.Panel2.ResumeLayout(false);
this.splitter.ResumeLayout(false);
this.statusbar.ResumeLayout(false);
this.statusbar.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -586,7 +1063,7 @@ namespace CodeImp.DoomBuilder.Controls
#endregion
private System.Windows.Forms.TabControl tabs;
private CodeImp.DoomBuilder.Controls.VSTabControl tabs;
private System.Windows.Forms.ToolStrip toolbar;
private System.Windows.Forms.ToolStripButton buttonopen;
private System.Windows.Forms.ToolStripDropDownButton buttonnew;
@ -604,7 +1081,6 @@ namespace CodeImp.DoomBuilder.Controls
private System.Windows.Forms.ToolStripButton buttonpaste;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripDropDownButton buttonscriptconfig;
private System.Windows.Forms.ToolStripButton buttonclose;
private System.Windows.Forms.SplitContainer splitter;
private System.Windows.Forms.ListView errorlist;
private System.Windows.Forms.Label label1;
@ -633,5 +1109,45 @@ namespace CodeImp.DoomBuilder.Controls
private System.Windows.Forms.ToolStripButton buttonindent;
private System.Windows.Forms.ToolStripButton buttonwhitespace;
private System.Windows.Forms.ToolStripButton buttonwordwrap;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
private System.Windows.Forms.MenuStrip menustrip;
private System.Windows.Forms.ToolStripMenuItem filemenuitem;
private System.Windows.Forms.ToolStripMenuItem menusave;
private System.Windows.Forms.ToolStripMenuItem menusaveall;
private System.Windows.Forms.ToolStripMenuItem editmenuitem;
private System.Windows.Forms.ToolStripMenuItem menuundo;
private System.Windows.Forms.ToolStripMenuItem menuredo;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
private System.Windows.Forms.ToolStripMenuItem menucut;
private System.Windows.Forms.ToolStripMenuItem menucopy;
private System.Windows.Forms.ToolStripMenuItem menupaste;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem menusnippets;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private System.Windows.Forms.ToolStripMenuItem menuindent;
private System.Windows.Forms.ToolStripMenuItem menuunindent;
private System.Windows.Forms.ToolStripMenuItem viewmenuitem;
private System.Windows.Forms.ToolStripMenuItem menuwhitespace;
private System.Windows.Forms.ToolStripMenuItem menuwordwrap;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
private System.Windows.Forms.ToolStripMenuItem menustayontop;
private System.Windows.Forms.ToolStripMenuItem searchmenuitem;
private System.Windows.Forms.ToolStripMenuItem menufind;
private System.Windows.Forms.ToolStripMenuItem menufindnext;
private System.Windows.Forms.ToolStripMenuItem menufindprevious;
private System.Windows.Forms.ToolStripMenuItem toolsmenu;
private System.Windows.Forms.ToolStripMenuItem menucompile;
private CollapsibleSplitContainer mainsplitter;
private System.Windows.Forms.TabControl projecttabs;
private System.Windows.Forms.TabPage tabresources;
private ScriptResourcesControl scriptresources;
private System.Windows.Forms.ImageList scripticons;
private System.Windows.Forms.ImageList projecticons;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
private System.Windows.Forms.ToolStripMenuItem menugotoline;
private System.Windows.Forms.ToolStripMenuItem menuopen;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator13;
private System.Windows.Forms.ToolStripMenuItem menuduplicateline;
private System.Windows.Forms.ToolStripMenuItem menunew;
}
}

View file

@ -23,6 +23,8 @@ using System.IO;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Compilers;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Controls.Scripting;
using CodeImp.DoomBuilder.Data.Scripting;
using CodeImp.DoomBuilder.Windows;
using ScintillaNET;
@ -55,13 +57,25 @@ namespace CodeImp.DoomBuilder.Controls
private ScriptStatusInfo status;
private int statusflashcount;
private bool statusflashicon;
//mxd
private ScriptEditorForm parentform;
private ScriptIconsManager iconsmgr;
//mxd. Text editor settings
private bool showwhitespace;
private bool wraplonglines;
private bool blockupdate;
#endregion
#region ================== Properties
public ScriptDocumentTab ActiveTab { get { return (tabs.SelectedTab as ScriptDocumentTab); } }
internal ScriptIconsManager Icons { get { return iconsmgr; } }
public bool ShowWhitespace { get { return showwhitespace; } }
public bool WrapLongLines { get { return wraplonglines; } }
#endregion
#region ================== Constructor
@ -70,11 +84,15 @@ namespace CodeImp.DoomBuilder.Controls
public ScriptEditorPanel()
{
InitializeComponent();
iconsmgr = new ScriptIconsManager(scripticons); //mxd
tabs.ImageList = scripticons; //mxd
}
// This initializes the control
public void Initialize()
public void Initialize(ScriptEditorForm form)
{
parentform = form; //mxd
// Make list of script configs
scriptconfigs = new List<ScriptConfiguration>(General.ScriptConfigs.Values);
scriptconfigs.Add(new ScriptConfiguration());
@ -83,19 +101,28 @@ namespace CodeImp.DoomBuilder.Controls
// Fill the list of new document types
foreach(ScriptConfiguration cfg in scriptconfigs)
{
Image icon = scripticons.Images[iconsmgr.GetScriptIcon(cfg.ScriptType)]; //mxd
// Button for new script menu
ToolStripMenuItem item = new ToolStripMenuItem(cfg.Description);
//item.Image = buttonnew.Image;
item.Image = icon; //mxd
item.Tag = cfg;
item.Click += buttonnew_Click;
buttonnew.DropDownItems.Add(item);
// Button for script type menu
item = new ToolStripMenuItem(cfg.Description);
//item.Image = buttonnew.Image;
item.Image = icon; //mxd
item.Tag = cfg;
item.Click += buttonscriptconfig_Click;
buttonscriptconfig.DropDownItems.Add(item);
//mxd. Button for the "New" menu item
item = new ToolStripMenuItem(cfg.Description);
item.Image = icon; //mxd
item.Tag = cfg;
item.Click += buttonnew_Click;
menunew.DropDownItems.Add(item);
}
// Setup supported extensions
@ -113,6 +140,9 @@ namespace CodeImp.DoomBuilder.Controls
}
}
openfile.Filter = "Script files|" + filterall + "|" + filterseperate + "|All files|*.*";
//mxd. Initialize script resources control
scriptresources.Setup(this, General.Map.Data.ScriptResources);
// Load the script lumps
ScriptDocumentTab activetab = null; //mxd
@ -132,10 +162,10 @@ namespace CodeImp.DoomBuilder.Controls
ScriptLumpDocumentTab t = new ScriptLumpDocumentTab(this, maplumpinfo.Name, config);
//mxd. Apply stored settings?
if(General.Map.Options.ScriptLumpSettings.ContainsKey(maplumpinfo.Name))
if(General.Map.Options.ScriptDocumentSettings.ContainsKey(maplumpinfo.Name))
{
t.SetViewSettings(General.Map.Options.ScriptLumpSettings[maplumpinfo.Name]);
if(General.Map.Options.ScriptLumpSettings[maplumpinfo.Name].IsActiveTab)
t.SetViewSettings(General.Map.Options.ScriptDocumentSettings[maplumpinfo.Name]);
if(General.Map.Options.ScriptDocumentSettings[maplumpinfo.Name].IsActiveTab)
activetab = t;
}
else
@ -144,7 +174,7 @@ namespace CodeImp.DoomBuilder.Controls
}
t.OnTextChanged += tabpage_OnLumpTextChanged; //mxd
t.Scintilla.UpdateUI += scintilla_OnUpdateUI; //mxd
t.Editor.Scintilla.UpdateUI += scintilla_OnUpdateUI; //mxd
tabs.TabPages.Add(t);
}
else if(maplumpinfo.Script != null)
@ -153,10 +183,10 @@ namespace CodeImp.DoomBuilder.Controls
ScriptLumpDocumentTab t = new ScriptLumpDocumentTab(this, maplumpinfo.Name, maplumpinfo.Script);
//mxd. Apply stored settings?
if(General.Map.Options.ScriptLumpSettings.ContainsKey(maplumpinfo.Name))
if(General.Map.Options.ScriptDocumentSettings.ContainsKey(maplumpinfo.Name))
{
t.SetViewSettings(General.Map.Options.ScriptLumpSettings[maplumpinfo.Name]);
if(General.Map.Options.ScriptLumpSettings[maplumpinfo.Name].IsActiveTab)
t.SetViewSettings(General.Map.Options.ScriptDocumentSettings[maplumpinfo.Name]);
if(General.Map.Options.ScriptDocumentSettings[maplumpinfo.Name].IsActiveTab)
activetab = t;
}
else
@ -165,21 +195,48 @@ namespace CodeImp.DoomBuilder.Controls
}
t.OnTextChanged += tabpage_OnLumpTextChanged; //mxd
t.Scintilla.UpdateUI += scintilla_OnUpdateUI; //mxd
t.Editor.Scintilla.UpdateUI += scintilla_OnUpdateUI; //mxd
tabs.TabPages.Add(t);
}
}
// Load the files that were previously opened for this map
foreach(ScriptDocumentSettings settings in General.Map.Options.ScriptFileSettings.Values)
// Load files, which were previously opened for this map
foreach(ScriptDocumentSettings settings in General.Map.Options.ScriptDocumentSettings.Values)
{
// Does this file exist?
if(File.Exists(settings.Filename))
switch(settings.TabType)
{
// Load this!
ScriptFileDocumentTab t = OpenFile(settings.Filename);
t.SetViewSettings(settings); //mxd
if(settings.IsActiveTab) activetab = t;
//TODO: load all tab types here...
case ScriptDocumentTabType.LUMP: continue;
case ScriptDocumentTabType.FILE:
// Does this file exist?
if(File.Exists(settings.Filename))
{
// Load this!
ScriptFileDocumentTab t = OpenFile(settings.Filename);
t.SetViewSettings(settings); //mxd
if(settings.IsActiveTab) activetab = t;
}
break;
case ScriptDocumentTabType.RESOURCE:
// Find target resource...
if(!General.Map.Data.ScriptResources.ContainsKey(settings.ScriptType)) continue;
foreach(ScriptResource res in General.Map.Data.ScriptResources[settings.ScriptType])
{
if(res.Resource.Location.location == settings.ResourceLocation)
{
// Load this!
ScriptResourceDocumentTab t = OpenResource(res);
t.SetViewSettings(settings);
if(settings.IsActiveTab) activetab = t;
break;
}
}
break;
default:
throw new NotImplementedException("Unknown ScriptDocumentTabType!");
}
}
@ -188,10 +245,19 @@ namespace CodeImp.DoomBuilder.Controls
{
tabs.SelectedTab = activetab;
}
//mxd. Select "Scripts" tab, because that's what user will want 99% of time
//mxd. Select the "Scripts" tab, because that's what user will want 99% of time
else if(tabs.TabPages.Count > 0)
{
int scriptsindex = GetTabPageIndex("SCRIPTS");
int scriptsindex = -1;
for(int i = 0; i < tabs.TabPages.Count; i++)
{
if(tabs.TabPages[i].Text == "SCRIPTS")
{
scriptsindex = i;
break;
}
}
tabs.SelectedIndex = (scriptsindex == -1 ? 0 : scriptsindex);
activetab = tabs.TabPages[tabs.SelectedIndex] as ScriptDocumentTab;
}
@ -214,18 +280,39 @@ namespace CodeImp.DoomBuilder.Controls
}
// Done
UpdateToolbar(true);
UpdateInterface(true);
}
// This applies user preferences
public void ApplySettings()
{
// Set Errors panel settings
errorlist.Columns[0].Width = General.Settings.ReadSetting("scriptspanel.errorscolumn0width", errorlist.Columns[0].Width);
errorlist.Columns[1].Width = General.Settings.ReadSetting("scriptspanel.errorscolumn1width", errorlist.Columns[1].Width);
errorlist.Columns[2].Width = General.Settings.ReadSetting("scriptspanel.errorscolumn2width", errorlist.Columns[2].Width);
buttonwhitespace.Checked = General.Settings.ReadSetting("scriptspanel.showwhitespace", false); //mxd
buttonwordwrap.Checked = General.Settings.ReadSetting("scriptspanel.wraplonglines", false); //mxd
ApplyTabSettings(); //mxd
//mxd. Set splitter position and state
if(General.Settings.ReadSetting("scriptspanel.splittercollapsed", false))
mainsplitter.IsCollapsed = true;
int splitterdistance = General.Settings.ReadSetting("scriptspanel.splitterdistance", int.MinValue);
if(splitterdistance == int.MinValue)
{
splitterdistance = 200;
if(MainForm.DPIScaler.Width != 1.0f)
splitterdistance = (int)Math.Round(splitterdistance * MainForm.DPIScaler.Width);
}
mainsplitter.SplitPosition = splitterdistance;
//mxd. Set text editor settings
showwhitespace = General.Settings.ReadSetting("scriptspanel.showwhitespace", false);
buttonwhitespace.Checked = showwhitespace;
menuwhitespace.Checked = showwhitespace;
wraplonglines = General.Settings.ReadSetting("scriptspanel.wraplonglines", false);
buttonwordwrap.Checked = wraplonglines;
menuwordwrap.Checked = wraplonglines;
menustayontop.Checked = General.Settings.ScriptOnTop;
ApplyTabSettings();
}
// This saves user preferences
@ -233,8 +320,11 @@ namespace CodeImp.DoomBuilder.Controls
{
General.Settings.WriteSetting("scriptspanel.errorscolumn0width", errorlist.Columns[0].Width);
General.Settings.WriteSetting("scriptspanel.errorscolumn1width", errorlist.Columns[1].Width);
General.Settings.WriteSetting("scriptspanel.showwhitespace", buttonwhitespace.Checked); //mxd
General.Settings.WriteSetting("scriptspanel.wraplonglines", buttonwordwrap.Checked); //mxd
General.Settings.WriteSetting("scriptspanel.errorscolumn2width", errorlist.Columns[2].Width); //mxd
General.Settings.WriteSetting("scriptspanel.splittercollapsed", mainsplitter.IsCollapsed); //mxd
General.Settings.WriteSetting("scriptspanel.splitterdistance", mainsplitter.SplitPosition); //mxd
General.Settings.WriteSetting("scriptspanel.showwhitespace", showwhitespace); //mxd
General.Settings.WriteSetting("scriptspanel.wraplonglines", wraplonglines); //mxd
}
//mxd
@ -250,6 +340,41 @@ namespace CodeImp.DoomBuilder.Controls
}
}
}
//mxd
internal void OnReloadResources()
{
// Re-initialize script resources control
scriptresources.Setup(this, General.Map.Data.ScriptResources);
// Resource tabs may need re-linking...
foreach(var tp in tabs.TabPages)
{
var tab = (tp as ScriptResourceDocumentTab);
if(tab != null) tab.OnReloadResources();
}
}
//mxd. Handle heavy resource loss
internal void OnScriptResourceLost(ScriptResourceDocumentTab sourcetab)
{
// Resource was lost. Remove tab
if(!sourcetab.IsChanged)
{
tabs.TabPages.Remove(sourcetab);
}
// Resource was lost, but the tab contains unsaved changes. Replace it with ScriptFileDocumentTab
else
{
int tabindex = tabs.TabPages.IndexOf(sourcetab);
var newtab = new ScriptFileDocumentTab(sourcetab);
tabs.SuspendLayout();
tabs.TabPages.Remove(sourcetab);
tabs.TabPages.Insert(tabindex, newtab);
tabs.ResumeLayout();
}
}
#endregion
@ -302,7 +427,7 @@ namespace CodeImp.DoomBuilder.Controls
// Replace if possible
public void Replace(FindReplaceOptions options)
{
if(!string.IsNullOrEmpty(findoptions.FindText) && (options.ReplaceWith != null) && (ActiveTab != null))
if(!string.IsNullOrEmpty(findoptions.FindText) && options.ReplaceWith != null && ActiveTab != null && !ActiveTab.IsReadOnly)
{
if(string.Compare(ActiveTab.SelectedText, options.FindText, !options.CaseSensitive) == 0)
{
@ -321,7 +446,7 @@ namespace CodeImp.DoomBuilder.Controls
{
int replacements = 0;
findoptions = options;
if(!string.IsNullOrEmpty(findoptions.FindText) && (options.ReplaceWith != null) && (ActiveTab != null))
if(!string.IsNullOrEmpty(findoptions.FindText) && options.ReplaceWith != null && ActiveTab != null && !ActiveTab.IsReadOnly)
{
int firstfindpos = -1;
int lastpos = -1;
@ -389,6 +514,8 @@ namespace CodeImp.DoomBuilder.Controls
try
{
findreplaceform.CanReplace = !ActiveTab.IsReadOnly; //mxd
if(findreplaceform.Visible)
findreplaceform.Focus();
else
@ -397,9 +524,18 @@ namespace CodeImp.DoomBuilder.Controls
if(ActiveTab.SelectionEnd != ActiveTab.SelectionStart)
findreplaceform.SetFindText(ActiveTab.SelectedText);
}
catch(Exception)
catch { } // If we can't pop up the find/replace form right now, thats just too bad.
}
//mxd
public void GoToLine()
{
if(ActiveTab == null) return;
var form = new ScriptGoToLineForm { LineNumber = ActiveTab.Editor.Scintilla.CurrentLine };
if(form.ShowDialog(this.parentform) == DialogResult.OK)
{
// If we can't pop up the find/replace form right now, thats just too bad.
ActiveTab.MoveToLine(form.LineNumber - 1);
}
}
@ -489,20 +625,27 @@ namespace CodeImp.DoomBuilder.Controls
// This writes all explicitly opened files to the configuration
public void WriteOpenFilesToConfiguration()
{
General.Map.Options.ScriptFileSettings.Clear(); //mxd
General.Map.Options.ScriptLumpSettings.Clear(); //mxd
General.Map.Options.ScriptDocumentSettings.Clear(); //mxd
foreach(ScriptDocumentTab t in tabs.TabPages) //mxd
{
if(t.ExplicitSave)
if(t is ScriptFileDocumentTab)
{
// Don't store tabs, which were never saved (this only happens when a new tab was created and no text was entered into it before closing the script editor)
if(!t.IsSaveAsRequired)
General.Map.Options.ScriptFileSettings[t.Filename] = t.GetViewSettings();
// Don't store tabs, which were never saved (this only happens when a new tab was created and no text
// was entered into it before closing the script editor)
if(t.ExplicitSave && !t.IsSaveAsRequired)
{
var settings = t.GetViewSettings();
General.Map.Options.ScriptDocumentSettings[settings.Filename] = settings;
}
}
else if(t is ScriptLumpDocumentTab || t is ScriptResourceDocumentTab)
{
var settings = t.GetViewSettings();
General.Map.Options.ScriptDocumentSettings[settings.Filename] = settings;
}
else
{
General.Map.Options.ScriptLumpSettings[t.Filename] = t.GetViewSettings();
throw new NotImplementedException("Unknown ScriptDocumentTab type");
}
}
}
@ -579,11 +722,11 @@ namespace CodeImp.DoomBuilder.Controls
if(!t.ExplicitSave) t.Save();
}
UpdateToolbar(false);
UpdateInterface(false);
}
// This updates the toolbar for the current status
private void UpdateToolbar(bool focuseditor)
private void UpdateInterface(bool focuseditor)
{
int numscriptsopen = tabs.TabPages.Count;
int explicitsavescripts = 0;
@ -591,33 +734,53 @@ namespace CodeImp.DoomBuilder.Controls
// Any explicit save scripts?
foreach(ScriptDocumentTab dt in tabs.TabPages)
if(dt.ExplicitSave) explicitsavescripts++;
if(dt.ExplicitSave && !dt.IsReadOnly) explicitsavescripts++;
// Get current script, if any are open
if(numscriptsopen > 0)
t = (tabs.SelectedTab as ScriptDocumentTab);
if(numscriptsopen > 0) t = (tabs.SelectedTab as ScriptDocumentTab);
// Enable/disable buttons
buttonsave.Enabled = (t != null && t.ExplicitSave && t.IsChanged);
bool tabiseditable = (t != null && !t.IsReadOnly); //mxd
buttonsave.Enabled = (tabiseditable && t.ExplicitSave && t.IsChanged);
buttonsaveall.Enabled = (explicitsavescripts > 0);
buttoncompile.Enabled = (t != null && t.Config.Compiler != null);
buttoncompile.Enabled = (tabiseditable && t.Config.Compiler != null);
buttonsearch.Enabled = (t != null); //mxd
buttonkeywordhelp.Enabled = (t != null && !string.IsNullOrEmpty(t.Config.KeywordHelp));
buttonscriptconfig.Enabled = (t != null && t.IsReconfigurable);
buttonundo.Enabled = (t != null && t.Scintilla.CanUndo);
buttonredo.Enabled = (t != null && t.Scintilla.CanRedo);
buttoncopy.Enabled = (t != null && t.Scintilla.SelectionStart < t.Scintilla.SelectionEnd);
buttoncut.Enabled = (t != null && t.Scintilla.SelectionStart < t.Scintilla.SelectionEnd);
buttonpaste.Enabled = (t != null && t.Scintilla.CanPaste);
buttonclose.Enabled = (t != null && t.IsClosable);
buttonsnippets.DropDownItems.Clear(); //mxd
buttonsnippets.Enabled = (t != null && t.Config.Snippets.Count > 0); //mxd
buttonindent.Enabled = (t != null); //mxd
buttonunindent.Enabled = (t != null && t.Scintilla.Lines[t.Scintilla.CurrentLine].Indentation > 0); //mxd
buttonwhitespace.Enabled = (t != null); //mxd
buttonwordwrap.Enabled = (t != null); //mxd
searchmatchcase.Enabled = (t != null); //mxd
searchwholeword.Enabled = (t != null); //mxd
buttonscriptconfig.Enabled = (tabiseditable && t.IsReconfigurable);
// Undo/Redo
buttonundo.Enabled = (tabiseditable && t.Editor.Scintilla.CanUndo);
buttonredo.Enabled = (tabiseditable && t.Editor.Scintilla.CanRedo);
// Cut/Copy/Paste
buttoncopy.Enabled = (t != null && t.Editor.Scintilla.SelectionStart < t.Editor.Scintilla.SelectionEnd);
buttoncut.Enabled = (tabiseditable && t.Editor.Scintilla.SelectionStart < t.Editor.Scintilla.SelectionEnd);
buttonpaste.Enabled = (tabiseditable && t.Editor.Scintilla.CanPaste);
//mxd. Snippets
buttonsnippets.DropDownItems.Clear();
menusnippets.DropDownItems.Clear();
bool havesnippets = (tabiseditable && t.Config.Snippets.Count > 0);
buttonsnippets.Enabled = havesnippets;
menusnippets.Enabled = havesnippets;
//mxd. Indent/Unindent
buttonindent.Enabled = tabiseditable;
buttonunindent.Enabled = (tabiseditable && t.Editor.Scintilla.Lines[t.Editor.Scintilla.CurrentLine].Indentation > 0);
//mxd. Whitespace
buttonwhitespace.Enabled = (t != null);
menuwhitespace.Enabled = (t != null);
//mxd. Wordwrap
buttonwordwrap.Enabled = (t != null);
menuwordwrap.Enabled = (t != null);
//mxd. Quick search options
searchmatchcase.Enabled = (t != null);
searchwholeword.Enabled = (t != null);
if(t != null)
{
@ -625,7 +788,7 @@ namespace CodeImp.DoomBuilder.Controls
searchbox.Enabled = true;
if(searchbox.Text.Length > 0)
{
if(t.Scintilla.Text.IndexOf(searchbox.Text, searchmatchcase.Checked ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase) != -1)
if(t.Editor.Scintilla.Text.IndexOf(searchbox.Text, searchmatchcase.Checked ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase) != -1)
{
searchprev.Enabled = true;
searchnext.Enabled = true;
@ -655,7 +818,13 @@ namespace CodeImp.DoomBuilder.Controls
if(t.Config != null && t.Config.Snippets.Count > 0)
{
if(t.Config.Snippets.Count > 0)
foreach(string snippetname in t.Config.Snippets) buttonsnippets.DropDownItems.Add(snippetname).Click += OnInsertSnippetClick;
{
foreach(string snippetname in t.Config.Snippets)
{
buttonsnippets.DropDownItems.Add(snippetname).Click += OnInsertSnippetClick;
menusnippets.DropDownItems.Add(snippetname).Click += OnInsertSnippetClick;
}
}
}
// Focus to script editor
@ -673,22 +842,22 @@ namespace CodeImp.DoomBuilder.Controls
scripttype.Text = ((t != null && t.Config != null) ? t.Config.Description : "Plain Text");
}
//mxd
private int GetTabPageIndex(string title)
{
if(tabs.TabPages.Count == 0) return -1;
for(int i = 0; i < tabs.TabPages.Count; i++)
{
if(tabs.TabPages[i].Text == title) return i;
}
return -1;
}
// This opens the given file, returns null when failed
public ScriptFileDocumentTab OpenFile(string filename)
{
//mxd. Check if we already have this file opened
foreach(var tab in tabs.TabPages)
{
if(!(tab is ScriptFileDocumentTab)) continue;
ScriptFileDocumentTab filetab = (ScriptFileDocumentTab)tab;
if(filetab.Filename == filename)
{
tabs.SelectedTab = filetab;
return filetab;
}
}
ScriptConfiguration foundconfig = new ScriptConfiguration();
// Find the most suitable script configuration to use
@ -732,8 +901,8 @@ namespace CodeImp.DoomBuilder.Controls
// Done
t.OnTextChanged += tabpage_OnTextChanged; //mxd
t.Scintilla.UpdateUI += scintilla_OnUpdateUI;
UpdateToolbar(true);
t.Editor.Scintilla.UpdateUI += scintilla_OnUpdateUI;
UpdateInterface(true);
return t;
}
@ -741,6 +910,46 @@ namespace CodeImp.DoomBuilder.Controls
return null;
}
//mxd
internal ScriptResourceDocumentTab OpenResource(ScriptResource resource)
{
// Check if we already have this file opened
foreach(var tab in tabs.TabPages)
{
if(!(tab is ScriptResourceDocumentTab)) continue;
ScriptResourceDocumentTab restab = (ScriptResourceDocumentTab)tab;
if(restab.Filename == resource.FilePathName)
{
tabs.SelectedTab = restab;
return restab;
}
}
// Create new document
ScriptConfiguration config = General.GetScriptConfiguration(resource.ScriptType);
if(config == null || config.ScriptType != resource.ScriptType)
{
General.ErrorLogger.Add(ErrorType.Warning, "Incorrect or missing script configuration for \"" + resource.ScriptType + "\" script type. Using plain text configuration.");
config = new ScriptConfiguration();
}
var t = new ScriptResourceDocumentTab(this, resource, config);
// Mark any errors this script may have
if(compilererrors != null) t.MarkScriptErrors(compilererrors);
// Add to tabs
tabs.TabPages.Add(t);
tabs.SelectedTab = t;
// Done
t.OnTextChanged += tabpage_OnTextChanged;
t.Editor.Scintilla.UpdateUI += scintilla_OnUpdateUI;
UpdateInterface(true);
return t;
}
// This saves the current open script
public void ExplicitSaveCurrentTab()
{
@ -891,7 +1100,7 @@ namespace CodeImp.DoomBuilder.Controls
scripttype.Text = scriptconfig.Description;
// Done
UpdateToolbar(true);
UpdateInterface(true);
}
// When new script is clicked
@ -906,7 +1115,7 @@ namespace CodeImp.DoomBuilder.Controls
tabs.SelectedTab = t;
// Done
UpdateToolbar(true);
UpdateInterface(true);
}
// Open script clicked
@ -931,21 +1140,15 @@ namespace CodeImp.DoomBuilder.Controls
ScriptFileDocumentTab t = OpenFile(name);
// Apply document settings
bool settingsfound = false;
foreach(ScriptDocumentSettings settings in General.Map.Options.ScriptFileSettings.Values)
if(General.Map.Options.ScriptDocumentSettings.ContainsKey(t.Filename))
{
// Does this file exist?
if(settings.Filename == t.Filename)
{
// Apply stored settings
t.SetViewSettings(settings);
settingsfound = true;
break;
}
t.SetViewSettings(General.Map.Options.ScriptDocumentSettings[t.Filename]);
}
else
{
// Apply default settings
t.SetDefaultViewSettings();
}
// Apply default settings
if(!settingsfound) t.SetDefaultViewSettings();
}
}
@ -968,7 +1171,7 @@ namespace CodeImp.DoomBuilder.Controls
// Save the current script
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
SaveScript(t);
UpdateToolbar(true);
UpdateInterface(true);
}
// Save All clicked
@ -984,7 +1187,7 @@ namespace CodeImp.DoomBuilder.Controls
}
}
UpdateToolbar(true);
UpdateInterface(true);
}
// This is called by Save and Save All to save a script
@ -1001,6 +1204,10 @@ namespace CodeImp.DoomBuilder.Controls
{
// Save to new filename
t.SaveAs(savefile.FileName);
//mxd. Also compile if needed
if(t.Config.Compiler != null) t.Compile();
return true;
}
@ -1010,6 +1217,10 @@ namespace CodeImp.DoomBuilder.Controls
// Save to same filename
t.Save();
//mxd. Also compile if needed
if(t.Config.Compiler != null) t.Compile();
return true;
}
@ -1024,15 +1235,7 @@ namespace CodeImp.DoomBuilder.Controls
ShowErrors(tab.UpdateNavigator(), true);
}
UpdateToolbar(true);
}
// This closes the current file
private void buttonclose_Click(object sender, EventArgs e)
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
CloseScript(t, false);
UpdateToolbar(true);
UpdateInterface(true);
}
// Compile Script clicked
@ -1075,7 +1278,7 @@ namespace CodeImp.DoomBuilder.Controls
DisplayStatus(ScriptStatusType.Info, "Script \"" + t.Title + "\" compiled without errors.");
Cursor.Current = Cursors.Default;
UpdateToolbar(true);
UpdateInterface(true);
}
// Undo clicked
@ -1083,7 +1286,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Undo();
UpdateToolbar(true);
UpdateInterface(true);
}
// Redo clicked
@ -1091,7 +1294,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Redo();
UpdateToolbar(true);
UpdateInterface(true);
}
// Cut clicked
@ -1099,7 +1302,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Cut();
UpdateToolbar(true);
UpdateInterface(true);
}
// Copy clicked
@ -1107,7 +1310,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Copy();
UpdateToolbar(true);
UpdateInterface(true);
}
// Paste clicked
@ -1115,7 +1318,7 @@ namespace CodeImp.DoomBuilder.Controls
{
ScriptDocumentTab t = (tabs.SelectedTab as ScriptDocumentTab);
t.Paste();
UpdateToolbar(true);
UpdateInterface(true);
}
//mxd
@ -1135,12 +1338,28 @@ namespace CodeImp.DoomBuilder.Controls
//mxd
private void buttonwhitespace_Click(object sender, EventArgs e)
{
if(blockupdate) return;
blockupdate = true;
showwhitespace = !showwhitespace;
buttonwhitespace.Checked = showwhitespace;
menuwhitespace.Checked = showwhitespace;
blockupdate = false;
ApplyTabSettings();
}
//mxd
private void buttonwordwrap_Click(object sender, EventArgs e)
{
if(blockupdate) return;
blockupdate = true;
wraplonglines = !wraplonglines;
buttonwordwrap.Checked = wraplonglines;
menuwordwrap.Checked = wraplonglines;
blockupdate = false;
ApplyTabSettings();
}
@ -1150,6 +1369,25 @@ namespace CodeImp.DoomBuilder.Controls
OpenFindAndReplace();
}
//mxd
private void menugotoline_Click(object sender, EventArgs e)
{
GoToLine();
}
//mxd
private void menuduplicateline_Click(object sender, EventArgs e)
{
if(ActiveTab != null) ActiveTab.Editor.DuplicateLine();
}
//mxd
private void menustayontop_Click(object sender, EventArgs e)
{
General.Settings.ScriptOnTop = menustayontop.Checked;
parentform.TopMost = General.Settings.ScriptOnTop;
}
//mxd
private void OnInsertSnippetClick(object sender, EventArgs eventArgs)
{
@ -1163,6 +1401,18 @@ namespace CodeImp.DoomBuilder.Controls
ForceFocus();
}
//mxd
private void tabs_OnCloseTabClicked(object sender, TabControlEventArgs e)
{
ScriptDocumentTab t = (e.TabPage as ScriptDocumentTab);
//TODO: allow any tab to be closed.
if(!t.IsClosable) return;
CloseScript(t, false);
UpdateInterface(true);
}
//mxd. Text in ScriptFileDocumentTab was changed
private void tabpage_OnTextChanged(object sender, EventArgs eventArgs)
{
@ -1172,8 +1422,8 @@ namespace CodeImp.DoomBuilder.Controls
if(curtab != null)
{
buttonsave.Enabled = (curtab.ExplicitSave && curtab.IsChanged);
buttonundo.Enabled = curtab.Scintilla.CanUndo;
buttonredo.Enabled = curtab.Scintilla.CanRedo;
buttonundo.Enabled = curtab.Editor.Scintilla.CanUndo;
buttonredo.Enabled = curtab.Editor.Scintilla.CanRedo;
}
}
}
@ -1186,8 +1436,8 @@ namespace CodeImp.DoomBuilder.Controls
ScriptDocumentTab curtab = tabs.SelectedTab as ScriptDocumentTab;
if(curtab != null)
{
buttonundo.Enabled = curtab.Scintilla.CanUndo;
buttonredo.Enabled = curtab.Scintilla.CanRedo;
buttonundo.Enabled = curtab.Editor.Scintilla.CanUndo;
buttonredo.Enabled = curtab.Editor.Scintilla.CanRedo;
}
}
}
@ -1269,15 +1519,15 @@ namespace CodeImp.DoomBuilder.Controls
private void searchnext_Click(object sender, EventArgs e)
{
ActiveTab.FindNext(GetQuickSearchOptions());
FindNext();
}
private void searchprev_Click(object sender, EventArgs e)
{
ActiveTab.FindPrevious(GetQuickSearchOptions());
FindPrevious();
}
//mxd. This flashes the status icon
// This flashes the status icon
private void statusflasher_Tick(object sender, EventArgs e)
{
statusflashicon = !statusflashicon;
@ -1286,13 +1536,84 @@ namespace CodeImp.DoomBuilder.Controls
if(statusflashcount == 0) statusflasher.Stop();
}
//mxd. This resets the status to ready
// This resets the status to ready
private void statusresetter_Tick(object sender, EventArgs e)
{
DisplayStatus(ScriptStatusType.Ready, null);
}
#endregion
#region ================== Menu opening events (mxd)
private void filemenuitem_DropDownOpening(object sender, EventArgs e)
{
ScriptDocumentTab t = ActiveTab;
menusave.Enabled = (t != null && !t.IsReadOnly && t.ExplicitSave && t.IsChanged);
// Any explicit save scripts?
int explicitsavescripts = 0;
foreach(ScriptDocumentTab dt in tabs.TabPages)
if(dt.ExplicitSave && !dt.IsReadOnly) explicitsavescripts++;
menusaveall.Enabled = (explicitsavescripts > 0);
}
private void editmenuitem_DropDownOpening(object sender, EventArgs e)
{
ScriptDocumentTab t = ActiveTab;
if(t != null)
{
Scintilla s = t.Editor.Scintilla;
menuundo.Enabled = s.CanUndo;
menuredo.Enabled = s.CanRedo;
menucut.Enabled = (s.SelectionEnd > s.SelectionStart);
menucopy.Enabled = (s.SelectionEnd > s.SelectionStart);
menupaste.Enabled = s.CanPaste;
menuindent.Enabled = true;
menuunindent.Enabled = s.Lines[s.CurrentLine].Indentation > 0;
menugotoline.Enabled = true;
menuduplicateline.Enabled = true;
}
else
{
menuundo.Enabled = false;
menuredo.Enabled = false;
menucut.Enabled = false;
menucopy.Enabled = false;
menupaste.Enabled = false;
menusnippets.Enabled = false;
menuindent.Enabled = false;
menuunindent.Enabled = false;
menugotoline.Enabled = false;
menuduplicateline.Enabled = false;
}
}
private void searchmenuitem_DropDownOpening(object sender, EventArgs e)
{
ScriptDocumentTab t = ActiveTab;
menufind.Enabled = (t != null);
bool enable = (!string.IsNullOrEmpty(findoptions.FindText) && t != null);
menufindnext.Enabled = enable;
menufindprevious.Enabled = enable;
}
private void toolsmenu_DropDownOpening(object sender, EventArgs e)
{
ScriptDocumentTab t = ActiveTab;
menucompile.Enabled = (ActiveTab != null && !t.IsReadOnly && t.Config.Compiler != null);
}
#endregion
}
}

File diff suppressed because it is too large Load diff

View file

@ -56,10 +56,24 @@ namespace CodeImp.DoomBuilder.Controls
// Initialize
this.filepathname = "";
tabtype = ScriptDocumentTabType.FILE; //mxd
if(config.Extensions.Length > 0) ext = "." + config.Extensions[0];
SetTitle("Untitled" + ext);
editor.ClearUndoRedo();
}
//mxd. Replace constructor
internal ScriptFileDocumentTab(ScriptResourceDocumentTab sourcetab)
: base(sourcetab.Panel, sourcetab.Config)
{
// Set text and view settings
tabtype = ScriptDocumentTabType.FILE;
editor.Scintilla.Text = sourcetab.Editor.Scintilla.Text;
SetViewSettings(sourcetab.GetViewSettings());
// Set title
SetTitle(sourcetab.Filename);
}
#endregion
@ -149,6 +163,7 @@ namespace CodeImp.DoomBuilder.Controls
this.filepathname = filepathname;
editor.ClearUndoRedo();
SetTitle(Path.GetFileName(filepathname));
this.ToolTipText = filepathname; //mxd
panel.ShowErrors(UpdateNavigator(), true); //mxd
return true;

View file

@ -0,0 +1,42 @@
using System.Windows.Forms;
using CodeImp.DoomBuilder.Config;
namespace CodeImp.DoomBuilder.Controls.Scripting
{
internal class ScriptIconsManager
{
private const int SCRIPT_TYPE_ICONS_OFFSET = 4;
private const int SCRIPT_GROUP_ICONS_OFFSET = 23;
private const int SCRIPT_GROUP_OPEN_ICONS_OFFSET = 42;
private ImageList icons;
public ImageList Icons { get { return icons; } }
public ScriptIconsManager(ImageList icons)
{
this.icons = icons;
}
public int GetResourceIcon(int datalocationtype)
{
return datalocationtype;
}
public int GetScriptIcon(ScriptType type)
{
int scripttype = (int)type + SCRIPT_TYPE_ICONS_OFFSET;
if(scripttype >= SCRIPT_GROUP_ICONS_OFFSET) scripttype = SCRIPT_TYPE_ICONS_OFFSET;
return scripttype;
}
public int GetScriptFolderIcon(ScriptType type, bool opened)
{
int scripttype = (int)type;
if(scripttype >= SCRIPT_GROUP_ICONS_OFFSET - SCRIPT_TYPE_ICONS_OFFSET)
scripttype = SCRIPT_TYPE_ICONS_OFFSET;
if(opened) return SCRIPT_GROUP_OPEN_ICONS_OFFSET + scripttype;
return SCRIPT_GROUP_ICONS_OFFSET + scripttype;
}
}
}

View file

@ -55,6 +55,7 @@ namespace CodeImp.DoomBuilder.Controls
public ScriptLumpDocumentTab(ScriptEditorPanel panel, string lumpname, ScriptConfiguration config) : base(panel, config)
{
// Initialize
tabtype = ScriptDocumentTabType.LUMP; //mxd
if(lumpname == MapManager.CONFIG_MAP_HEADER)
{
this.lumpname = MapManager.TEMP_MAP_HEADER;

View file

@ -0,0 +1,163 @@
#region ================== Namespaces
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Compilers;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Data.Scripting;
#endregion
namespace CodeImp.DoomBuilder.Controls
{
//mxd. Document tab bound to a resource entry. Script type can't be changed. Can be readonly.
//Must be replaced with ScriptFileDocumentTab when unable to locate target resource entry to save to.
internal sealed class ScriptResourceDocumentTab : ScriptDocumentTab
{
#region ================== Variables
private ScriptResource source;
private string hash;
private string filepathname;
#endregion
#region ================== Properties
public override bool IsReconfigurable { get { return false; } }
public override bool IsSaveAsRequired { get { return false; } }
public override bool IsReadOnly { get { return source.IsReadOnly; } }
public override string Filename { get { return filepathname; } }
#endregion
#region ================== Constructor
internal ScriptResourceDocumentTab(ScriptEditorPanel panel, ScriptResource resource, ScriptConfiguration config) : base(panel, config)
{
// Store resource
source = resource;
// Load the data
MemoryStream stream = source.Resource.LoadFile(source.Filename, source.LumpIndex);
if(stream != null)
{
hash = MD5Hash.Get(stream);
editor.SetText(stream.ToArray());
editor.Scintilla.ReadOnly = source.IsReadOnly;
editor.ClearUndoRedo();
}
else
{
General.ErrorLogger.Add(ErrorType.Warning, "Failed to load " + source.ScriptType + " resource \"" + source.Filename + "\" from \"" + source.Resource.Location.GetDisplayName() + "\".");
}
// Set title and tooltip
tabtype = ScriptDocumentTabType.RESOURCE;
filepathname = source.FilePathName;
SetTitle(source.ToString());
this.ToolTipText = filepathname;
// Update navigator
panel.ShowErrors(UpdateNavigator(), true);
}
#endregion
#region ================== Methods
public override void Compile()
{
List<CompilerError> errors = new List<CompilerError>();
DataReader reader = source.Resource;
if(reader != null && reader.CompileLump(source.Filename, source.LumpIndex, config, errors))
{
// Update script navigator
errors.AddRange(UpdateNavigator());
}
// Feed errors to panel
panel.ShowErrors(errors, false);
}
// This checks if a script error applies to this script
public override bool VerifyErrorForScript(CompilerError e)
{
return (string.Compare(e.filename, source.Filename, true) == 0);
}
// This saves the document (used for both explicit and implicit)
// Return true when successfully saved
public override bool Save()
{
if(source.IsReadOnly) return false;
// Find lump, check it's hash
bool dosave = true;
DataReader reader = source.Resource;
if(reader.FileExists(source.Filename, source.LumpIndex))
{
using(MemoryStream ms = reader.LoadFile(source.Filename, source.LumpIndex))
{
if(MD5Hash.Get(ms) != hash
&& MessageBox.Show("Target lump was modified by another application. Do you still want to replace it?", "Warning", MessageBoxButtons.OKCancel)
== DialogResult.Cancel)
{
dosave = false;
}
}
}
if(dosave)
{
// Store the lump data
using(MemoryStream stream = new MemoryStream(editor.GetText()))
{
if(reader.SaveFile(stream, source.Filename, source.LumpIndex))
{
// Update what must be updated
hash = MD5Hash.Get(stream);
editor.SetSavePoint();
UpdateTitle();
}
}
}
return dosave;
}
internal override ScriptDocumentSettings GetViewSettings()
{
// Store resource location
var settings = base.GetViewSettings();
DataReader reader = source.Resource;
if(reader != null)
{
settings.ResourceLocation = reader.Location.location;
settings.Filename = Path.Combine(reader.Location.location, filepathname); // Make unique location
}
return settings;
}
//mxd. Check if resource still exists
internal void OnReloadResources()
{
DataReader reader = source.Resource;
if(reader == null)
{
// Ask script editor to replace us with ScriptFileDocumentTab
panel.OnScriptResourceLost(this);
}
else
{
// Some paths may need updating...
filepathname = source.FilePathName;
this.ToolTipText = filepathname;
}
}
#endregion
}
}

View file

@ -0,0 +1,473 @@
#region ================== Namespaces
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Data.Scripting;
#endregion
namespace CodeImp.DoomBuilder.Controls
{
internal partial class ScriptResourcesControl : UserControl
{
#region ================== Nodes sorter
private class ScriptNodesSorter : IComparer
{
private List<string> resourceorder;
private HashSet<TextResourceNodeType> resourcetypes;
public ScriptNodesSorter()
{
// Needed to show resources in the map-defined order
resourceorder = new List<string>();
foreach(DataReader reader in General.Map.Data.Containers)
{
resourceorder.Add(reader.Location.location);
}
resourcetypes = new HashSet<TextResourceNodeType> { TextResourceNodeType.RESOURCE_DIRECTORY, TextResourceNodeType.RESOURCE_PK3, TextResourceNodeType.RESOURCE_WAD };
}
// Compare between two tree nodes
public int Compare(object o1, object o2)
{
TreeNode n1 = o1 as TreeNode;
TreeNode n2 = o2 as TreeNode;
TextResourceNodeData d1 = (TextResourceNodeData)n1.Tag;
TextResourceNodeData d2 = (TextResourceNodeData)n2.Tag;
// Sort resources by load order
if(resourcetypes.Contains(d1.NodeType) && resourcetypes.Contains(d2.NodeType))
{
int n1index = resourceorder.IndexOf(d1.ResourceLocation);
int n2index = resourceorder.IndexOf(d2.ResourceLocation);
if(n1index > n2index) return 1;
if(n1index < n2index) return -1;
return 0;
}
// Push map namespace resources before anything else
if(d1.NodeType == TextResourceNodeType.RESOURCE_MAP && d2.NodeType != TextResourceNodeType.RESOURCE_MAP) return -1;
if(d1.NodeType != TextResourceNodeType.RESOURCE_MAP && d2.NodeType == TextResourceNodeType.RESOURCE_MAP) return 1;
// Push embedded WADs before anything else except map resources
if(n1.Parent != null && n2.Parent != null)
{
if(d1.NodeType == TextResourceNodeType.RESOURCE_WAD && d2.NodeType != TextResourceNodeType.RESOURCE_WAD) return -1;
if(d1.NodeType != TextResourceNodeType.RESOURCE_WAD && d2.NodeType == TextResourceNodeType.RESOURCE_WAD) return 1;
}
// Push script folders before script files
if(d1.NodeType == TextResourceNodeType.DIRECTORY && d2.NodeType != TextResourceNodeType.DIRECTORY) return -1;
if(d1.NodeType != TextResourceNodeType.DIRECTORY && d2.NodeType == TextResourceNodeType.DIRECTORY) return 1;
// Sort by name
return n1.Text.CompareTo(n2.Text);
}
}
#endregion
#region ================== Constants
#endregion
#region ================== Enums
private enum TextResourceNodeType
{
RESOURCE_WAD,
RESOURCE_DIRECTORY,
RESOURCE_PK3,
RESOURCE_MAP,
DIRECTORY,
NODE,
}
#endregion
#region ================== Structs
private struct TextResourceNodeData
{
public ScriptResource Resource;
public string ResourceLocation; // Where PK3/WAD/Folder resource is located
public string LocationInResource; // Path to text file inside resource
public TextResourceNodeType NodeType;
public ScriptType ScriptType;
public override string ToString()
{
return (NodeType == TextResourceNodeType.NODE
? Path.Combine(ResourceLocation, LocationInResource) + (Resource.LumpIndex != -1 ? ":" + Resource.LumpIndex : "")
: ResourceLocation);
}
}
private struct ScriptTypeItem
{
public string Name;
public ScriptType Type;
public override string ToString() { return Name; }
}
#endregion
#region ================== Variables
private ScriptEditorPanel scriptpanel;
private Dictionary<string, Dictionary<ScriptType, HashSet<ScriptResource>>> resourcesperlocation;
private List<ScriptTypeItem> usedscripttypes;
#endregion
#region ================== Properties
#endregion
#region ================== Constructor / Setup
public ScriptResourcesControl()
{
InitializeComponent();
}
public void Setup(ScriptEditorPanel scriptpanel, Dictionary<ScriptType, HashSet<ScriptResource>> resources)
{
this.scriptpanel = scriptpanel;
projecttree.ImageList = scriptpanel.Icons.Icons; // Link icons
resourcesperlocation = new Dictionary<string, Dictionary<ScriptType, HashSet<ScriptResource>>>();
foreach(HashSet<ScriptResource> group in resources.Values)
{
foreach(ScriptResource resource in group)
{
string key = resource.Resource.Location.location;
if(!resourcesperlocation.ContainsKey(key))
resourcesperlocation.Add(key, new Dictionary<ScriptType, HashSet<ScriptResource>>());
if(!resourcesperlocation[key].ContainsKey(resource.ScriptType))
resourcesperlocation[key].Add(resource.ScriptType, new HashSet<ScriptResource>());
resourcesperlocation[key][resource.ScriptType].Add(resource);
}
}
// Add used script types to the filter combobox
string curfilter = filterbytype.SelectedText;
filterbytype.Items.Clear();
filterbytype.Items.Add(new ScriptTypeItem { Name = "All", Type = ScriptType.UNKNOWN });
usedscripttypes = new List<ScriptTypeItem>();
foreach(ScriptType st in resources.Keys)
usedscripttypes.Add(new ScriptTypeItem { Name = Enum.GetName(typeof(ScriptType), st), Type = st });
usedscripttypes.Sort((i1, i2) => String.Compare(i1.Name, i2.Name, StringComparison.Ordinal));
int toselect = 0;
for(int i = 0; i < usedscripttypes.Count; i++)
{
if(usedscripttypes[i].Name == curfilter) toselect = i;
filterbytype.Items.Add(usedscripttypes[i]);
}
filterbytype.SelectedIndex = toselect; // This will also trigger tree update
}
#endregion
#region ================== Methods
private void UpdateResourcesTree()
{
ScriptType targettype = (filterbytype.SelectedIndex > -1 ? ((ScriptTypeItem)filterbytype.SelectedItem).Type : ScriptType.UNKNOWN);
UpdateResourcesTree(targettype, filterproject.Text);
}
private void UpdateResourcesTree(ScriptType filtertype, string filterfilename)
{
TreeNode selected = projecttree.SelectedNode;
TreeNode toselect = null;
projecttree.BeginUpdate();
projecttree.Nodes.Clear();
char[] splitter = { Path.DirectorySeparatorChar };
bool filenamefiltered = !string.IsNullOrEmpty(filterfilename);
bool filteringapplied = (filenamefiltered || filtertype != ScriptType.UNKNOWN);
// Create nodes
foreach(KeyValuePair<string, Dictionary<ScriptType, HashSet<ScriptResource>>> group in resourcesperlocation)
{
foreach(ScriptTypeItem item in usedscripttypes)
{
// Filter by script type?
if(filtertype != ScriptType.UNKNOWN && item.Type != filtertype) continue;
// Current resource has this scrit type?
if(!group.Value.ContainsKey(item.Type)) continue;
HashSet<ScriptResource> resources = group.Value[item.Type];
foreach(ScriptResource res in resources)
{
bool asreadonly = res.Resource.IsReadOnly;
// Filter by filename?
if(filenamefiltered && Path.GetFileName(res.Filename).IndexOf(filterfilename, StringComparison.OrdinalIgnoreCase) == -1)
continue;
// Resource type node added?
TreeNode root;
string key = res.Resource.Location.location;
// WAD resource inside another resource?
if(res.Resource is WADReader && ((WADReader)res.Resource).ParentResource != null)
{
WADReader wr = (WADReader)res.Resource;
string parentkey = wr.ParentResource.Location.location;
TreeNode parent = GetResourceNode(projecttree.Nodes, wr.ParentResource.Location.GetDisplayName(), parentkey, wr.ParentResource);
if(parent.Nodes.ContainsKey(key))
{
root = parent.Nodes[key];
}
else
{
root = GetResourceNode(parent.Nodes, Path.GetFileName(wr.Location.GetDisplayName()), key, res.Resource);
TrySelectNode(selected, root, ref toselect);
}
}
else if(projecttree.Nodes.ContainsKey(key))
{
root = projecttree.Nodes[key];
}
else
{
root = GetResourceNode(projecttree.Nodes, res.Resource.Location.GetDisplayName(), key, res.Resource);
TrySelectNode(selected, root, ref toselect);
}
// Single resource item or active filtering?
int iconindex = scriptpanel.Icons.GetScriptIcon(res.ScriptType);
if(filteringapplied || (resources.Count == 1 && res.ScriptType != ScriptType.ACS))
{
// Create new node
var data = new TextResourceNodeData
{
ResourceLocation = key,
LocationInResource = Path.GetDirectoryName(res.Filename),
NodeType = TextResourceNodeType.NODE,
Resource = res,
ScriptType = res.ScriptType,
};
TreeNode scriptnode = new TreeNode(res.ToString(), iconindex, iconindex) { Tag = data, ToolTipText = data.ToString() };
if(asreadonly) scriptnode.ForeColor = SystemColors.GrayText;
TrySelectNode(selected, scriptnode, ref toselect);
// Add the node
root.Nodes.Add(scriptnode);
}
else
{
// Script type added?
string typename = "[" + Enum.GetName(typeof(ScriptType), res.ScriptType) + "]";
int groupiconindex = scriptpanel.Icons.GetScriptFolderIcon(res.ScriptType, false);
TreeNode scriptroot;
if(root.Nodes.ContainsKey(typename))
{
scriptroot = root.Nodes[typename];
}
else
{
scriptroot = new TreeNode(typename, groupiconindex, groupiconindex);
scriptroot.Name = typename;
scriptroot.Tag = new TextResourceNodeData
{
ResourceLocation = key,
NodeType = TextResourceNodeType.DIRECTORY,
ScriptType = res.ScriptType,
};
if(asreadonly) scriptroot.ForeColor = SystemColors.GrayText;
root.Nodes.Add(scriptroot);
TrySelectNode(selected, scriptroot, ref toselect);
}
// Add the resource path nodes if needed...
string path = Path.GetDirectoryName(res.Filename);
TreeNode pathnode = scriptroot;
string localpath = string.Empty;
if(!string.IsNullOrEmpty(path))
{
List<string> parts = new List<string>(path.Split(splitter, StringSplitOptions.RemoveEmptyEntries));
while(parts.Count > 0)
{
if(pathnode.Nodes.ContainsKey(parts[0]))
{
pathnode = pathnode.Nodes[parts[0]];
}
else
{
localpath = Path.Combine(localpath, parts[0]);
TreeNode child = new TreeNode(parts[0], groupiconindex, groupiconindex);
child.Name = parts[0];
var cdata = new TextResourceNodeData
{
ResourceLocation = key,
LocationInResource = localpath,
NodeType = TextResourceNodeType.DIRECTORY,
ScriptType = res.ScriptType
};
child.Tag = cdata;
child.ToolTipText = cdata.ToString();
if(asreadonly) child.ForeColor = SystemColors.GrayText;
pathnode.Nodes.Add(child);
pathnode = child;
TrySelectNode(selected, pathnode, ref toselect);
}
parts.RemoveAt(0);
}
}
// Create new node
TextResourceNodeData data = new TextResourceNodeData
{
ResourceLocation = key,
LocationInResource = localpath,
NodeType = TextResourceNodeType.NODE,
Resource = res,
};
TreeNode scriptnode = new TreeNode(res.ToString(), iconindex, iconindex) { Tag = data, ToolTipText = data.ToString() };
if(asreadonly) scriptnode.ForeColor = SystemColors.GrayText;
TrySelectNode(selected, scriptnode, ref toselect);
// Add the node
pathnode.Nodes.Add(scriptnode);
}
}
}
}
// If there's only one root node, shift all nodes up
if(projecttree.Nodes.Count == 1 && projecttree.Nodes[0].Nodes.Count > 0)
{
TreeNode[] children = new TreeNode[projecttree.Nodes[0].Nodes.Count];
projecttree.Nodes[0].Nodes.CopyTo(children, 0);
projecttree.Nodes.Clear();
projecttree.Nodes.AddRange(children);
}
// Sort the nodes
projecttree.TreeViewNodeSorter = new ScriptNodesSorter();
// Have valid selection?
if(toselect != null) projecttree.SelectedNode = toselect;
// Expand all nodes when filtered
if(filenamefiltered) projecttree.ExpandAll();
projecttree.EndUpdate();
}
private TreeNode GetResourceNode(TreeNodeCollection nodes, string title, string key, DataReader resource)
{
// Node already added?
if(nodes.ContainsKey(key)) return nodes[key];
// Create new node
int resourceiconindex = scriptpanel.Icons.GetResourceIcon(resource.Location.type);
TreeNode root = new TreeNode(title, resourceiconindex, resourceiconindex);
root.Name = key;
root.Tag = new TextResourceNodeData { ResourceLocation = key, NodeType = (TextResourceNodeType)resource.Location.type };
root.ToolTipText = key;
if(resource.IsReadOnly) root.ForeColor = SystemColors.GrayText;
nodes.Add(root);
return root;
}
private static void TrySelectNode(TreeNode oldselection, TreeNode node, ref TreeNode toselect)
{
if(oldselection == null || oldselection.Text != node.Text
|| oldselection.ToolTipText != node.ToolTipText
|| oldselection.Tag.ToString() != node.Tag.ToString())
return;
// Found match!
toselect = node;
}
#endregion
#region ================== Events
private void filterproject_TextChanged(object sender, EventArgs e)
{
UpdateResourcesTree();
}
private void filterprojectclear_Click(object sender, EventArgs e)
{
filterproject.Clear();
}
private void filterbytype_SelectedIndexChanged(object sender, EventArgs e)
{
UpdateResourcesTree();
}
private void projecttree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
//TODO: special handling for SCRIPTS/DIALOGUE
if(!(e.Node.Tag is TextResourceNodeData)) throw new NotSupportedException("Tag must be TextResourceData!");
TextResourceNodeData data = (TextResourceNodeData)e.Node.Tag;
// Open file
if(data.Resource != null) scriptpanel.OpenResource(data.Resource);
}
// Switch to opened resource icon
private void projecttree_BeforeExpand(object sender, TreeViewCancelEventArgs e)
{
if(!(e.Node.Tag is TextResourceNodeData)) throw new NotSupportedException("Tag must be TextResourceData!");
TextResourceNodeData data = (TextResourceNodeData)e.Node.Tag;
// Group node?
if(data.NodeType == TextResourceNodeType.DIRECTORY)
{
e.Node.ImageIndex = scriptpanel.Icons.GetScriptFolderIcon(data.ScriptType, true);
e.Node.SelectedImageIndex = e.Node.ImageIndex;
}
}
// Switch to closed resource icon
private void projecttree_BeforeCollapse(object sender, TreeViewCancelEventArgs e)
{
if(!(e.Node.Tag is TextResourceNodeData)) throw new NotSupportedException("Tag must be TextResourceData!");
TextResourceNodeData data = (TextResourceNodeData)e.Node.Tag;
// Group node?
if(data.NodeType == TextResourceNodeType.DIRECTORY)
{
e.Node.ImageIndex = scriptpanel.Icons.GetScriptFolderIcon(data.ScriptType, false);
e.Node.SelectedImageIndex = e.Node.ImageIndex;
}
}
#endregion
}
}

View file

@ -0,0 +1,132 @@
namespace CodeImp.DoomBuilder.Controls
{
partial class ScriptResourcesControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if(disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.projecttree = new CodeImp.DoomBuilder.Controls.BufferedTreeView();
this.filterproject = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.filterprojectclear = new System.Windows.Forms.Button();
this.filterbytype = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// projecttree
//
this.projecttree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.projecttree.HideSelection = false;
this.projecttree.Location = new System.Drawing.Point(3, 56);
this.projecttree.Name = "projecttree";
this.projecttree.ShowNodeToolTips = true;
this.projecttree.Size = new System.Drawing.Size(293, 494);
this.projecttree.TabIndex = 7;
this.projecttree.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.projecttree_NodeMouseDoubleClick);
this.projecttree.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.projecttree_BeforeExpand);
this.projecttree.BeforeCollapse += new System.Windows.Forms.TreeViewCancelEventHandler(this.projecttree_BeforeCollapse);
//
// filterproject
//
this.filterproject.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.filterproject.Location = new System.Drawing.Point(75, 3);
this.filterproject.Name = "filterproject";
this.filterproject.Size = new System.Drawing.Size(190, 20);
this.filterproject.TabIndex = 5;
this.filterproject.TextChanged += new System.EventHandler(this.filterproject_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(37, 6);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Filter:";
//
// filterprojectclear
//
this.filterprojectclear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.filterprojectclear.Image = global::CodeImp.DoomBuilder.Properties.Resources.SearchClear;
this.filterprojectclear.Location = new System.Drawing.Point(271, 1);
this.filterprojectclear.Name = "filterprojectclear";
this.filterprojectclear.Size = new System.Drawing.Size(25, 23);
this.filterprojectclear.TabIndex = 6;
this.filterprojectclear.UseVisualStyleBackColor = true;
this.filterprojectclear.Click += new System.EventHandler(this.filterprojectclear_Click);
//
// filterbytype
//
this.filterbytype.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.filterbytype.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.filterbytype.FormattingEnabled = true;
this.filterbytype.Location = new System.Drawing.Point(75, 29);
this.filterbytype.Name = "filterbytype";
this.filterbytype.Size = new System.Drawing.Size(221, 21);
this.filterbytype.TabIndex = 8;
this.filterbytype.SelectedIndexChanged += new System.EventHandler(this.filterbytype_SelectedIndexChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(9, 33);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(60, 13);
this.label2.TabIndex = 9;
this.label2.Text = "Script type:";
//
// ScriptResourcesControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.label2);
this.Controls.Add(this.filterbytype);
this.Controls.Add(this.projecttree);
this.Controls.Add(this.filterprojectclear);
this.Controls.Add(this.filterproject);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "ScriptResourcesControl";
this.Size = new System.Drawing.Size(299, 553);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private CodeImp.DoomBuilder.Controls.BufferedTreeView projecttree;
private System.Windows.Forms.Button filterprojectclear;
private System.Windows.Forms.TextBox filterproject;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox filterbytype;
private System.Windows.Forms.Label label2;
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,336 @@
#region ======================== Namespaces
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Text;
using System.Windows.Forms;
#endregion
// Based on http://www.codeproject.com/Articles/1106140/VisualStudio-Like-TabControl
namespace CodeImp.DoomBuilder.Controls
{
public class VSTabControl : TabControl
{
#region ======================== Events
public event EventHandler<TabControlEventArgs> OnCloseTabClicked;
#endregion
#region ======================== Properties
public bool ShowClosingButton { get; set; }
[Category("Colors"), Browsable(true), Description("The color of the selected page")]
public Color ActiveColor { get { return activeColor; } set { activeColor = value; } }
[Category("Colors"), Browsable(true), Description("The color of the highlighted page")]
public Color HighlightColor { get { return highlightColor; } set { highlightColor = value; } }
[Category("Colors"), Browsable(true), Description("The color of the background of the tab")]
public Color BackTabColor { get { return backTabColor; } set { backTabColor = value; } }
[Category("Colors"), Browsable(true), Description("The color of the border of the control")]
public Color BorderColor { get { return borderColor; } set { borderColor = value; } }
[Category("Colors"), Browsable(true), Description("The color of the title of the page")]
public Color TextColor { get { return textColor; } set { textColor = value; } }
[Category("Colors"), Browsable(true), Description("The color of the title of the page")]
public Color SelectedTextColor { get { return selectedTextColor; } set { selectedTextColor = value; } }
#endregion
#region ======================== Variables
private readonly StringFormat centersringformat = new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Center };
private TabPage predraggedTab;
private Color textColor = SystemColors.WindowText;
private Color selectedTextColor = SystemColors.HighlightText;
private Color activeColor = SystemColors.HotTrack;
private Color highlightColor = SystemColors.Highlight;
private Color backTabColor = SystemColors.Control;
private Color borderColor = SystemColors.Control;
private int closebuttonmouseoverindex = -1; //mxd
#endregion
#region ======================== Constructor
public VSTabControl()
{
SetStyle(
ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.ResizeRedraw
| ControlStyles.OptimizedDoubleBuffer,
true);
DoubleBuffered = true;
SizeMode = TabSizeMode.Normal;
ItemSize = new Size(240, 16);
AllowDrop = true;
}
#endregion
#region ======================== Event overrides
protected override void CreateHandle()
{
base.CreateHandle();
Alignment = TabAlignment.Top;
}
protected override void OnDragOver(DragEventArgs drgevent)
{
//mxd. Collect used tab page types...
var tabpagetypes = new HashSet<Type>();
foreach(var page in TabPages) tabpagetypes.Add(page.GetType());
//mxd. Identify dragged tab type...
TabPage draggedTab = null;
foreach(var T in tabpagetypes)
{
draggedTab = (TabPage)drgevent.Data.GetData(T);
if(draggedTab != null) break;
}
var pointedTab = GetPointedTab();
if(ReferenceEquals(draggedTab, predraggedTab) && pointedTab != null)
{
drgevent.Effect = DragDropEffects.Move;
if(!ReferenceEquals(pointedTab, draggedTab)) ReplaceTabPages(draggedTab, pointedTab);
}
base.OnDragOver(drgevent);
}
protected override void OnMouseDown(MouseEventArgs e)
{
predraggedTab = GetPointedTab();
//mxd. MEMO: OnMouseUp is not fired when clicking on inactive tab...
if(ShowClosingButton)
{
for(var i = 0; i < TabCount; i++)
{
Rectangle r = GetCloseButtonRect(GetTabRect(i));
if(r.Contains(e.Location))
{
// Raise event...
if(OnCloseTabClicked != null)
{
TabControlEventArgs te = new TabControlEventArgs(TabPages[i], i, TabControlAction.Selected);
OnCloseTabClicked(this, te);
closebuttonmouseoverindex = -1;
}
break;
}
}
}
base.OnMouseDown(e);
}
protected override void OnMouseMove(MouseEventArgs e)
{
if(e.Button == MouseButtons.Left && predraggedTab != null)
{
DoDragDrop(predraggedTab, DragDropEffects.Move);
}
//mxd. Closing button highlight needs updating?
else if(ShowClosingButton)
{
int index = GetPointedTabIndex();
if(index != -1)
{
Rectangle cr = GetCloseButtonRect(GetTabRect(index));
bool inside = cr.Contains(PointToClient(Cursor.Position));
if(inside && closebuttonmouseoverindex == -1)
{
closebuttonmouseoverindex = index;
Refresh();
}
else if(!inside && closebuttonmouseoverindex != -1)
{
closebuttonmouseoverindex = -1;
Refresh();
}
}
}
base.OnMouseMove(e);
}
protected override void OnMouseUp(MouseEventArgs e)
{
predraggedTab = null;
base.OnMouseUp(e);
}
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.Clear(backTabColor);
//mxd
int highlightedtabindex = GetPointedTabIndex();
for(var i = 0; i < TabCount; i++)
{
var tabrect = GetTabRect(i); //mxd
var Header = new Rectangle(
new Point(tabrect.Location.X + 2, tabrect.Location.Y),
new Size(tabrect.Width, tabrect.Height));
var HeaderSize = new Rectangle(Header.Location, new Size(Header.Width, Header.Height));
var TextSize = new Rectangle(HeaderSize.Location.X, HeaderSize.Location.Y, HeaderSize.Width, HeaderSize.Height - 2);
//mxd
if(TabPages[i].ImageIndex != -1)
{
int offset = ImageList.Images[TabPages[i].ImageIndex].Width + 2;
HeaderSize.X += offset;
HeaderSize.Width -= offset;
TextSize.X += offset + 2;
TextSize.Width -= offset + 2;
}
if(i == SelectedIndex || i == highlightedtabindex)
{
// Draws the back of the color when it is selected
var tabbgrect = new Rectangle(tabrect.X, tabrect.Y - 2, tabrect.Width, tabrect.Height + 2);
using(var bgbrush = new SolidBrush(i == SelectedIndex ? activeColor : highlightColor))
g.FillRectangle(bgbrush, tabbgrect);
// Draws the title of the page
using(var textbrush = new SolidBrush(selectedTextColor))
{
g.DrawString(TabPages[i].Text, Font, textbrush, TextSize, centersringformat);
// Draws the closing button
if(ShowClosingButton)
{
//mxd. Draw bg rect?
var bgrect = GetCloseButtonRect(tabrect);
if(closebuttonmouseoverindex == i)
{
using(var bgbrush = new SolidBrush(Color.FromArgb(96, selectedTextColor)))
g.FillRectangle(bgbrush, bgrect);
}
//mxd. Draw X
using(var closepen = new Pen(selectedTextColor, 1f))
{
const int offset = 4;
int tlx = bgrect.X + offset;
int tly = bgrect.Y + offset;
int brx = bgrect.X + bgrect.Width - offset;
int bry = bgrect.Y + bgrect.Height - offset;
g.DrawLine(closepen, tlx, tly, brx, bry);
g.DrawLine(closepen, tlx, bry, brx, tly);
}
}
}
}
else
{
// Simply draw the header when it is not selected
using(var textbrush = new SolidBrush(textColor))
{
g.DrawString(TabPages[i].Text, Font, textbrush, TextSize, centersringformat);
}
}
//mxd. Draw icon?
if(TabPages[i].ImageIndex != -1)
{
g.DrawImage(ImageList.Images[TabPages[i].ImageIndex], Header.X + 2, 3);
}
}
// Draw the background of the tab control
using(var backtabbrush = new SolidBrush(backTabColor))
g.FillRectangle(backtabbrush, new Rectangle(0, ItemSize.Height, Width, Height - ItemSize.Height));
// Draw the border of the TabControl
using(var borderpen = new Pen(borderColor, 2))
g.DrawRectangle(borderpen, new Rectangle(0, ItemSize.Height, Width, Height - ItemSize.Height));
// Draw the horizontal line
using(var linepen = new Pen(activeColor, 2))
g.DrawLine(linepen, new Point(0, ItemSize.Height - 1), new Point(Width, ItemSize.Height - 1));
}
#endregion
#region ======================== Methods
//mxd
private static Rectangle GetCloseButtonRect(Rectangle tabrect)
{
int height = tabrect.Height - 6;
return new Rectangle(tabrect.Right - height - 3, 3, height, height);
}
private TabPage GetPointedTab()
{
for(var i = 0; i < TabPages.Count; i++)
{
if(GetTabRect(i).Contains(PointToClient(Cursor.Position)))
{
return TabPages[i];
}
}
return null;
}
//mxd
private int GetPointedTabIndex()
{
for(var i = 0; i < TabPages.Count; i++)
{
if(GetTabRect(i).Contains(PointToClient(Cursor.Position)))
{
return i;
}
}
return -1;
}
private void ReplaceTabPages(TabPage Source, TabPage Destination)
{
var SourceIndex = TabPages.IndexOf(Source);
var DestinationIndex = TabPages.IndexOf(Destination);
TabPages[DestinationIndex] = Source;
TabPages[SourceIndex] = Destination;
if(SelectedIndex == SourceIndex)
{
SelectedIndex = DestinationIndex;
}
else if(SelectedIndex == DestinationIndex)
{
SelectedIndex = SourceIndex;
}
Refresh();
}
#endregion
}
}

View file

@ -27,6 +27,7 @@ using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Data.Scripting;
using CodeImp.DoomBuilder.GZBuilder.Data;
using CodeImp.DoomBuilder.GZBuilder.MD3;
using CodeImp.DoomBuilder.Geometry;
@ -43,20 +44,6 @@ using Matrix = SlimDX.Matrix;
namespace CodeImp.DoomBuilder.Data
{
public struct TextResource //mxd
{
public string Filename; // Path to text file inside of Resource
public int LumpIndex; // Text lump index if Resource is wad
internal DataReader Resource;
public HashSet<string> Entries; // Actors/models/sounds etc.
public ScriptType ScriptType;
public override string ToString()
{
return Filename + (LumpIndex != -1 ? ":" + LumpIndex : "") + " (" + Entries.Count + " entries)";
}
}
public sealed class DataManager
{
#region ================== Constants
@ -110,7 +97,7 @@ namespace CodeImp.DoomBuilder.Data
private Dictionary<int, AmbientSoundInfo> ambientsounds;
//mxd. Text resources
private Dictionary<ScriptType, HashSet<TextResource>> textresources;
private Dictionary<ScriptType, HashSet<ScriptResource>> scriptresources;
// Background loading
private Queue<ImageData> imageque;
@ -169,7 +156,7 @@ namespace CodeImp.DoomBuilder.Data
public string[] TerrainNames { get { return terrainnames; } }
public string[] DamageTypes { get { return damagetypes; } }
public Dictionary<string, PixelColor> KnownColors { get { return knowncolors; } }
internal Dictionary<ScriptType, HashSet<TextResource>> TextResources { get { return textresources; } }
internal Dictionary<ScriptType, HashSet<ScriptResource>> ScriptResources { get { return scriptresources; } }
internal CvarsCollection CVars { get { return cvars; } }
public Dictionary<int, PixelColor> LockColors { get { return lockcolors; } }
public Dictionary<int, int> LockableActions { get { return lockableactions; } }
@ -344,7 +331,7 @@ namespace CodeImp.DoomBuilder.Data
skyboxes = new Dictionary<string, SkyboxInfo>(StringComparer.Ordinal);
soundsequences = new string[0];
terrainnames = new string[0];
textresources = new Dictionary<ScriptType, HashSet<TextResource>>();
scriptresources = new Dictionary<ScriptType, HashSet<ScriptResource>>();
damagetypes = new string[0];
knowncolors = new Dictionary<string, PixelColor>(StringComparer.OrdinalIgnoreCase);
cvars = new CvarsCollection();
@ -378,9 +365,15 @@ namespace CodeImp.DoomBuilder.Data
// Choose container type
switch(dl.type)
{
//mxd. Load resource in read-only mode if:
// 1. UseResourcesInReadonlyMode map option is set.
// 2. OR file has "Read only" flag set.
// 3. OR resource has "Exclude from testing parameters" flag set.
// 4. OR resource is official IWAD.
// WAD file container
case DataLocation.RESOURCE_WAD:
c = new WADReader(dl, configlist.Contains(dl) || new FileInfo(dl.location).IsReadOnly);
c = new WADReader(dl, General.Map.Options.UseResourcesInReadonlyMode || dl.notfortesting || new FileInfo(dl.location).IsReadOnly);
if(((WADReader)c).WadFile.IsOfficialIWAD) //mxd
{
if(!string.IsNullOrEmpty(prevofficialiwad))
@ -391,12 +384,12 @@ namespace CodeImp.DoomBuilder.Data
// Directory container
case DataLocation.RESOURCE_DIRECTORY:
c = new DirectoryReader(dl, configlist.Contains(dl));
c = new DirectoryReader(dl, General.Map.Options.UseResourcesInReadonlyMode || dl.notfortesting);
break;
// PK3 file container
case DataLocation.RESOURCE_PK3:
c = new PK3Reader(dl, configlist.Contains(dl) || new FileInfo(dl.location).IsReadOnly);
c = new PK3Reader(dl, General.Map.Options.UseResourcesInReadonlyMode || dl.notfortesting || new FileInfo(dl.location).IsReadOnly);
break;
}
}
@ -623,7 +616,7 @@ namespace CodeImp.DoomBuilder.Data
skyboxes = null; //mxd
soundsequences = null; //mxd
terrainnames = null; //mxd
textresources = null; //mxd
scriptresources = null; //mxd
damagetypes = null; //mxd
knowncolors = null; //mxd
cvars = null; //mxd
@ -1842,7 +1835,7 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. Add to text resources collection
textresources[decorate.ScriptType] = new HashSet<TextResource>(decorate.TextResources.Values);
scriptresources[decorate.ScriptType] = new HashSet<ScriptResource>(decorate.ScriptResources.Values);
currentreader = null;
if(!decorate.HasError)
@ -2266,7 +2259,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
foreach(KeyValuePair<string, ModelData> e in parser.Entries)
@ -2348,7 +2341,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
// Get voxel models
@ -2398,7 +2391,7 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
// Create Gldefs Entries dictionary
@ -2485,7 +2478,7 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
}
@ -2519,7 +2512,7 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
reverbs = parser.GetReverbs();
}
@ -2547,7 +2540,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
// Anything to do?
@ -2630,7 +2623,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
soundsequences = parser.GetSoundSequences();
}
@ -2700,7 +2693,7 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
}
@ -2727,7 +2720,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
// Sort
@ -2759,7 +2752,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
// Set as collection
@ -2787,7 +2780,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
// Set as collection
@ -2815,7 +2808,7 @@ namespace CodeImp.DoomBuilder.Data
}
// Add to text resources collection
textresources[parser.ScriptType] = new HashSet<TextResource>(parser.TextResources.Values);
scriptresources[parser.ScriptType] = new HashSet<ScriptResource>(parser.ScriptResources.Values);
currentreader = null;
// Apply to the enums list?

View file

@ -54,16 +54,16 @@ namespace CodeImp.DoomBuilder.Data
protected override void Initialize()
{
// Load all WAD files in the root as WAD resources
string[] wadfiles = GetWadFiles(); //mxd
string[] wadfiles = GetWadFiles();
wads = new List<WADReader>(wadfiles.Length);
foreach(string wadfile in wadfiles)
{
//mxd. Don't add the map file. Otherwise DataManager will try to load it twice (and fial).
// Don't add the map file. Otherwise DataManager will try to load it twice (and fial).
string wadfilepath = Path.Combine(location.location, wadfile);
if(General.Map.FilePathName != wadfilepath)
{
DataLocation wdl = new DataLocation(DataLocation.RESOURCE_WAD, wadfilepath, false, false, true);
wads.Add(new WADReader(wdl, isreadonly));
wads.Add(new WADReader(wdl, isreadonly) { ParentResource = this } );
}
}
}

View file

@ -22,10 +22,10 @@ using System.IO;
using CodeImp.DoomBuilder.Compilers;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.IO;
using SharpCompress.Archive; //mxd
using SharpCompress.Archive;
using SharpCompress.Archive.Zip;
using SharpCompress.Common; //mxd
using SharpCompress.Reader; //mxd
using SharpCompress.Common;
using SharpCompress.Reader;
#endregion
@ -520,21 +520,68 @@ namespace CodeImp.DoomBuilder.Data
return filedata;
}
//mxd. TODO: test this
//mxd
internal override bool SaveFile(MemoryStream stream, string filename, int unused) { return SaveFile(stream, filename); }
internal override bool SaveFile(MemoryStream stream, string filename)
{
// Not implemented in SevenZipArchive...
if(isreadonly || archivetype == ArchiveType.SevenZip) return false;
// Re-open the archive
using(ZipArchive za = (ZipArchive)ArchiveFactory.Open(location.location))
{
if(za == null) return false;
// Convert slashes...
filename = filename.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
// Replace entry
//TODO: Do we need to remove the old entry?
za.AddEntry(filename, stream, stream.Length, DateTime.Now);
// Check if target file is locked...
var checkresult = FileLockChecker.CheckFile(location.location);
if(!string.IsNullOrEmpty(checkresult.Error))
{
string errmsg = "Unable to save file \"" + filename + "\" into archive \"" + location.GetDisplayName() + "\".";
if(checkresult.Processes.Count > 0)
{
string processpath = string.Empty;
try
{
// All manner of exceptions are possible here...
processpath = checkresult.Processes[0].MainModule.FileName;
}
catch { }
errmsg += " Archive is locked by " + checkresult.Processes[0].ProcessName
+ " (" + (!string.IsNullOrEmpty(processpath) ? "\"" + processpath + "\"" : "")
+ ", started at " + checkresult.Processes[0].StartTime + ").";
}
General.ErrorLogger.Add(ErrorType.Error, errmsg);
return false;
}
using(MemoryStream savestream = new MemoryStream())
{
using(ZipArchive za = (ZipArchive)ArchiveFactory.Open(location.location))
{
if(za == null)
{
string errmsg = "Unable to save file \"" + filename + "\" into archive \"" + location.GetDisplayName() + "\". Unable to open target file as a zip archive.";
General.ErrorLogger.Add(ErrorType.Error, errmsg);
return false;
}
// Find and remove original entry...
foreach(ZipArchiveEntry entry in za.Entries)
{
if(!entry.IsDirectory && entry.Key == filename)
{
za.RemoveEntry(entry);
break;
}
}
// Add new entry and save the archive to stream...
za.AddEntry(filename, stream, 0L, DateTime.Now);
za.SaveTo(savestream, CompressionType.Deflate);
}
// Replace archive file...
File.WriteAllBytes(location.location, savestream.ToArray());
}
return true;

View file

@ -55,6 +55,7 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Properties
protected readonly string[] PatchLocations = { PATCHES_DIR, TEXTURES_DIR, FLATS_DIR, SPRITES_DIR, GRAPHICS_DIR }; //mxd. Because ZDoom looks for patches and sprites in this order
internal List<WADReader> Wads { get { return wads; } } //mxd
#endregion
@ -78,7 +79,7 @@ namespace CodeImp.DoomBuilder.Data
{
string tempfile = CreateTempFile(w);
DataLocation wdl = new DataLocation(DataLocation.RESOURCE_WAD, tempfile, Path.Combine(location.GetDisplayName(), Path.GetFileName(w)), false, false, true);
wads.Add(new WADReader(wdl, location.type != DataLocation.RESOURCE_DIRECTORY));
wads.Add(new WADReader(wdl, location.type != DataLocation.RESOURCE_DIRECTORY) { ParentResource = this } );
}
}

View file

@ -0,0 +1,130 @@
#region ================== Namespaces
using System;
using System.Collections.Generic;
using System.IO;
using CodeImp.DoomBuilder.Config;
#endregion
namespace CodeImp.DoomBuilder.Data.Scripting
{
public sealed class ScriptResource
{
#region ================== Variables
private string filename;
private string filepathname;
private string resourcedisplayname;
private int lumpindex = -1;
private DataReader resource;
private string resourcepath;
private HashSet<string> entries;
private ScriptType scripttype;
private bool isreadonly;
// Special cases...
private string parentresourcelocation;
#endregion
#region ================== Properties
public string Filename { get { return filename; } } // Path to text file inside of Resource
public string FilePathName { get { return filepathname; } } // Resource location and file path inside resource combined
public int LumpIndex { get { return lumpindex; } } // Text lump index if Resource is wad, -1 otherwise
internal DataReader Resource { get { return GetResource(); } }
public HashSet<string> Entries { get { return entries; } } // Actors/models/sounds etc.
public ScriptType ScriptType { get { return scripttype; } }
public bool IsReadOnly { get { return isreadonly; } }
#endregion
#region ================== Constructor
public ScriptResource(TextResourceData source, ScriptType type)
{
resource = source.Source;
resourcepath = resource.Location.location;
resourcedisplayname = resource.Location.GetDisplayName();
filename = source.Filename.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
filepathname = Path.Combine(resourcepath, filename);
entries = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
lumpindex = source.LumpIndex;
scripttype = type;
isreadonly = resource.IsReadOnly;
// Embedded resources require additional tender loving care...
if(resource is WADReader)
{
WADReader wr = (WADReader)resource;
if(wr.ParentResource is PK3Reader)
parentresourcelocation = wr.ParentResource.Location.location;
}
}
#endregion
#region ================== Methods
private DataReader GetResource()
{
if(resource == null || resource.IsDisposed)
{
resource = null;
// Try to re-aquire resource
if(!string.IsNullOrEmpty(parentresourcelocation))
{
// Special case: WAD resource inside of PK3 resource.
// Resource resourcepath will be different after reloading resources, because it's randomly generated.
// So resolve using displayname and parent resource location...
foreach(DataReader reader in General.Map.Data.Containers)
{
// Found parent
if(reader.Location.location == parentresourcelocation && reader is PK3Reader)
{
PK3Reader pr = (PK3Reader)reader;
foreach(WADReader wr in pr.Wads)
{
if(wr.Location.GetDisplayName() == resourcedisplayname)
{
// Found it
resource = reader;
// Some paths need updating...
resourcepath = resource.Location.location;
filepathname = Path.Combine(resourcepath, filename);
break;
}
}
}
}
}
else
{
foreach(DataReader reader in General.Map.Data.Containers)
{
if(reader.Location.location == resourcepath)
{
// Found it
resource = reader;
break;
}
}
}
}
return resource;
}
// Used as tab and script navigator item title
public override string ToString()
{
return (lumpindex != -1 ? lumpindex + ":" : "") + Path.GetFileName(filename);
}
#endregion
}
}

View file

@ -23,6 +23,7 @@ using System.IO;
using System.Text.RegularExpressions;
using CodeImp.DoomBuilder.Compilers;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Data.Scripting;
using CodeImp.DoomBuilder.GZBuilder.Data;
using CodeImp.DoomBuilder.IO;
using CodeImp.DoomBuilder.ZDoom;
@ -80,6 +81,7 @@ namespace CodeImp.DoomBuilder.Data
public bool IsIWAD { get { return is_iwad; } }
internal WAD WadFile { get { return file; } } //mxd
internal PK3StructuredReader ParentResource; //mxd
#endregion
@ -94,7 +96,7 @@ namespace CodeImp.DoomBuilder.Data
throw new FileNotFoundException("Could not find the file \"" + location.location + "\"", location.location);
// Initialize
file = new WAD(location.location, true);
file = new WAD(location.location, asreadonly);
strictpatches = dl.option1;
Initialize(); //mxd
@ -126,7 +128,7 @@ namespace CodeImp.DoomBuilder.Data
private void Initialize()
{
is_iwad = file.IsIWAD;
isreadonly = file.IsReadOnly; // I guess opening an official IWAD in write-enabled mode is possible
isreadonly |= is_iwad; // Just in case...
// Initialize
patchranges = new List<LumpRange>();
@ -510,11 +512,11 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. Add to text resources collection
if(!General.Map.Data.TextResources.ContainsKey(parser.ScriptType))
General.Map.Data.TextResources[parser.ScriptType] = new HashSet<TextResource>();
if(!General.Map.Data.ScriptResources.ContainsKey(parser.ScriptType))
General.Map.Data.ScriptResources[parser.ScriptType] = new HashSet<ScriptResource>();
foreach(KeyValuePair<string, TextResource> group in parser.TextResources)
General.Map.Data.TextResources[parser.ScriptType].Add(group.Value);
foreach(KeyValuePair<string, ScriptResource> group in parser.ScriptResources)
General.Map.Data.ScriptResources[parser.ScriptType].Add(group.Value);
return parser; //mxd
}
@ -792,11 +794,11 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. Add to text resources collection
if(!General.Map.Data.TextResources.ContainsKey(parser.ScriptType))
General.Map.Data.TextResources[parser.ScriptType] = new HashSet<TextResource>();
if(!General.Map.Data.ScriptResources.ContainsKey(parser.ScriptType))
General.Map.Data.ScriptResources[parser.ScriptType] = new HashSet<ScriptResource>();
foreach(KeyValuePair<string, TextResource> group in parser.TextResources)
General.Map.Data.TextResources[parser.ScriptType].Add(group.Value);
foreach(KeyValuePair<string, ScriptResource> group in parser.ScriptResources)
General.Map.Data.ScriptResources[parser.ScriptType].Add(group.Value);
return parser; //mxd
}
@ -877,11 +879,11 @@ namespace CodeImp.DoomBuilder.Data
}
//mxd. Add to text resources collection
if(!General.Map.Data.TextResources.ContainsKey(parser.ScriptType))
General.Map.Data.TextResources[parser.ScriptType] = new HashSet<TextResource>();
if(!General.Map.Data.ScriptResources.ContainsKey(parser.ScriptType))
General.Map.Data.ScriptResources[parser.ScriptType] = new HashSet<ScriptResource>();
foreach(KeyValuePair<string, TextResource> group in parser.TextResources)
General.Map.Data.TextResources[parser.ScriptType].Add(group.Value);
foreach(KeyValuePair<string, ScriptResource> group in parser.ScriptResources)
General.Map.Data.ScriptResources[parser.ScriptType].Add(group.Value);
return parser; //mxd
}
@ -1167,7 +1169,7 @@ namespace CodeImp.DoomBuilder.Data
internal override MemoryStream LoadFile(string name, int lumpindex)
{
if(lumpindex < 0 || file.Lumps.Count <= lumpindex || file.Lumps[lumpindex].Name != name)
if(lumpindex < 0 || file.Lumps.Count <= lumpindex || file.Lumps[lumpindex].Name != name.ToUpperInvariant())
return null;
Lump l = file.Lumps[lumpindex];
@ -1193,12 +1195,15 @@ namespace CodeImp.DoomBuilder.Data
l.Stream.Seek(0, SeekOrigin.Begin);
lumpdata.WriteTo(l.Stream);
// Update WAD file
file.WriteHeaders();
return true;
}
internal override bool SaveFile(MemoryStream lumpdata, string lumpname, int lumpindex)
{
if(isreadonly || lumpindex < 0 || file.Lumps.Count <= lumpindex || file.Lumps[lumpindex].Name != lumpname)
if(isreadonly || lumpindex < 0 || file.Lumps.Count <= lumpindex || file.Lumps[lumpindex].Name != lumpname.ToUpperInvariant())
return false;
// Remove the lump
@ -1209,6 +1214,9 @@ namespace CodeImp.DoomBuilder.Data
l.Stream.Seek(0, SeekOrigin.Begin);
lumpdata.WriteTo(l.Stream);
// Update WAD file
file.WriteHeaders();
return true;
}
@ -1253,7 +1261,7 @@ namespace CodeImp.DoomBuilder.Data
// Find the lump
if(lumpname == MapManager.CONFIG_MAP_HEADER) reallumpname = MapManager.TEMP_MAP_HEADER;
Lump lump = file.FindLump(reallumpname);
Lump lump = file.FindLump(reallumpname, lumpindex, lumpindex);
if(lump == null)
throw new Exception("Unable to find lump \"" + reallumpname + "\" to compile in \"" + location.GetDisplayName() + "\".");
@ -1272,6 +1280,29 @@ namespace CodeImp.DoomBuilder.Data
return false;
}
//mxd. AccCompiler requires some additional settings...
if(scriptconfig.ScriptType == ScriptType.ACS)
{
AccCompiler acccompiler = compiler as AccCompiler;
if(acccompiler == null)
{
// Fail
errors.Add(new CompilerError("Unexpected ACS compiler: " + compiler));
return false;
}
if(lumpname == "SCRIPTS" && this == General.Map.TemporaryMapFile)
{
acccompiler.SourceIsMapScriptsLump = true;
}
else
{
//TODO: implement library compiling...
errors.Add(new CompilerError("Compilation of ACS libraries is not supported yet..."));
return false;
}
}
try
{
// Write lump data to temp script file in compiler's temp directory
@ -1298,16 +1329,6 @@ namespace CodeImp.DoomBuilder.Data
compiler.SourceFile = sourcefile;
compiler.WorkingDirectory = Path.GetDirectoryName(inputfile);
//mxd. AccCompiler requires some additional settings...
if(scriptconfig.ScriptType == ScriptType.ACS)
{
AccCompiler acccompiler = compiler as AccCompiler;
if(acccompiler != null)
{
acccompiler.SourceIsMapScriptsLump = (this == General.Map.TemporaryMapFile && lumpname == "SCRIPTS");
}
}
if(compiler.Run())
{
// Process errors

View file

@ -26,6 +26,7 @@ using CodeImp.DoomBuilder.Actions;
using CodeImp.DoomBuilder.Compilers;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Data.Scripting;
using CodeImp.DoomBuilder.Editing;
using CodeImp.DoomBuilder.Geometry;
using CodeImp.DoomBuilder.GZBuilder.Data; //mxd
@ -1852,31 +1853,19 @@ namespace CodeImp.DoomBuilder
{
Cursor.Current = Cursors.WaitCursor;
if(scriptwindow == null)
{
// Load the window
scriptwindow = new ScriptEditorForm();
}
// Load the window?
if(scriptwindow == null) scriptwindow = new ScriptEditorForm();
// Window not yet visible?
if(!scriptwindow.Visible)
{
// Show the window
if(General.Settings.ScriptOnTop)
{
if(scriptwindow.Visible && (scriptwindow.Owner == null)) scriptwindow.Hide();
scriptwindow.Show(General.MainWindow);
}
else
{
if(scriptwindow.Visible && (scriptwindow.Owner != null)) scriptwindow.Hide();
scriptwindow.Show();
}
}
if(!scriptwindow.Visible) scriptwindow.Show();
scriptwindow.TopMost = General.Settings.ScriptOnTop; //mxd
if(scriptwindow.WindowState == FormWindowState.Minimized)
scriptwindow.WindowState = FormWindowState.Normal; //mxd
if(scriptwindow.WindowState == FormWindowState.Minimized) scriptwindow.WindowState = FormWindowState.Normal; //mxd
scriptwindow.Activate();
scriptwindow.Focus();
Cursor.Current = Cursors.Default;
}
@ -1978,7 +1967,7 @@ namespace CodeImp.DoomBuilder
//mxd. Update script numbers and names
private void UpdateScriptNames()
{
General.Map.Data.TextResources[ScriptType.ACS] = new HashSet<TextResource>();
General.Map.Data.ScriptResources[ScriptType.ACS] = new HashSet<ScriptResource>();
// Find SCRIPTS lump and parse it
foreach(MapLumpInfo maplumpinfo in config.MapLumps.Values)
@ -2032,7 +2021,7 @@ namespace CodeImp.DoomBuilder
if(parser.Parse(data, scriptconfig.Compiler.Files, true, AcsParserSE.IncludeType.NONE, false))
{
// Add to text resource list
General.Map.Data.TextResources[parser.ScriptType].UnionWith(parser.TextResources.Values);
General.Map.Data.ScriptResources[parser.ScriptType].UnionWith(parser.ScriptResources.Values);
// Update the names
UpdateScriptNames(parser);
@ -2254,12 +2243,15 @@ namespace CodeImp.DoomBuilder
General.MainWindow.CheckEditModeButton(General.Editing.Mode.EditModeButtonName);
}
//mxd. Update script names
UpdateScriptNames();
//mxd. Script Editor may need updating...
if(scriptwindow != null) scriptwindow.OnReloadResources();
// Reset status
General.MainWindow.DisplayStatus(oldstatus);
Cursor.Current = oldcursor;
//mxd. Update script names
UpdateScriptNames();
}
// Game Configuration action

View file

@ -57,9 +57,8 @@ namespace CodeImp.DoomBuilder.Map
// Additional resources
private DataLocationList resources;
//mxd. View settings for opened script files and lumps
private Dictionary<string, ScriptDocumentSettings> scriptfilesettings;
private Dictionary<string, ScriptDocumentSettings> scriptlumpsettings;
//mxd. View settings for opened script files, resources and lumps
private Dictionary<string, ScriptDocumentSettings> scriptsettings;
// mxd. Script compiler
private string scriptcompiler;
@ -86,6 +85,7 @@ namespace CodeImp.DoomBuilder.Map
//mxd.
private bool uselongtexturenames;
private bool useresourcesinreadonlymode;
//mxd. Position and scale
private readonly Vector2D viewposition;
@ -98,8 +98,7 @@ namespace CodeImp.DoomBuilder.Map
internal string ConfigFile { get { return configfile; } set { configfile = value; } }
internal DataLocationList Resources { get { return resources; } }
internal bool StrictPatches { get { return strictpatches; } set { strictpatches = value; } }
internal Dictionary<string, ScriptDocumentSettings> ScriptFileSettings { get { return scriptfilesettings; } } //mxd
internal Dictionary<string, ScriptDocumentSettings> ScriptLumpSettings { get { return scriptlumpsettings; } } //mxd
internal Dictionary<string, ScriptDocumentSettings> ScriptDocumentSettings { get { return scriptsettings; } } //mxd
internal string ScriptCompiler { get { return scriptcompiler; } set { scriptcompiler = value; } } //mxd
internal string PreviousName { get { return previousname; } set { previousname = value; } }
internal string CurrentName
@ -144,6 +143,7 @@ namespace CodeImp.DoomBuilder.Map
//mxd
public bool UseLongTextureNames { get { return uselongtexturenames; } set { uselongtexturenames = value; } }
public bool UseResourcesInReadonlyMode { get { return useresourcesinreadonlymode; } set { useresourcesinreadonlymode = value; } }
//mxd. Position and scale
public Vector2D ViewPosition { get { return viewposition; } }
@ -163,8 +163,7 @@ namespace CodeImp.DoomBuilder.Map
this.strictpatches = false;
this.resources = new DataLocationList();
this.mapconfig = new Configuration(true);
this.scriptfilesettings = new Dictionary<string, ScriptDocumentSettings>(); //mxd
this.scriptlumpsettings = new Dictionary<string, ScriptDocumentSettings>(); //mxd
this.scriptsettings = new Dictionary<string, ScriptDocumentSettings>(StringComparer.OrdinalIgnoreCase); //mxd
this.scriptcompiler = ""; //mxd
this.tagLabels = new Dictionary<int, string>(); //mxd
this.viewposition = new Vector2D(float.NaN, float.NaN); //mxd
@ -185,8 +184,7 @@ namespace CodeImp.DoomBuilder.Map
this.configfile = cfg.ReadSetting("gameconfig", "");
this.resources = new DataLocationList();
this.mapconfig = new Configuration(true);
this.scriptfilesettings = new Dictionary<string, ScriptDocumentSettings>(); //mxd
this.scriptlumpsettings = new Dictionary<string, ScriptDocumentSettings>(); //mxd
this.scriptsettings = new Dictionary<string, ScriptDocumentSettings>(StringComparer.OrdinalIgnoreCase); //mxd
// Read map configuration
this.mapconfig.Root = cfg.ReadSetting("maps." + mapname, new Hashtable());
@ -238,6 +236,7 @@ namespace CodeImp.DoomBuilder.Map
//mxd
uselongtexturenames = longtexturenamessupported && this.mapconfig.ReadSetting("uselongtexturenames", false);
useresourcesinreadonlymode = this.mapconfig.ReadSetting("useresourcesinreadonlymode", false);
//mxd. Position and scale
float vpx = this.mapconfig.ReadSetting("viewpositionx", float.NaN);
@ -267,8 +266,8 @@ namespace CodeImp.DoomBuilder.Map
}
}
//mxd. Script files settings
IDictionary sflist = this.mapconfig.ReadSetting("scriptfiles", new Hashtable());
//mxd. Read script documents settings
IDictionary sflist = this.mapconfig.ReadSetting("scriptdocuments", new Hashtable());
foreach(DictionaryEntry mp in sflist)
{
// Item is a structure?
@ -276,32 +275,10 @@ namespace CodeImp.DoomBuilder.Map
if(scfinfo != null)
{
ScriptDocumentSettings settings = ReadScriptDocumentSettings(scfinfo);
if(!string.IsNullOrEmpty(settings.Filename)) scriptfilesettings.Add(settings.Filename, settings);
}
}
//mxd. Script lumps settings
IDictionary sllist = this.mapconfig.ReadSetting("scriptlumps", new Hashtable());
foreach(DictionaryEntry mp in sllist)
{
// Item is a structure?
IDictionary sclinfo = mp.Value as IDictionary;
if(sclinfo != null)
{
ScriptDocumentSettings settings = ReadScriptDocumentSettings(sclinfo);
if(!string.IsNullOrEmpty(settings.Filename)) scriptlumpsettings.Add(settings.Filename, settings);
if(!string.IsNullOrEmpty(settings.Filename)) scriptsettings[settings.Filename] = settings;
}
}
}
//mxd. Is that really needed?..
/*~MapOptions()
{
// Clean up
this.resources = null;
this.scriptfilesettings = null; //mxd
this.scriptlumpsettings = null; //mxd
}*/
#endregion
@ -391,6 +368,7 @@ namespace CodeImp.DoomBuilder.Map
//mxd
mapconfig.WriteSetting("uselongtexturenames", uselongtexturenames);
mapconfig.WriteSetting("useresourcesinreadonlymode", useresourcesinreadonlymode);
//mxd. Position and scale
mapconfig.WriteSetting("viewpositionx", General.Map.Renderer2D.OffsetX);
@ -404,16 +382,11 @@ namespace CodeImp.DoomBuilder.Map
// Write grid settings
General.Map.Grid.WriteToConfig(mapconfig, "grid");
//mxd. Write script files settings to config
mapconfig.DeleteSetting("scriptfiles");
foreach(ScriptDocumentSettings settings in scriptfilesettings.Values)
WriteScriptDocumentSettings(mapconfig, "scriptfiles.file", settings);
//mxd. Write script lumps settings to config
mapconfig.DeleteSetting("scriptlumps");
foreach(ScriptDocumentSettings settings in scriptlumpsettings.Values)
WriteScriptDocumentSettings(mapconfig, "scriptlumps.lump", settings);
//mxd. Write script document settings to config
int sdcounter = 0;
mapconfig.DeleteSetting("scriptdocuments");
foreach(ScriptDocumentSettings settings in scriptsettings.Values)
WriteScriptDocumentSettings(mapconfig, "scriptdocuments.document" + (sdcounter++), settings);
// Load the file or make a new file
if(File.Exists(settingsfile))
@ -446,6 +419,9 @@ namespace CodeImp.DoomBuilder.Map
if(scfinfo["hash"] is int) settings.Hash = (int)scfinfo["hash"];
else if(scfinfo["hash"] is long) settings.Hash = (long)scfinfo["hash"];
}
if(scfinfo.Contains("resource") && (scfinfo["resource"] is string)) settings.ResourceLocation = (string)scfinfo["resource"];
if(scfinfo.Contains("tabtype") && (scfinfo["tabtype"] is int)) settings.TabType = (ScriptDocumentTabType)scfinfo["tabtype"];
if(scfinfo.Contains("scripttype") && (scfinfo["scripttype"] is int)) settings.ScriptType = (ScriptType)scfinfo["scripttype"];
if(scfinfo.Contains("caretposition") && (scfinfo["caretposition"] is int)) settings.CaretPosition = (int)scfinfo["caretposition"];
if(scfinfo.Contains("firstvisibleline") && (scfinfo["firstvisibleline"] is int)) settings.FirstVisibleLine = (int)scfinfo["firstvisibleline"];
if(scfinfo.Contains("activetab") && (scfinfo["activetab"] is bool)) settings.IsActiveTab = (bool)scfinfo["activetab"];
@ -498,6 +474,9 @@ namespace CodeImp.DoomBuilder.Map
ListDictionary data = new ListDictionary();
data.Add("filename", settings.Filename);
data.Add("hash", settings.Hash);
data.Add("resource", settings.ResourceLocation);
data.Add("tabtype", (int)settings.TabType);
data.Add("scripttype", (int)settings.ScriptType);
if(settings.CaretPosition > 0) data.Add("caretposition", settings.CaretPosition);
if(settings.FirstVisibleLine > 0) data.Add("firstvisibleline", settings.FirstVisibleLine);
if(settings.IsActiveTab) data.Add("activetab", true);

View file

@ -662,13 +662,6 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap NewScript {
get {
object obj = ResourceManager.GetObject("NewScript", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap OpenMap {
get {
object obj = ResourceManager.GetObject("OpenMap", resourceCulture);
@ -851,6 +844,13 @@ namespace CodeImp.DoomBuilder.Properties {
}
}
internal static System.Drawing.Bitmap ScriptNew {
get {
object obj = ResourceManager.GetObject("ScriptNew", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap ScriptPalette {
get {
object obj = ResourceManager.GetObject("ScriptPalette", resourceCulture);

View file

@ -118,18 +118,21 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="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>
</data>
<data name="Clear" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Clear.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</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="ArrowUp" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ArrowUp.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ClearTextures" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ClearTextures.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MergeGeoRemoveLines" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MergeGeoRemoveLines.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Keyboard" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Keyboard.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -142,8 +145,8 @@
<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="SearchMatchCase" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SearchMatchCase.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="ArrowDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ArrowDown.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>
@ -172,35 +175,29 @@
<data name="Replace" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Replace.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle6" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle6.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>
<data name="MixedThings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MixedThings.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TextUnindent" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TextUnindent.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Marine" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Marine.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="InfoPanelCollapse" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InfoPanelCollapse.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="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="Group" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Group.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TagStatistics" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TagStatistics.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="VisualVertices" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\VisualVertices.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Angle7" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle7.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Screenshot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Screenshot.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -211,14 +208,11 @@
<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="Light_animate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Light_animate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Angle2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CommentSmile" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CommentSmile.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="Search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Search.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>
@ -232,20 +226,32 @@
<data name="Expand" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Expand.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Unpin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Unpin.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="Brightness" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Brightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="SplitSectors" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SplitSectors.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ViewBrightness" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewBrightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Model" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Model.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Configuration" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Configuration.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="CommentProblem" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CommentProblem.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<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="Comment" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Comment.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScriptSnippet" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptSnippet.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>
@ -271,15 +277,18 @@
<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="Angle1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle1.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="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="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>
<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="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>
@ -304,6 +313,9 @@
<data name="Cursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Cursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Configuration" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Configuration.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Preferences" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Preferences.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -313,14 +325,14 @@
<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="ScriptProperty" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptProperty.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="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="ArrowDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ArrowDown.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="SearchMatchCase" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SearchMatchCase.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>
@ -331,6 +343,9 @@
<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="Properties" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Properties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="About" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\About.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -343,8 +358,11 @@
<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="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 name="Angle5" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle5.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Brightness" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Brightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="WordWrap" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\WordWrap.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -352,11 +370,14 @@
<data name="fog" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\fog.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FixedThingsScale" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FixedThingsScale.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="InfoLine" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InfoLine.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<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 name="MergeGeo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MergeGeo.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>
@ -367,12 +388,12 @@
<data name="ScriptError" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptError.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MCrash" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MCrash.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="PuzzlePiece" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="DockerExpand" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DockerExpand.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -388,8 +409,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="PuzzlePiece" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\PuzzlePiece.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<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>
</data>
<data name="SearchPrev" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SearchPrev.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -400,10 +421,13 @@
<data name="GridDynamic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GridDynamic.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="Collapse" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Collapse.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">
<data name="ScriptNew" 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="SnapVerts" type="System.Resources.ResXFileRef, System.Windows.Forms">
@ -412,17 +436,23 @@
<data name="Unlink" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Unlink.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TextIndent" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TextIndent.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<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="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="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 name="ScreenshotActiveWindow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScreenshotActiveWindow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ClearTextures" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ClearTextures.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\Script.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</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="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="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>
@ -430,23 +460,26 @@
<data name="ImageStack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ImageStack.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CommentSmile" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CommentSmile.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SearchMatch" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SearchMatch.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="GridIncrease" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GridIncrease.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<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="GZDB2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GZDB2.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="MergeGeoClassic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MergeGeoClassic.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Comment" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Comment.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="GroupAdd" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GroupAdd.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="VisualVertices" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\VisualVertices.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>
@ -454,23 +487,23 @@
<data name="SearchNext" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SearchNext.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="Add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Light_animate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Light_animate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Light" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Light.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="InfoPanelExpand" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\InfoPanelExpand.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScriptSnippet" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptSnippet.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="TagStatistics" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TagStatistics.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Properties" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Properties.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Add.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Test" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Test.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -478,11 +511,14 @@
<data name="Undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Undo.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 name="CommentProblem" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CommentProblem.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Unpin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Unpin.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="SlimDX_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SlimDX_small.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>
<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>
@ -502,14 +538,17 @@
<data name="Pin" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Pin.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="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="ScriptKeyword" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptKeyword.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MissingThing" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MissingThing.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Angle3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Monster3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Monster3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@ -520,79 +559,40 @@
<data name="DockerCollapse" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\DockerCollapse.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GroupAdd" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GroupAdd.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="ViewBrightness" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ViewBrightness.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<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="Light" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Light.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="Lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Help.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="TextUnindent" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TextUnindent.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SlimDX_small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SlimDX_small.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="MissingThing" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MissingThing.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>
</data>
<data name="ScreenshotActiveWindow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScreenshotActiveWindow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<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="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="Search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Search.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="GZDB2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\GZDB2.ico;System.Drawing.Icon, 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 name="TextIndent" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TextIndent.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Check" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Check.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ScriptProperty" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ScriptProperty.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="FixedThingsScale" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\FixedThingsScale.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle1.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle2.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle3.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle4.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle5" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle5.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle6" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle6.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Angle7" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Angle7.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MergeGeo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MergeGeo.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MergeGeoClassic" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MergeGeoClassic.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MergeGeoRemoveLines" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MergeGeoRemoveLines.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SplitSectors" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\SplitSectors.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 900 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 B

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -2758,7 +2758,6 @@ namespace CodeImp.DoomBuilder.Windows
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menumain;
this.Name = "MainForm";
this.Opacity = 0;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "GZDoom Builder";
this.Deactivate += new System.EventHandler(this.MainForm_Deactivate);

View file

@ -28,6 +28,7 @@ namespace CodeImp.DoomBuilder.Windows
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.Label label3;
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label1;
@ -45,6 +46,8 @@ namespace CodeImp.DoomBuilder.Windows
this.longtexturenames = new System.Windows.Forms.CheckBox();
this.strictpatches = new System.Windows.Forms.CheckBox();
this.datalocations = new CodeImp.DoomBuilder.Controls.ResourceListEditor();
this.readonlyresources = new System.Windows.Forms.CheckBox();
this.tooltip = new System.Windows.Forms.ToolTip(this.components);
label3 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
label1 = new System.Windows.Forms.Label();
@ -154,7 +157,7 @@ namespace CodeImp.DoomBuilder.Windows
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(14, 207);
label4.Location = new System.Drawing.Point(14, 229);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(299, 52);
label4.TabIndex = 17;
@ -163,7 +166,7 @@ namespace CodeImp.DoomBuilder.Windows
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(179, 405);
this.apply.Location = new System.Drawing.Point(179, 427);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 2;
@ -175,7 +178,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(297, 405);
this.cancel.Location = new System.Drawing.Point(297, 427);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 3;
@ -187,13 +190,14 @@ namespace CodeImp.DoomBuilder.Windows
//
this.panelres.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelres.Controls.Add(this.readonlyresources);
this.panelres.Controls.Add(this.longtexturenames);
this.panelres.Controls.Add(this.strictpatches);
this.panelres.Controls.Add(this.datalocations);
this.panelres.Controls.Add(label4);
this.panelres.Location = new System.Drawing.Point(12, 130);
this.panelres.Name = "panelres";
this.panelres.Size = new System.Drawing.Size(397, 269);
this.panelres.Size = new System.Drawing.Size(397, 291);
this.panelres.TabIndex = 1;
this.panelres.TabStop = false;
this.panelres.Text = " Resources ";
@ -222,18 +226,31 @@ namespace CodeImp.DoomBuilder.Windows
//
this.datalocations.AllowDrop = true;
this.datalocations.DialogOffset = new System.Drawing.Point(40, 20);
this.datalocations.Location = new System.Drawing.Point(14, 71);
this.datalocations.Location = new System.Drawing.Point(14, 93);
this.datalocations.Name = "datalocations";
this.datalocations.Size = new System.Drawing.Size(368, 127);
this.datalocations.TabIndex = 0;
//
// readonlyresources
//
this.readonlyresources.AutoSize = true;
this.readonlyresources.Location = new System.Drawing.Point(14, 69);
this.readonlyresources.Name = "readonlyresources";
this.readonlyresources.Size = new System.Drawing.Size(210, 17);
this.readonlyresources.TabIndex = 22;
this.readonlyresources.Text = "Open map resources in read-only mode";
this.tooltip.SetToolTip(this.readonlyresources, "When enabled, map resources will be loaded in read-only mode,\r\nwhich allows to ed" +
"it them in an external application while the map\r\nis opened. You won\'t be able t" +
"o edit resources in the Script Editor.");
this.readonlyresources.UseVisualStyleBackColor = true;
//
// MapOptionsForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(421, 438);
this.ClientSize = new System.Drawing.Size(421, 460);
this.Controls.Add(this.panelres);
this.Controls.Add(this.cancel);
this.Controls.Add(this.apply);
@ -269,6 +286,8 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.Label scriptcompilerlabel;
private System.Windows.Forms.Label examplelabel;
private System.Windows.Forms.CheckBox longtexturenames;
private System.Windows.Forms.CheckBox readonlyresources;
private System.Windows.Forms.ToolTip tooltip;
}

View file

@ -263,6 +263,9 @@ namespace CodeImp.DoomBuilder.Windows
//mxd. Use long texture names?
if(longtexturenames.Enabled) options.UseLongTextureNames = longtexturenames.Checked;
//mxd. Resource usage
options.UseResourcesInReadonlyMode = readonlyresources.Checked;
// Hide window
this.DialogResult = DialogResult.OK;
@ -326,6 +329,9 @@ namespace CodeImp.DoomBuilder.Windows
// Update long texture names checkbox (mxd)
longtexturenames.Enabled = info.Configuration.ReadSetting("longtexturenames", false);
longtexturenames.Checked = longtexturenames.Enabled && options.UseLongTextureNames;
//mxd. Update resource usage
readonlyresources.Checked = options.UseResourcesInReadonlyMode;
}
// When keys are pressed in the level name field

View file

@ -138,4 +138,7 @@ Drag items to change order (lower items override higher items).
Use the context menu to cut, copy, paste or remove items.
Grayed items are loaded according to the game configuration.</value>
</data>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -28,6 +28,7 @@ namespace CodeImp.DoomBuilder.Windows
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.ColumnHeader columnHeader1;
System.Windows.Forms.Label label1;
System.Windows.Forms.Label label2;
@ -43,6 +44,8 @@ namespace CodeImp.DoomBuilder.Windows
this.mapslist = new System.Windows.Forms.ListView();
this.scriptcompiler = new System.Windows.Forms.ComboBox();
this.scriptcompilerlabel = new System.Windows.Forms.Label();
this.readonlyresources = new System.Windows.Forms.CheckBox();
this.tooltip = new System.Windows.Forms.ToolTip(this.components);
columnHeader1 = new System.Windows.Forms.ColumnHeader();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
@ -76,7 +79,7 @@ namespace CodeImp.DoomBuilder.Windows
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(14, 207);
label3.Location = new System.Drawing.Point(14, 227);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(299, 52);
label3.TabIndex = 17;
@ -86,13 +89,14 @@ namespace CodeImp.DoomBuilder.Windows
//
this.panelres.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panelres.Controls.Add(this.readonlyresources);
this.panelres.Controls.Add(this.longtexturenames);
this.panelres.Controls.Add(this.strictpatches);
this.panelres.Controls.Add(this.datalocations);
this.panelres.Controls.Add(label3);
this.panelres.Location = new System.Drawing.Point(12, 246);
this.panelres.Name = "panelres";
this.panelres.Size = new System.Drawing.Size(396, 270);
this.panelres.Size = new System.Drawing.Size(396, 292);
this.panelres.TabIndex = 2;
this.panelres.TabStop = false;
this.panelres.Text = " Resources ";
@ -121,7 +125,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.datalocations.AllowDrop = true;
this.datalocations.DialogOffset = new System.Drawing.Point(40, 20);
this.datalocations.Location = new System.Drawing.Point(14, 71);
this.datalocations.Location = new System.Drawing.Point(14, 91);
this.datalocations.Name = "datalocations";
this.datalocations.Size = new System.Drawing.Size(368, 127);
this.datalocations.TabIndex = 0;
@ -129,7 +133,7 @@ namespace CodeImp.DoomBuilder.Windows
// apply
//
this.apply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.apply.Location = new System.Drawing.Point(178, 524);
this.apply.Location = new System.Drawing.Point(178, 544);
this.apply.Name = "apply";
this.apply.Size = new System.Drawing.Size(112, 25);
this.apply.TabIndex = 3;
@ -141,7 +145,7 @@ namespace CodeImp.DoomBuilder.Windows
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(296, 524);
this.cancel.Location = new System.Drawing.Point(296, 544);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(112, 25);
this.cancel.TabIndex = 4;
@ -205,13 +209,24 @@ namespace CodeImp.DoomBuilder.Windows
this.scriptcompilerlabel.Text = "Script Type:";
this.scriptcompilerlabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// readonlyresources
//
this.readonlyresources.AutoSize = true;
this.readonlyresources.Location = new System.Drawing.Point(14, 68);
this.readonlyresources.Name = "readonlyresources";
this.readonlyresources.Size = new System.Drawing.Size(210, 17);
this.readonlyresources.TabIndex = 21;
this.readonlyresources.Text = "Open map resources in read-only mode";
this.tooltip.SetToolTip(this.readonlyresources, resources.GetString("readonlyresources.ToolTip"));
this.readonlyresources.UseVisualStyleBackColor = true;
//
// OpenMapOptionsForm
//
this.AcceptButton = this.apply;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(420, 559);
this.ClientSize = new System.Drawing.Size(420, 579);
this.Controls.Add(this.scriptcompiler);
this.Controls.Add(this.scriptcompilerlabel);
this.Controls.Add(this.mapslist);
@ -251,6 +266,8 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.ComboBox scriptcompiler;
private System.Windows.Forms.Label scriptcompilerlabel;
private System.Windows.Forms.CheckBox longtexturenames;
private System.Windows.Forms.CheckBox readonlyresources;
private System.Windows.Forms.ToolTip tooltip;
}

View file

@ -392,6 +392,9 @@ namespace CodeImp.DoomBuilder.Windows
// Update long texture names checkbox (mxd)
longtexturenames.Enabled = cfg.ReadSetting("longtexturenames", false);
longtexturenames.Checked = (longtexturenames.Enabled && options != null && options.UseLongTextureNames);
// Update resource usage
readonlyresources.Checked = (options != null && options.UseResourcesInReadonlyMode);
}
// OK clicked
@ -480,6 +483,9 @@ namespace CodeImp.DoomBuilder.Windows
//mxd. Use long texture names?
if(longtexturenames.Enabled) options.UseLongTextureNames = longtexturenames.Checked;
//mxd. Resource usage
options.UseResourcesInReadonlyMode = readonlyresources.Checked;
// Hide window
wadfile.Dispose();
this.DialogResult = DialogResult.OK;

View file

@ -135,4 +135,13 @@ Drag items to change order (lower items override higher items).
Use the context menu to cut, copy, paste or remove items.
Grayed items are loaded according to the game configuration.</value>
</data>
<metadata name="tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="readonlyresources.ToolTip" xml:space="preserve">
<value>When enabled, map resources will be loaded in read-only mode,
which allows to edit them in an external application while the map
is opened. You won't be able to edit resources in the Script Editor.
</value>
</data>
</root>

View file

@ -50,7 +50,6 @@ namespace CodeImp.DoomBuilder.Windows
this.Controls.Add(this.editor);
this.DoubleBuffered = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.Name = "ScriptEditorForm";
this.Opacity = 0;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;

View file

@ -17,7 +17,6 @@
#region ================== Namespaces
using System;
using System.Drawing;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Controls;
@ -46,7 +45,7 @@ namespace CodeImp.DoomBuilder.Windows
public ScriptEditorForm()
{
InitializeComponent();
editor.Initialize();
editor.Initialize(this);
}
#endregion
@ -72,6 +71,12 @@ namespace CodeImp.DoomBuilder.Windows
base.Close();
}
//mxd
internal void OnReloadResources()
{
editor.OnReloadResources();
}
#endregion
#region ================== Events

View file

@ -120,26 +120,138 @@
<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==
AAABAAMAICAAAAEAIACoEAAANgAAABgYAAABACAAiAkAAN4QAAAQEAAAAQAgAGgEAABmGgAAKAAAACAA
AABAAAAAAQAgAAAAAACAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAQAAAAFgAAABYAAAAWAAAAFgAA
ABYAAAAWAAAAFgAAABYAAAAWAAAAFgAAABYAAAAWAAAAFgAAABYAAAAWAAAAFgAAABYAAAAWAAAAFgAA
ABYAAAAWAAAAFgAAABYAAAAWAAAAEAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAEAAAADEAAABCAAAAQwAA
AEMAAABDAAAAQwAAAEMAAABDAAAAQwAAAEMAAABDAAAAQwAAAEMAAABDAAAAQwAAAEMAAABDAAAAQwAA
AEMAAABDAAAAQwAAAEMAAABDAAAAQwAAAEIAAAAxAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAWsLCu86+v
rf+urqv/ra2r/62tq/+trav/ra2r/62tq/+trav/ra2r/62tq/+trav/ra2r/62tq/+trav/rq6s/6+v
rP+urqz/ra2r/62tq/+trav/ra2r/62tq/+urqv/r6+t/7CwrvMAAAAWAAAABgAAAAsAAAAGAAAAAAAA
ABawsK3/////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////srGv/wAAABcAAAASAAAAIgAA
ABEAAAAAAAAAFq6uq///////////////////////////////////////////////////////////////
///+/v7///////////9LSUb///////////////////////////////////////////+4tbD/AAAAHgAA
ACVvbWv/AAAAFgAAAAAAAAAWra2r///////9/f3/////////////////////////////////////////
/////////v7+//z8/P/+/v7//////0JBP//g393///////////+jutL/Lmad/wAsef8vZp7/rMTb/87D
tv8AAAAzLCkmXmFdXP8AAAASAAAAAAAAABatrav///////39/f//////aGho/8HBwf//////k5OT/8HB
wf+/v7///////5GRkf/+/v7//Pz8//39/f//////NjIx/z84NP/p8Pf/Bk2P/wA0gv8AdMr/AECc/wB0
yv8AOIX/DkyL/wADBk9aUEf/VFBO/wAAAAkAAAAAAAAAFq2tq////////Pz8////////////////////
//////////////////////////////39/f/6+vr/+/v7//////++urf/PVBi/wA3hf8GfdH/BlGr/zWa
4v8ARaL/NZri/whNpf8Kfc//AEGL/y1CWPJAOzdqAAAAAgAAAAAAAAAWra2r///////6+vr//f39/5OT
k//BwcL/wMDA/7+/v///////ampq/8LCwv++vr7//Pz8//n5+f/5+fn//v79//////8JTpH/Cly1/zOa
4v8NWbP/TKzs/wBHqP9MrO3/Dlat/zSb4/8QVKX/AEOO8wAAABYAAAAAAAAAAAAAABatrav///////n5
+f/8/Pz//////////////////v7////////////////////////7+/v/+Pj5//n5+f/9/fv//////wAu
ev8kdM7/XrTu/yFqv/90xfn/AEqv/3TF+f8hZrr/XLPv/yhquf8AQYr/AAAAIwAAAA8AAAAGAAAAFq2t
q///////+Pj3//v7+v+Tk5H/v7++/729vP/+/v3/kpKR/76+vf/+/v3/kJCP//v7+v/4+Pf/+vr5////
////////AC98/0mP3P+Mzvv/RIXO/6Xi//8ATrn/peL//0SDy/+Kz/3/S4bK/wA+iP8AAAA8AAAAJwAA
AA0AAAAWra2r///////39/b/+vr5//////////7//f38//7+/f////7//f78//z8+//9/fz/+fn4//j4
9//9/fz/Z2Ri/6qgmf8ANID/bqrp/6Da//8tes7/FGzI/wBVwf8UcM//LHrN/6ji//9uodv/ADyJ/2hf
WLZxbmr/AAAACgAAABatrav///////b19f/6+fn/ZWZm/7y8vP/8+vv/kJCQ/7y8vP+6urr/+/r6/46O
jv/49/f/9/b2//v6+v++u7v/WE5E/wA2gf8AZNv/EHDU/1Ka4v9vsOz/brTv/2+y7/9SmeH/GHHP/wBV
xP8APon/bGJZ/15bWGoAAAACAAAAFq2tq///////9PPz//b19f/6+Pj/+fj4//n39//6+fn/+vn5//j3
9//39vb/+fj4//f29v/29fX/9/b2///+/f//////ADOA/1qv9/9tvfb/VLHy/0qs8f9KrPH/Sqzx/1Sx
8v9nuvb/YrHy/wBDjv8AAAApAAAACQAAAAAAAAAWra2r///////z8vL/8/Ly//X09P/49/f/+/r6//z7
+//7+vr/9/b2//f29v/7+vr//Pv7//r5+f/49/f///38/7+5tP8ANG3/EnTD/yaS4f8mkd3/J5Dc/yiQ
3P8okNz/J5He/yiU4v8Xecb/CEB5/zcyL3oAAAASAAAAAAAAABatrav///////Lx8f/y8fH/9vX1/9zd
2/+SkpL/hISE/4CAgP/6+fn/+vn5/4CAgP+EhIT/kpKS/+bl5f//////PTo3/0VAPv8eXJn/AEmX/wBs
v/8CeM7/A3nO/wJ5zv8AbsH/AFCc/wA9htlZUk7/V1RQ/wAAABYAAAAAAAAAFq2tq///////8fDv//Lx
8P/49/b/kpKS/6ytqv/HxsX/goKD//r59//6+ff/goOD/8fGxf+srar/lJSV//////9KR0X///////r3
9v96nb//EFKU/wA7h/8APon/AD6K/xtcnP9ohqP/AAAAFgAAABFmYmD/AAAAEQAAAAAAAAAWra2r////
///v7+7/8PDv//j49/+FhYb/ubi2/5+gn//Pzc7/9fX0//X19P/Pzc7/oKCf/7m4tv+Hh4f//////1JQ
Tv/6+vn/+ff0/////f9COTL/pZuS/46Ee/9gVU7/IhkV/9LKv/8AAAAWAAAABnNwbf8AAAAGAAAAAAAA
ABatrav//////+7u7f/x8fD/8vHx/4qKiv+4uLb/jo6P//Lw8f/x8fD/8fHw//Lw8f+Ki4v/uLi2/4iI
iP/29fX/9/f2//Ly8f/x8O//+fj2/4J+fv8xLSz/Kign/x8dHf+KiIn/v724/wAAABYAAAAAAAAAAAAA
AAAAAAAAAAAAFq2tq///////7+/u//b29P/Ix8f/kpKR/7++vP+Ghob/9vb1/+/v7v/v7+7/9vb1/4aG
hv+/vrz/kpKR/8jHx//39/b/8PDv/+7u7f/w8O//9vf1//z8+//+/v3//f38//////+ysrD/AAAAFgAA
AAAAAAAAAAAAAAAAAAAAAAAWra2r///////y8vH/goKC/5WUlP+1tLL/t7e2/4yMi//09PP/7e7s/+3u
7P/09PP/jIyL/7e3tv+1tLL/lZSU/4KCg//z8/H/7e3s/+zt6//u7u3/7u/t/+7v7f/u7u3//////66u
rP8AAAAWAAAAAAAAAAAAAAAAAAAAAAAAABatrav///////Lx8f+FhYX/xMLB/66tq/+MjI3/z8/O//Hw
8P/s6+v/7Ovr//Hw8P/X1tb/jIyN/6mopv/EwsH/hYWG//Py8v/s6+v/6+rq/+vq6v/r6ur/6unp/+ro
6f//////ra2r/wAAABYAAAAAAAAAAAAAAAAAAAAAAAAAFq2tq///////8O7u/4KCg/+hoKD/xcTD/5+e
nP+MjY3/8fDw/+vq6v/r6ur/8fDw/4yMjf+bmpn/xsTE/6GgoP+CgoP/8O/v/+rp6f/p6Oj/6ejo/+no
6P/o5+f/6Ofn//////+trav/AAAAFgAAAAAAAAAAAAAAAAAAAAAAAAAWra2r///////r6ur/6uno/729
vP+ioqH/qaek/4uKiv/x8PD/6+rq/+vq6v/x8PD/h4eI/6mnpP+ioqL/vb28/+rp6P/19fT/////////
/////////////////////////////66uq/8AAAAWAAAAAAAAAAAAAAAAAAAAAAAAABatrqv//////+jm
5f/r6un/7Orp/5mZmP+xsK7/iYmJ//Lx8P/r6un/6+ro//Lx7/+Liov/sbCt/5iYmP/x8O//6uno////
///Ly8r/p6ek/6enpf+np6X/p6ek/6Wlov//////r6+t/wAAABAAAAAAAAAAAAAAAAAAAAAAAAAAFq6u
q///////5uTj/+no5//o5+b/hoaG/7+7uv+Vk5L/wcLB/+zr6v/s6+r/yMjH/5WTkv++urn/hYaG/+/t
7P/n5uX//////6enpP//////+/z8//b19f/v7u3//////+np6f+vr63qAAAABQAAAAAAAAAAAAAAAAAA
AAAAAAAWrq6r///////k4+L/5+bl/+zr6v+RkZH/xMHA/9LQzv+EhIX/7u3s/+7t7P+EhIT/0s/O/8PB
wP+QkZH/7Ovp/+bl4///////p6el//v8/P/z8vL/6+rp///////n5+f/ra2q5QAAAAUAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAABaurqv//////+Pi4f/l5OP/6Ofm/9LS0f+RkZH/hYWG/4KDg//s6+r/7Ovq/4KD
g/+FhYb/kZGR/9LS0f/o5+b/5OPi//////+np6X/9vX1/+vq6f//////5ubm/6ysqeUAAAAFAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAFq6uq///////4uHg/+Pi4f/k4+L/5+bl/+ro5//r6uj/6ujn/+bl
5P/m5eT/6ujn/+vq6P/q6Of/5+bl/+Tj4v/i4eD//////6enpP/v7u3//////+bm5v+trarmAAAABQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVrq6s///////g397/4eDf/+Hg3//h4N//4uHg/+Lh
4P/i4eD/4eDf/+Hg3//i4eD/4uHg/+Lh4P/h4N//4eDf/+Df3v//////paWj///////n5+f/p6ekrAAA
AAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2vr63/////////////////////////
////////////////////////////////////////////////////////////////////////6enp/6en
pa4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABK+vrbSwsK3/rq6s/66u
q/+urqv/rq6r/66uq/+urqv/rq6r/66uq/+urqv/rq6r/66uq/+urqv/rq6r/66uq/+trqv/rq6r/6+v
rf+srKqwAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAAADwAA
AAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAABAAAAAQAA
AAEAAAAPAAAADwAAAA8AAAAPAAAADwAAAA8AAAAPAAAADwAAAB8AAAA/AAAAfwAAAP8AAAH/AAAD/ygA
AAAYAAAAMAAAAAEAIAAAAAAAYAkAAAAAAAAAAAAAAAAAAAAAAABUVFQLAAAAHAAAACEAAAAhAAAAIQAA
ACEAAAAhAAAAIQAAACEAAAAhAAAAIQAAACEAAAAhAAAAIQAAACEAAAAhAAAAIQAAACEAAAAhAAAAHC85
QwsAAAAAAAAAAAAAAAAWFhUyV1dWmVdXVaBWVlWhVlZVoVZWVaFWVlWhVlZVoVZWVaFWVlWhVlZVoVZW
VaFXV1ahV1dWoVZWVaFWVlWhVlZVoVZWVaFXV1WhV1dWmRUVFTI/VWwDMURWBAAAAAAsLCtPzc3L/erq
6v7q6ur/6urq/urq6v7q6ur/6urq/urq6v7q6ur/6urq/urq6v/q6ur+6urq/urq6v7q6ur/6urq/urq
6v7q6ur/zs3M/SwsK1ANEhcSBwsOFS9FXAMrKypQ1tbV//7+/v//////////////////////////////
/////////v7+//7+/v/R0dD/oJ+d//39/f/5+/z/2ePt/8LN3//T3ur/09TT/y8uLFojIiFmNTQziixD
WwUrKypQ1tbV/v39/f7s7Oz/ycnJ/vf39/7Ozs7/39/f/vb29v7V1dX//Pz8/v39/f/Ozc3+ZWJg/trc
3v52mr//NHGu/gVDlP4ncbP/YYKo/hsiKnBIQz7CLSsqhixFXgMrKypQ1tbV/vz8/P719fX/5OTk/vv7
+/7n5+f/7+/v/vr6+v7q6ur/+/v7/vv7+//m5eT+bHB1/jtejv4FZ7j/Fm2+/glWr/4ffsz/CFyt/gJB
ft47RE7bOUZSSQAAAAArKypQ1tbV//v7+//p6en/v7+//9DQ0P/b29v/x8fH/8DAwP/Z2dn/+vr6//n5
+f/+/v3/gqLF/w5br/8yj9n/NIfS/xViu/9FnOD/KH3L/yBruf8AMWm/FiUzDjRZewIrKypQ1tbV/vr6
+f7v7+7/09PT/t7e3f7w8PD/09PS/vb29f7U1NT/+fn5/vn5+P/+/v3+f5a8/ihsvv5krun/X6Xh/iNt
xf52u+3/Uprc/keKzv4AL2bLAAAAJRQjMQ0rKypQ1tbV/vn5+P709PP/6eno/u3t7P739/b/6Ojn/vj4
9/7n5+b/+Pj3/vv7+v+ZlZP+X3WY/kuHzP6AwPL/NYPR/g5gxP42iNf/aazl/nSq4P4TP3flUUxIsBUU
EzorKypQ1tbV//j39//d3Nz/qqqq/+/t7v+zsrL/ysrK/+7t7f+8vLz/9/b2//n4+P+7t7X/QFd5/xBm
yf8yit//XKfp/2Wx7/9hrO3/P5Hf/x1x0f8UQXjxS0ZCjT1bdxUrKypQ1tbV/vb19f719PT/9/b2/vn4
+P77+vr/+Pf3/vf29v76+fn/+Pf3/vf29v/29fP+b4en/ih5w/5Gper/Op/m/jid5v46nuf/QqPp/j+Z
3/4JN2jTDQwLLy5MagMrKypQ1tbV//X09P/z8vL/7Ozr/7q5uf+hoaH/zMvL//n4+P+fn5//p6am/9va
2v/W1dT/SEtQ/yFYjf8JYbH/CnnM/wt+0f8LfM//CWu6/wZRm+lHTVT2JyUjeTRSbgUrKypQ1tbV/vTz
8v7z8vH/w8LC/qenpf6zsrL/x8bG/vj39v6fn5//tra0/piYmP/S0dD+pKOi/vr49/57m7n/Ik+C/iVQ
hv4ZRXr/T3GS/iAlKlAtMzhKQEJFhkNgegMrKypQ1tbV/vLy8f7x8fD/vr29/qyrqv6pqan/6ejo/vLy
8f7NzMz/pqal/pOTk//k5OP+zczL/vX08v7V09H/Zl9b/l9ZVP5FPjv/j4qF/jIwLlBsiaIiaH+TQQAA
AAArKypQ1tbV/vLy8v7s7Or/sbCw/rGxr/6jo6P/8vHx/u/v7v7Z2dj/oqGg/puamf/c29v+8/Py/u/u
7f7s6+r/0dDP/snIx/7MzMv/y8rJ/i0tLFAAAAAAAAAAAAAAAAArKypQ1tbV//X19P+Kior/qqmn/66t
rP+ysrH/8PDv/+zt6//e3t3/paWk/7Cwrv+ZmJj/u7q6/+7u7f/s7Ov/7e3s/+3t7P/x8fH/1tbV/ysr
KlAAAAAAAAAAAAAAAAArKypQ1tbV/vTz8/6Pjo//tbSz/p6dnf6+vr7/7u3t/uvq6v7h4OD/oqGi/q6t
rP+mpaX+urq6/uzr6/7q6en/6ejo/uno6P7u7e3/1dXU/isrKlAAAAAAAAAAAAAAAAArKypQ1tbV/vDv
7/7Jycj/sLCv/qemo/6kpKT/7ezs/urp6f7W1tb/lpaV/qmoqP+8vLv+4eHg/vj39/75+fn/+fn5/vn5
+f76+vr/1tbU/isrKlAAAAAAAAAAAAAAAAArKypQ1tbV/+3s6//q6ej/v769/6yrqf+ioqH/6Ofm/+vq
6P/R0M//oZ+e/5ubmv/u7ez/9PPz/9HR0P+9vbv/u7u6/7m5t//Ly8n/1NTT/FBPT0gAAAAAAAAAAAAA
AAArKypQ1tbV/uvq6f7o5+b/urq5/rSxsP6vrqz/x8fH/uzr6v6pqKj/ure2/piYl//r6uj+8vLx/ry8
u/77/Pz/8/Py/vX09P7p6ej7xMTCtMLCwB8AAAAAAAAAAAAAAAArKypQ1tbV/urp6P7m5eT/1dTT/qam
pf6SkpL/t7e3/uzr6v6IiIj/mpqa/ri4uP/n5uX+8fHw/ry8u/709PT/8/Ly/u/v7/6+vry/zs7MHwAA
AAAAAAAAAAAAAAAAAAArKypQ1tbV/+no5//j4uH/5OPi/+fl5P/o5+b/5uXk/+Tj4v/o5uX/6Ofl/+bl
5P/i4eD/8O/v/7y8uv/09PP/5+fn9L6+vLzT09ICAAAAAAAAAAAAAAAAAAAAAAAAAAArKytM1tbV/vPy
8v7w7+//7+/u/vDv7/7w8O//8O/v/u/v7v7w8O//8O/v/vDv7//v7+7+9/b2/t3d3P7o6Oj1wcHAls3N
zBYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACWlZQ2ubm34sLCwP7CwsD/wsK//sLCv/7CwsD/wsK//sLC
v/7CwsD/wsK//sLCwP/Cwr/+wcK//sLCwf6+vr2ezs7NFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAcAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA
BwAAAAcAAAAHAAAABwAAAAcAAAAHAAAADwAAAB8AAAA/AAAAfwAoAAAAEAAAACAAAAABACAAAAAAAEAE
AAAAAAAAAAAAAAAAAAAAAAAAJSUlFQAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAA
ACwAAAAsAAAALBUZHhUAAAAAAAAAAFhYVofW1tX/1tbV/9bW1f/W1tX/1tbV/9bW1f/W1tX/1tbV/9bW
1f/W1tX/1tbV/9bW1f9YWFeHERkfES1BVQVWVlWK/v7+///////////////////////+/v7//f39/6Ki
oP/39/b/6O3z/4ukxf+2yt3/YV5Zkz88O6AdLT0KVlZViv39/f/Z2dn/7+/v/9TU1P/v7+//4uLi//v7
+/+8urn/WWuE/wRTo/8NZLr/D2S1/wZDetNGR0nWLEhjAlZWVYr8/Pz/4uLi/9/f4P/u7u//ysrK/+3t
7f/4+Pn//v79/w1To/8vhND/MIDP/zuL0/8yg8z/ACFGiipIZAVWVlWK+/v6/+Hh4P/e3t3/4+Pi/+3t
7P/g4N//+fn4/8PAvv8tZ7D/Z6nl/y580P9Kk9n/erbo/xo2WrwcGxpPVlZVivr5+f/T09P/6unp/9DP
z//p6Oj/3dzc//f29v/Fwb7/Fl+0/0ie5/9cr+//V6rs/ziM3v8bOFzJNUhbHVZWVYr4+Pj/9PPz/9jY
1/++vr7/+Pf3/76+vv/a2dn/vru5/x1Rgf8TdsX/FYTV/xSC0v8PZrL1O0ZR3SI2SQpWVlWK9/f2//T0
8/+fn57/ra2t//f39f+ura3/oKCf/6alpP/7+fj/comg/0xmh/8nQmL/TlRYilBXXYVBW3IFVlZVivb2
9v/o5+f/pKSj/7++vv/w8O//vr29/6Skov/r6ur/8PDv/9jX1v+Vk5L/qaio/1xbWooAAAAAAAAAAFZW
VYr4+Pj/mJeX/6mpqP/Qz8//7Ozr/9LR0f+op6b/mJeX/+/v7v/s6+v/7Ozr//X19f9WVlWKAAAAAAAA
AABWVlWK9vX1/7Kysf+rqqn/vr29/+vq6v+9vL3/q6mo/7Kysf/z8/L/9PPz//Pz8//5+fn/VlZVigAA
AAAAAAAAVldVivPy8f/q6Of/o6Kh/7Szs//r6un/trW0/6Oiof/s6+r/3Nzb/9LS0f/MzMr/4+Pi/4eH
hn8AAAAAAAAAAFdXVYrx8PD/6Ofm/66trP+Xl5f/7ezr/5eWlv+traz/5+bl/9PT0v/z8/P/8/Pz/8XF
w7PNzcwBAAAAAAAAAABXV1WK8O/v/+Lh4P/l4+L/5uXj/+Pi4f/m5eP/5ePi/+Hg3//S0tH/9fT0/8PD
waXT09IBAAAAAAAAAAAAAAAAhoaFcdfX1f/W1tX/1tbV/9bW1f/W1tX/1tbV/9bW1f/W1tX/1tbV/8PD
wpgAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD
AAAAAwAAAAMAAAADAAAAAwAAAAcAAAAfAAA=
</value>
</data>
</root>

View file

@ -33,7 +33,7 @@ namespace CodeImp.DoomBuilder.Windows
this.casesensitive = new System.Windows.Forms.CheckBox();
this.wordonly = new System.Windows.Forms.CheckBox();
this.replacetext = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.labelreplace = new System.Windows.Forms.Label();
this.findnextbutton = new System.Windows.Forms.Button();
this.replaceallbutton = new System.Windows.Forms.Button();
this.closebutton = new System.Windows.Forms.Button();
@ -84,14 +84,14 @@ namespace CodeImp.DoomBuilder.Windows
this.replacetext.Size = new System.Drawing.Size(152, 20);
this.replacetext.TabIndex = 1;
//
// label2
// labelreplace
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 54);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 13);
this.label2.TabIndex = 6;
this.label2.Text = "Replace with:";
this.labelreplace.AutoSize = true;
this.labelreplace.Location = new System.Drawing.Point(14, 54);
this.labelreplace.Name = "labelreplace";
this.labelreplace.Size = new System.Drawing.Size(72, 13);
this.labelreplace.TabIndex = 6;
this.labelreplace.Text = "Replace with:";
//
// findnextbutton
//
@ -157,7 +157,7 @@ namespace CodeImp.DoomBuilder.Windows
this.Controls.Add(this.closebutton);
this.Controls.Add(this.replaceallbutton);
this.Controls.Add(this.findnextbutton);
this.Controls.Add(this.label2);
this.Controls.Add(this.labelreplace);
this.Controls.Add(this.replacetext);
this.Controls.Add(this.wordonly);
this.Controls.Add(this.casesensitive);
@ -184,7 +184,7 @@ namespace CodeImp.DoomBuilder.Windows
private System.Windows.Forms.CheckBox casesensitive;
private System.Windows.Forms.CheckBox wordonly;
private System.Windows.Forms.TextBox replacetext;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label labelreplace;
private System.Windows.Forms.Button findnextbutton;
private System.Windows.Forms.Button replaceallbutton;
private System.Windows.Forms.Button closebutton;

View file

@ -28,10 +28,24 @@ namespace CodeImp.DoomBuilder.Windows
#region ================== Variables
private bool appclose;
private bool canreplace;
#endregion
#region ================== Properties
internal bool CanReplace //mxd
{
get { return canreplace; }
set
{
canreplace = value;
labelreplace.Enabled = canreplace;
replacetext.Enabled = canreplace;
replacebutton.Enabled = canreplace;
replaceallbutton.Enabled = canreplace;
}
}
#endregion

View file

@ -126,7 +126,7 @@
<metadata name="replacetext.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="label2.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="labelreplace.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -0,0 +1,132 @@
namespace CodeImp.DoomBuilder.Windows
{
partial class ScriptGoToLineForm
{
/// <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.label = new System.Windows.Forms.Label();
this.linenumber = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox();
this.panel1 = new System.Windows.Forms.Panel();
this.cancel = new System.Windows.Forms.Button();
this.accept = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// label
//
this.label.AutoSize = true;
this.label.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.label.Location = new System.Drawing.Point(13, 19);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(68, 13);
this.label.TabIndex = 0;
this.label.Text = "Line number:";
//
// linenumber
//
this.linenumber.AllowDecimal = false;
this.linenumber.AllowExpressions = false;
this.linenumber.AllowNegative = false;
this.linenumber.AllowRelative = false;
this.linenumber.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.linenumber.ButtonStep = 1;
this.linenumber.ButtonStepBig = 10F;
this.linenumber.ButtonStepFloat = 1F;
this.linenumber.ButtonStepSmall = 0.1F;
this.linenumber.ButtonStepsUseModifierKeys = false;
this.linenumber.ButtonStepsWrapAround = false;
this.linenumber.Location = new System.Drawing.Point(87, 14);
this.linenumber.Name = "linenumber";
this.linenumber.Size = new System.Drawing.Size(186, 24);
this.linenumber.StepValues = null;
this.linenumber.TabIndex = 1;
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.panel1.Controls.Add(this.linenumber);
this.panel1.Controls.Add(this.label);
this.panel1.Location = new System.Drawing.Point(-1, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(286, 50);
this.panel1.TabIndex = 2;
//
// cancel
//
this.cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(185, 58);
this.cancel.Name = "cancel";
this.cancel.Size = new System.Drawing.Size(94, 26);
this.cancel.TabIndex = 2;
this.cancel.Text = "Cancel";
this.cancel.UseVisualStyleBackColor = true;
this.cancel.Click += new System.EventHandler(this.cancel_Click);
//
// accept
//
this.accept.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.accept.Location = new System.Drawing.Point(85, 58);
this.accept.Name = "accept";
this.accept.Size = new System.Drawing.Size(94, 26);
this.accept.TabIndex = 3;
this.accept.Text = "OK";
this.accept.UseVisualStyleBackColor = true;
this.accept.Click += new System.EventHandler(this.accept_Click);
//
// ScriptGoToLineForm
//
this.AcceptButton = this.accept;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(284, 89);
this.Controls.Add(this.accept);
this.Controls.Add(this.cancel);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ScriptGoToLineForm";
this.Opacity = 0;
this.Text = "Go To Line";
this.Shown += new System.EventHandler(this.ScriptGoToLineForm_Shown);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label;
private CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox linenumber;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button cancel;
private System.Windows.Forms.Button accept;
}
}

View file

@ -0,0 +1,32 @@
using System;
using System.Windows.Forms;
namespace CodeImp.DoomBuilder.Windows
{
public partial class ScriptGoToLineForm : DelayedForm
{
public int LineNumber { get { return linenumber.GetResult(-1); } set { linenumber.Text = value.ToString(); } }
public ScriptGoToLineForm()
{
InitializeComponent();
}
private void accept_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
private void cancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void ScriptGoToLineForm_Shown(object sender, EventArgs e)
{
linenumber.Focus();
}
}
}

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -188,7 +188,7 @@ namespace CodeImp.DoomBuilder.ZDoom
}
//mxd. Add to current text resource
if(!textresources[textresourcepath].Entries.Contains(actor.ClassName)) textresources[textresourcepath].Entries.Add(actor.ClassName);
if(!scriptresources[textresourcepath].Entries.Contains(actor.ClassName)) scriptresources[textresourcepath].Entries.Add(actor.ClassName);
}
break;

View file

@ -24,6 +24,7 @@ using System.IO;
using CodeImp.DoomBuilder.Compilers;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Data;
using CodeImp.DoomBuilder.Data.Scripting;
using CodeImp.DoomBuilder.Rendering;
#endregion
@ -65,7 +66,7 @@ namespace CodeImp.DoomBuilder.ZDoom
//mxd. Text lumps
protected string textresourcepath;
protected readonly Dictionary<string, TextResource> textresources;
protected readonly Dictionary<string, ScriptResource> scriptresources;
protected readonly HashSet<string> untrackedtextresources;
#endregion
@ -79,7 +80,7 @@ namespace CodeImp.DoomBuilder.ZDoom
public string ErrorSource { get { return errorsource; } }
public bool HasError { get { return (errordesc != null); } }
internal abstract ScriptType ScriptType { get; } //mxd
internal Dictionary<string, TextResource> TextResources { get { return textresources; } } //mxd
internal Dictionary<string, ScriptResource> ScriptResources { get { return scriptresources; } } //mxd
#endregion
@ -90,7 +91,7 @@ namespace CodeImp.DoomBuilder.ZDoom
{
// Initialize
errordesc = null;
textresources = new Dictionary<string, TextResource>(StringComparer.OrdinalIgnoreCase); //mxd
scriptresources = new Dictionary<string, ScriptResource>(StringComparer.OrdinalIgnoreCase); //mxd
untrackedtextresources = new HashSet<string>(StringComparer.OrdinalIgnoreCase); //mxd
skipregions = true; //mxd
}
@ -148,23 +149,15 @@ namespace CodeImp.DoomBuilder.ZDoom
}
string path = Path.Combine(parsedata.SourceLocation.location, parsedata.Filename + (parsedata.LumpIndex != -1 ? "#" + parsedata.LumpIndex : ""));
if(textresources.ContainsKey(path) || untrackedtextresources.Contains(path))
if(scriptresources.ContainsKey(path) || untrackedtextresources.Contains(path))
return false;
//mxd. Create TextResource for this file
if(parsedata.Trackable)
{
textresourcepath = path;
TextResource res = new TextResource
{
Resource = parsedata.Source,
Entries = new HashSet<string>(StringComparer.OrdinalIgnoreCase),
Filename = parsedata.Filename.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar),
LumpIndex = parsedata.LumpIndex,
ScriptType = this.ScriptType,
};
textresources.Add(textresourcepath, res);
ScriptResource res = new ScriptResource(parsedata, this.ScriptType);
scriptresources.Add(textresourcepath, res);
}
// Track the untrackable!
else