Skip to content

Commit d1cb884

Browse files
committed
more fixes to fancysay and fancytypedsay
1 parent a07c198 commit d1cb884

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

fancy_demo/fancy.asc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ DynamicSprite* FancyTypedText::CreateTypedSprite()
10441044

10451045
bool get_IsTextBeingTyped(this FancyTypedText*)
10461046
{
1047-
return !String.IsNullOrEmpty(this._text) && !(this._typed_token_count == this._tk_count && this._typed_token_len == -1);
1047+
return !String.IsNullOrEmpty(this._text) && this._is_typed_text && !(this._typed_token_count == this._tk_count && this._typed_token_len == -1);
10481048
}
10491049

10501050
void FancyTypedText::Skip()
@@ -1085,6 +1085,7 @@ void FancyTypedText::Clear()
10851085
this._tk_count = 0;
10861086
this._typed_token_count = 0;
10871087
this._typed_token_len = -1;
1088+
this._is_typed_text = false;
10881089
}
10891090

10901091
void FancyTypedText::Start(String text)
@@ -1112,6 +1113,7 @@ void FancySay(this Character*, const string text, FancyConfig* config, int width
11121113
return;
11131114

11141115
_fancy_say_setup(this, config, width, f9p);
1116+
_sayft.Clear();
11151117
_sayft.set_Text(text);
11161118

11171119
String plain_text = _sayft.get_PlainText();
@@ -1126,6 +1128,7 @@ void FancySayTyped(this Character*, const string text, FancyConfig* config, int
11261128
return;
11271129

11281130
_fancy_say_setup(this, config, width, f9p);
1131+
_sayft.Clear();
11291132
_sayft.Start(text);
11301133

11311134
String plain_text = _sayft.get_PlainText();

fancy_demo/fancy.ash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,6 @@ struct FancyTypedText extends FancyTextBox {
147147

148148
// internal
149149
protected int _typed_token_count;
150-
protected int _typed_token_len;
150+
protected int _typed_token_len;
151151
};
152152

0 commit comments

Comments
 (0)