diff --git a/fancy_demo/fancy.asc b/fancy_demo/fancy.asc index 3541718..eb2e53e 100644 --- a/fancy_demo/fancy.asc +++ b/fancy_demo/fancy.asc @@ -1044,7 +1044,7 @@ DynamicSprite* FancyTypedText::CreateTypedSprite() bool get_IsTextBeingTyped(this FancyTypedText*) { - return !String.IsNullOrEmpty(this._text) && !(this._typed_token_count == this._tk_count && this._typed_token_len == -1); + return !String.IsNullOrEmpty(this._text) && this._is_typed_text && !(this._typed_token_count == this._tk_count && this._typed_token_len == -1); } void FancyTypedText::Skip() @@ -1085,6 +1085,7 @@ void FancyTypedText::Clear() this._tk_count = 0; this._typed_token_count = 0; this._typed_token_len = -1; + this._is_typed_text = false; } void FancyTypedText::Start(String text) @@ -1112,6 +1113,7 @@ void FancySay(this Character*, const string text, FancyConfig* config, int width return; _fancy_say_setup(this, config, width, f9p); + _sayft.Clear(); _sayft.set_Text(text); String plain_text = _sayft.get_PlainText(); @@ -1126,6 +1128,7 @@ void FancySayTyped(this Character*, const string text, FancyConfig* config, int return; _fancy_say_setup(this, config, width, f9p); + _sayft.Clear(); _sayft.Start(text); String plain_text = _sayft.get_PlainText(); diff --git a/fancy_demo/fancy.ash b/fancy_demo/fancy.ash index cb6311c..8cc48e0 100644 --- a/fancy_demo/fancy.ash +++ b/fancy_demo/fancy.ash @@ -147,6 +147,6 @@ struct FancyTypedText extends FancyTextBox { // internal protected int _typed_token_count; - protected int _typed_token_len; + protected int _typed_token_len; };