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

rex_glayouter

Plugin, ACE table, Discussion thread
Dependence: One of these behaviors
  • rex_layouter_linear
  • rex_layouter_cyclic

Introduction
This object  stores instances in a private array inside, then add a specific behavior to layout/arrange these instances .

Usage
Sample capx
Prepare
Add one of these behaviors -
  • rex_layouter_linear
  • rex_layouter_cyclic
The hotspot of this rex_glayouter object is set by "Hotspot" in properties table.
Add or Create&add instance
Call "Action:Add instances", or "Action:Create&Add instances" to add, or create&add instance into the private array. These instances in this private array will be arranged. i.e. set position, or angle.
Intercept result
The instances which added in this rex_glayouter instance will be reset position, or angle, if there is no "Condition:On layout instance".
On the other word, "Condition:On layout instance" will intercept the result of arrangement, user could get the arranged instance by "Expression:InstUID", then add some custom actions by these expressions -
  • Expression:InstX
  • Expression:InstY
  • Expression:InstAngle
  • Expression:InstWidth
  • Expression:InstHeight
  • Expression:InstOpacity
  • Expression:InstVisible
Remove instance
"Action:Remove instances" could remove instances in the private array. But it will not do arranging again. User could call "Action:Force layout" to do arranging if needs.

SOL
"Condition:Pick instances", "Action:Pick instances", or "Action:Pick all instances", "Condition:Pick all instances" could pick instances in the private array of this rex_glayouter instance.
"Condition:Pick layouter" could be used to pick rex_glayouter instance which has these instances in their private array.

Pin instances
This rex_glayouter could pin instances in the private array automatically, so that these instances could be moved followed the
rex_glayouter instance.
The pin mode is the same as official pin behavior.

Sort instances
Sample capx
This rex_glayouter object does not support sorting, user needs to sort instances by instance group object , follow these steps.
  1. pick up all instances, then put them all into instance group object.
  2. sorting instances by "Action:Sort by function" of instance group object.
  3. pick instances back from instance group object to rex_glayouter object.

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