Rex's plugins for Construct2
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About

rex_layouter_text

Plugin, ACE table, Discussion thread
Dependence:
  • rex_glayouter plugin
  • A layout behavior like rex_layouter_linear, or rex_layouter_cyclic.

Introduction
Show text using sprites in rex_glayouter object.
Each character is created by a sprite, so that they could be controlled by behaviors like official sine behavior, or responded the official touch events individually.

Usage
Sample capx
Prepare
  • Put this behavior under rex_glayouter object, and add a layout behavior like rex_layouter_linear, or rex_layouter_cyclic for arrangement of character sprites.
  • Prepare a sprite object to map frames to characters.
Sprite for characters
User need to have a sprite to map frames to characters. The mapping list is declared at "Characters list" in properties table. Then link the sprite object to this behavior by "Action:Set character object".
Set text
  1. Call "Action:Set text" to create/maintain character sprites by this input text, frame index of each character sprite will be assigned by the characters list.
  2. The character sprites will be added to rex_glayouter object automatically, and they will be arranged by the layout behavior (rex_layouter_linear, or rex_layouter_cyclic).
"Expression:Text" could be used to get the input text.

Compared with official sprite font plugin
The official sprite font plugin creates characters in a single instance. This rex_layouter_text behavior creates characters in sprites.
The advantage of this rex_layouter_text behavior is , user could control each character individually. The disadvantage is , it need more memory resource than official sprite font plugin.

Create a free web site with Weebly
  • Home
  • Map
  • Tutorial/Templates
  • News
  • About