mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
#51 - DevX seizure
Added a wait in the TextType() method so that it doesn't fire until the current call finishes.
This commit is contained in:
parent
4b46d338c0
commit
38ab4e5708
1 changed files with 9 additions and 0 deletions
|
@ -63,16 +63,24 @@ namespace ShiftOS.WinForms
|
|||
int hackeffect;
|
||||
int percentcount;
|
||||
|
||||
private bool typing = false;
|
||||
|
||||
public void TextType(string texttotype)
|
||||
{
|
||||
while(typing == true)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
charcount = texttotype.Length;
|
||||
gtexttotype = texttotype;
|
||||
currentletter = 0;
|
||||
slashcount = 1;
|
||||
foreach (var c in gtexttotype)
|
||||
{
|
||||
typing = true;
|
||||
rtext += c;
|
||||
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
textgeninput.Text = rtext + "|";
|
||||
|
@ -82,6 +90,7 @@ namespace ShiftOS.WinForms
|
|||
slashcount = 1;
|
||||
}
|
||||
rtext += Environment.NewLine;
|
||||
typing = false;
|
||||
}
|
||||
|
||||
public Save MySave = null;
|
||||
|
|
Loading…
Reference in a new issue