Skip to content

Commit

Permalink
more fixes to fancysay and fancytypedsay
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoporto committed Apr 21, 2024
1 parent a07c198 commit d1cb884
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fancy_demo/fancy.asc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion fancy_demo/fancy.ash
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,6 @@ struct FancyTypedText extends FancyTextBox {

// internal
protected int _typed_token_count;
protected int _typed_token_len;
protected int _typed_token_len;
};

0 comments on commit d1cb884

Please sign in to comment.