Skip to content

Commit

Permalink
remove overlay creation from api so we don't have clone
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoporto committed Apr 21, 2024
1 parent db2152f commit 7e96773
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
10 changes: 0 additions & 10 deletions fancy_demo/fancy.asc
Original file line number Diff line number Diff line change
Expand Up @@ -867,16 +867,6 @@ DynamicSprite* CreateFromFancyTextBox(static DynamicSprite, const string text, F
return _create_textbox_from_text_spr(text_spr, f9p);
}

Overlay* CreateFancyTextBox(static Overlay, int x, int y, const string text, FancyConfig* config, int width, Fancy9Piece* f9p)
{
if(String.IsNullOrEmpty(text)) return null;
if(config == null) config = _default_cfg.Clone();
DynamicSprite* spr = DynamicSprite.CreateFromFancyTextBox(text, config, width, f9p);
Overlay* ovr = Overlay.CreateGraphical(x, y, spr.Graphic, true, true);
spr.Delete();
return ovr;
}

void Fancify(this Button*, Fancy9Piece* normal9p, Fancy9Piece* mouse_over9p, Fancy9Piece* pushed9p)
{
if(String.IsNullOrEmpty(this.Text))
Expand Down
3 changes: 0 additions & 3 deletions fancy_demo/fancy.ash
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ import DynamicSprite* CreateFromFancyString(static DynamicSprite, const string t
/// Create a sprite of a textbox with a fancy string using a 9-piece
import DynamicSprite* CreateFromFancyTextBox(static DynamicSprite, const string text, FancyConfig* config = 0, int width = FANCY_INFINITE_WIDTH, Fancy9Piece* f9p = 0);

/// Creates a screen overlay from a textbox with a fancy string using a 9-piece
import Overlay* CreateFancyTextBox(static Overlay, int x, int y, const string text, FancyConfig* config = 0, int width = FANCY_INFINITE_WIDTH, Fancy9Piece* f9p = 0);

/// A Say alternative that support fancy strings
import void FancySay(this Character*, const string text, FancyConfig* config = 0, int width = FANCY_INFINITE_WIDTH, Fancy9Piece* f9p = 0);

Expand Down

0 comments on commit 7e96773

Please sign in to comment.