mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 14:31:50 +00:00
Fixed tabs in script editor
This commit is contained in:
parent
91b76bcb5b
commit
049b0a7954
5 changed files with 20 additions and 9 deletions
Binary file not shown.
|
@ -247,6 +247,14 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
Document = 3
|
||||
}
|
||||
|
||||
internal enum ScriptIdentGuides
|
||||
{
|
||||
None = 0,
|
||||
Real = 1,
|
||||
LookForward = 2,
|
||||
LookBoth = 3
|
||||
}
|
||||
|
||||
internal enum ScriptEdgeVisualStyle
|
||||
{
|
||||
None = 0,
|
||||
|
|
|
@ -931,15 +931,15 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
///
|
||||
/// </summary>
|
||||
/// <remarks>Autogenerated: IGEN07</remarks>
|
||||
public bool IsIndentationGuides
|
||||
public int IndentationGuides
|
||||
{
|
||||
get
|
||||
{
|
||||
return FastPerform(2133, 0, 0) != 0;
|
||||
return (int)FastPerform(2133, 0, 0);
|
||||
}
|
||||
set
|
||||
{
|
||||
FastPerform(2132, (uint)(value ? 1 : 0), 0);
|
||||
FastPerform(2132, (uint)value, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
this.scriptedit.IsCaretLineVisible = false;
|
||||
this.scriptedit.IsFocus = false;
|
||||
this.scriptedit.IsHScrollBar = false;
|
||||
this.scriptedit.IsIndentationGuides = false;
|
||||
this.scriptedit.IndentationGuides = 0;
|
||||
this.scriptedit.IsMouseDownCaptures = false;
|
||||
this.scriptedit.IsOvertype = false;
|
||||
this.scriptedit.IsReadOnly = false;
|
||||
|
|
|
@ -120,15 +120,16 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
scriptedit.IsBufferedDraw = true;
|
||||
scriptedit.IsCaretLineVisible = false;
|
||||
scriptedit.IsHScrollBar = true;
|
||||
scriptedit.IsIndentationGuides = true;
|
||||
scriptedit.IndentationGuides = (int)ScriptIdentGuides.None;
|
||||
scriptedit.IsMouseDownCaptures = true;
|
||||
scriptedit.IsTabIndents = false;
|
||||
scriptedit.IsTabIndents = true;
|
||||
scriptedit.IsUndoCollection = true;
|
||||
scriptedit.IsUseTabs = true;
|
||||
scriptedit.IsViewEOL = false;
|
||||
scriptedit.IsVScrollBar = true;
|
||||
scriptedit.SetFoldFlags((int)ScriptFoldFlag.Box);
|
||||
scriptedit.TabWidth = 4; // This should be in the preferences dialog
|
||||
scriptedit.Indent = 4;
|
||||
|
||||
// Symbol margin
|
||||
scriptedit.SetMarginTypeN(0, (int)ScriptMarginType.Symbol);
|
||||
|
@ -271,8 +272,10 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
|
||||
// These don't work?
|
||||
scriptedit.TabWidth = 4;
|
||||
scriptedit.IsUseTabs = true;
|
||||
scriptedit.Indent = 0;
|
||||
scriptedit.IsUseTabs = false;
|
||||
scriptedit.IsTabIndents = true;
|
||||
scriptedit.Indent = 4;
|
||||
scriptedit.IsBackSpaceUnIndents = true;
|
||||
|
||||
// This applies the default style to all styles
|
||||
scriptedit.StyleClearAll();
|
||||
|
@ -711,7 +714,7 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
{
|
||||
// Apply identation of the previous line to this line
|
||||
int ident = scriptedit.GetLineIndentation(curline - 1);
|
||||
int tabs = ident / scriptedit.TabWidth;
|
||||
int tabs = ident ;// / scriptedit.Indent;
|
||||
if(scriptedit.GetLineIndentation(curline) == 0)
|
||||
{
|
||||
scriptedit.SetLineIndentation(curline, ident);
|
||||
|
|
Loading…
Reference in a new issue