mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-22 20:02:48 +00:00
Fixed, Script Editor: bottom panel was not automatically expanded after adding a script error.
Fixed, Script Editor: in some cases extra indentation was added to the duplicated line when using "Duplicate Line" command. Added, Script Editor: some editor comments were missing from ZDoom_DECORATE.cfg. Fixed, Game Configurations: fixed a crash when overriding an existing linedef action definition by a one from a different category (this fixes Issue #1).
This commit is contained in:
parent
1c684f7213
commit
a41058bef9
4 changed files with 60 additions and 11 deletions
|
@ -56,6 +56,36 @@ keywords
|
|||
$Arg2Enum = "//$Arg2Enum ";
|
||||
$Arg3Enum = "//$Arg3Enum ";
|
||||
$Arg4Enum = "//$Arg4Enum ";
|
||||
$Arg0RenderStyle = "//$Arg0RenderStyle \"[EP]\"";
|
||||
$Arg1RenderStyle = "//$Arg1RenderStyle \"[EP]\"";
|
||||
$Arg2RenderStyle = "//$Arg2RenderStyle \"[EP]\"";
|
||||
$Arg3RenderStyle = "//$Arg3RenderStyle \"[EP]\"";
|
||||
$Arg4RenderStyle = "//$Arg4RenderStyle \"[EP]\"";
|
||||
$Arg0RenderColor = "//$Arg0RenderColor ";
|
||||
$Arg1RenderColor = "//$Arg1RenderColor ";
|
||||
$Arg2RenderColor = "//$Arg2RenderColor ";
|
||||
$Arg3RenderColor = "//$Arg3RenderColor ";
|
||||
$Arg4RenderColor = "//$Arg4RenderColor ";
|
||||
$Arg0MinRange = "//$Arg0MinRange ";
|
||||
$Arg1MinRange = "//$Arg1MinRange ";
|
||||
$Arg2MinRange = "//$Arg2MinRange ";
|
||||
$Arg3MinRange = "//$Arg3MinRange ";
|
||||
$Arg4MinRange = "//$Arg4MinRange ";
|
||||
$Arg0MaxRange = "//$Arg0MaxRange ";
|
||||
$Arg1MaxRange = "//$Arg1MaxRange ";
|
||||
$Arg2MaxRange = "//$Arg2MaxRange ";
|
||||
$Arg3MaxRange = "//$Arg3MaxRange ";
|
||||
$Arg4MaxRange = "//$Arg4MaxRange ";
|
||||
$Arg0MinRangeColor = "//$Arg0MinRangeColor ";
|
||||
$Arg1MinRangeColor = "//$Arg1MinRangeColor ";
|
||||
$Arg2MinRangeColor = "//$Arg2MinRangeColor ";
|
||||
$Arg3MinRangeColor = "//$Arg3MinRangeColor ";
|
||||
$Arg4MinRangeColor = "//$Arg4MinRangeColor ";
|
||||
$Arg0MaxRangeColor = "//$Arg0MaxRangeColor ";
|
||||
$Arg1MaxRangeColor = "//$Arg1MaxRangeColor ";
|
||||
$Arg2MaxRangeColor = "//$Arg2MaxRangeColor ";
|
||||
$Arg3MaxRangeColor = "//$Arg3MaxRangeColor ";
|
||||
$Arg4MaxRangeColor = "//$Arg4MaxRangeColor ";
|
||||
$Color = "//$Color ";
|
||||
$Obsolete = "//$Obsolete \"[EP]\"";
|
||||
$GZDB_SKIP = "//$GZDB_SKIP";
|
||||
|
|
|
@ -677,13 +677,23 @@ namespace CodeImp.DoomBuilder.Config
|
|||
// Check if the item value is a structure
|
||||
if(de.Value is IDictionary)
|
||||
{
|
||||
// Make the line type
|
||||
LinedefActionInfo ai = new LinedefActionInfo(actionnumber, cfg, cde.Key.ToString(), enums);
|
||||
|
||||
// Add action to category and sorted list
|
||||
sortedlinedefactions.Add(ai);
|
||||
linedefactions.Add(actionnumber, ai);
|
||||
ac.Add(ai);
|
||||
//mxd. Sanity check...
|
||||
if(linedefactions.ContainsKey(actionnumber))
|
||||
{
|
||||
General.ErrorLogger.Add(ErrorType.Error, "Structure \"linedeftypes\" contains duplicate action definition for action " + actionnumber
|
||||
+ " in the \"" + this.Name + "\" game configuration. If you want to override the existing action definition, make sure to put it in the same category (\""
|
||||
+ linedefactions[actionnumber].Category + "\").");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make the line type
|
||||
LinedefActionInfo ai = new LinedefActionInfo(actionnumber, cfg, cde.Key.ToString(), enums);
|
||||
|
||||
// Add action to category and sorted list
|
||||
sortedlinedefactions.Add(ai);
|
||||
linedefactions.Add(actionnumber, ai);
|
||||
ac.Add(ai);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -777,7 +777,16 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
//mxd
|
||||
public void DuplicateLine()
|
||||
{
|
||||
scriptedit.DirectMessage(NativeMethods.SCI_LINEDUPLICATE);
|
||||
//scriptedit.DirectMessage(NativeMethods.SCI_LINEDUPLICATE);
|
||||
|
||||
// Do it manually instead of using Scintilla's builtin variant to avoid triggering InsertCheck event,
|
||||
// which conatains only "\r\n" text, which in turn messes with our scriptedit_InsertCheck handler logic
|
||||
// resulting in extra indentation...
|
||||
var curline = scriptedit.Lines[scriptedit.CurrentLine];
|
||||
scriptedit.InsertText(curline.EndPosition, curline.Text);
|
||||
|
||||
// Offset selection by line length
|
||||
scriptedit.SetEmptySelection(curline.EndPosition + (scriptedit.SelectionStart - curline.Position));
|
||||
}
|
||||
|
||||
//mxd
|
||||
|
|
|
@ -942,7 +942,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
public void ClearErrors()
|
||||
{
|
||||
// Hide list
|
||||
if(infotabs.SelectedTab == taberrors) scriptsplitter.Panel2Collapsed = true;
|
||||
if(infotabs.SelectedTab == taberrors) scriptsplitter.IsCollapsed = true;
|
||||
errorlist.Items.Clear();
|
||||
|
||||
// Clear marks
|
||||
|
@ -1012,11 +1012,11 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
if(errorlist.Items.Count > 0)
|
||||
{
|
||||
infotabs.SelectedTab = taberrors;
|
||||
scriptsplitter.Panel2Collapsed = false;
|
||||
scriptsplitter.IsCollapsed = false;
|
||||
}
|
||||
else if(infotabs.SelectedTab == taberrors)
|
||||
{
|
||||
scriptsplitter.Panel2Collapsed = true;
|
||||
scriptsplitter.IsCollapsed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue