Lua Writer - faster drawing
This commit is contained in:
parent
f45238132e
commit
e56de584e3
|
@ -357,6 +357,9 @@
|
|||
<Compile Include="tools\LuaWriter.designer.cs">
|
||||
<DependentUpon>LuaWriter.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\LuaWriterBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\WatchCommon.cs" />
|
||||
<EmbeddedResource Include="AVOut\FFmpegWriterForm.resx">
|
||||
<DependentUpon>FFmpegWriterForm.cs</DependentUpon>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.LuaText = new System.Windows.Forms.RichTextBox();
|
||||
this.LuaText = new LuaWriterBox();
|
||||
this.timer = new System.Windows.Forms.Timer(this.components);
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -58,13 +58,14 @@
|
|||
this.Controls.Add(this.LuaText);
|
||||
this.Name = "LuaWriter";
|
||||
this.Text = "LuaWriter";
|
||||
this.Load += new System.EventHandler(this.LuaWriter_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.RichTextBox LuaText;
|
||||
private LuaWriterBox LuaText;
|
||||
private System.Windows.Forms.Timer timer;
|
||||
}
|
||||
}
|
|
@ -146,7 +146,7 @@ namespace BizHawk.MultiClient
|
|||
char before = ' ', after = ' ';
|
||||
|
||||
if (keyWordMatch.Index > 0)
|
||||
if(keyWordMatch.Index > 5 && keyWordMatch.Value != "if" && LuaText.Text.Substring(keyWordMatch.Index - 4, 4) != "else")
|
||||
if (keyWordMatch.Index > 5 && keyWordMatch.Value != "if" && LuaText.Text.Substring(keyWordMatch.Index - 4, 4) != "else")
|
||||
before = LuaText.Text[keyWordMatch.Index - 1];
|
||||
|
||||
if (keyWordMatch.Index + keyWordMatch.Length != LuaText.Text.Length)
|
||||
|
@ -161,5 +161,9 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
private void LuaWriter_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
class LuaWriterBox : RichTextBox
|
||||
{
|
||||
public LuaWriterBox()
|
||||
{
|
||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue