Plugin : Grid control
Author:Rex.Rainbow
- Manipulate instances of each grid in a table.
Download
Properties
Color
- Color for showing at editor.
Cell height
- Default cell height, in pixels.
Cell width
- Default cell width, in pixels.
Total cells
- Total cells count in this list.
Columns
Clamp OXY
Axis
- Axis of scrolling.
- Options : ["Horizontal","Vertical"]
Hotspot
- Choose the location of the hot spot in the object.
- Options : ["Top-left","Top","Top-right","Left","Center","Right","Bottom-left","Bottom","Bottom-right"]
Actions
Cell size
Action:Set default cell height
- Set default cell height.
- Cell height ( number ) : Cell height, in pixels.
Action:Set default cell width
- Set default cell width.
- Cell width ( number ) : Cell width, in pixels.
Action:Set cell height
- Set cell height.
- Cell index ( number ) : Line index.
- Height ( number ) : Cell height, in pixels.
Custom data
Action:Set value
- Set custom data in a cell.
- Cell index ( number ) : Cell index.
- Key ( string ) : The key of custom data.
- Value ( number or string ) : The value to store in the cell.
Action:Clean key in all cells
- Clean key in all cell.
- Key ( string ) : The key of custom data.
Action:Clean all keys in all cells
- Clean all keys in all cell.
Grid
Action:Set total cells count
- Set total cells count.
- Total cells count ( number ) : Total cells count of this grid.
Action:Set column number
- Set column number.
- Columns ( number ) : Column number of this grid.
Action:Set grid size
- Set grid size.
- Columns ( number ) : Column number of this grid.
- Rows ( number ) : Row number of this grid.
Insert
Action:Insert new cells
- Insert new cells.
- Insert at ( number ) : Cell index for inserting.
- Cell number ( number ) : Cell number for inserting.
Action:Insert cells
- Insert cells with content.
- Insert at ( number ) : Cell index for inserting.
- Content ( string ) : Content of cells in JSON string.
Action:Push new cells
- Push new cells.
- Where ( Combo ) : Whether to insert at the beginning or the end of the list.
- Options : ["back","front"]
- Cell number ( number ) : Cell number for inserting.
Action:Push cells
- Push cells with content.
- Where ( Combo ) : Whether to insert at the beginning or the end of the list.
- Options : ["back","front"]
- Content ( string ) : Content of cells in JSON string.
Instances
Action:Pin instance
- Pin instance to current visible cell under "Condition: On cell visible". It will be destroyed while cell is invisible.
- Instance ( object ) : Instance belong the cell.
Action:Unpin instance
- Unpin instance from cell.
- Instance ( object ) : Instance belong the cell.
Action:Pin instance to cell
- Pin instance to cell. It will be destroyed while cell is invisible.
- Instance ( object ) : Instance belong the cell.
- Cell index ( number ) : Cell index.
Action:Unpin instance from cell
- Unpin instance from cell.
- Instance ( object ) : Instance belong the cell.
- Cell index ( number ) : Cell index.
List - Offset Y
Action:Scroll by percentage
- Scroll offsetY by percentage.
- Percentage ( number ) : Scroll list, 0 is top, 1 is bottom.
List - offset X
Action:Set OX
- Set offset X.
- OX ( number ) : Offset X of this list, in pixels. Start at 0.
Action:Add to OX
- Add to Offset X.
- Value ( number ) : Add value to Offset X, in pixels
List - offset XY
Action:Set OXY
- Set offset XY.
- OX ( number ) : Offset X of this list, in pixels. Start at 0.
- OY ( number ) : Offset Y of this list, in pixels. Start at 0.
Action:Add to OXY
- Add to Offset XY.
- Value ( number ) : Add value to Offset X, in pixels
- Value ( number ) : Add value to Offset Y, in pixels
List - offset Y
Action:Set OY
- Set offset Y.
- OY ( number ) : Offset Y of this list, in pixels. Start at 0.
Action:Add to OY
- Add to Offset Y.
- Value ( number ) : Add value to Offset Y, in pixels
Action:Scroll to index
- Scroll offset (X, Y) to cell lindex.
- Cell index ( number ) : Cell index.
Remove
Action:Remove cells
- Remove cells.
- Remove from ( number ) : Cell index for removing.
- Cell number ( number ) : Cell number for removing.
SOL: instances
Action:Pick instances
- Pick instances on cell.
- Cell index ( number ) : Cell index.
- Object ( object ) : Object for picking
Action:Pick all instances
- Pick all instances on cell.
- Cell index ( number ) : Cell index.
Visible
Action:Refresh
Expressions
Bound
Expression:LastBoundOY
- Get last bound of OY under "Condition:On OY out of top bound", or "Condition:On OY out of bottom bound".
Cell index
Expression:UID2CellIndex
- Get cell index of pinned instance by UID. (-1) is invalid.
- UID ( number ) : UID of pinned instance.
Cell size
Expression:DefaultCellHeight
Expression:DefaultCellWidth
Expression:CellHeight
- Get cell height.
- Index ( number ) : Index of cell.
Custom data
Expression:At
- Get value by cell index and key. Add 3rd parameter for default value if this key is not existed.
- Index ( number ) : Index of cell.
- Key ( string ) : The name of the key.
Expression:LastRemovedCells
- Get custom data of last removed cells in JSON string after "Action: Remove cells".
Expression:CustomDataInCells
- Get custom data of cells.
- Start index ( number ) : Start index of cell.
- Cell number ( number ) : Cell number.
For each
Expression:CurCellIndex
- Get current cell index in "Condition: For each cell", or "Condition: For each visible cell".
List
Expression:TotalCellsCount
Expression:TotalColumnsCount
Expression:ListHeight
Expression:ListWidth
OX
Expression:OX
Expression:LeftOX
Expression:RightOX
OY
Expression:OY
Expression:BottomOY
- Get bottom OY for showing the last cell, i.e. Scrollable length of current grid table.
Expression:TopOY
Offset X
Expression:CellIndex2CellTLX
- Get top-left position X by cell index
- Cell index ( number ) : Cell index.
Offset Y
Expression:CellIndex2CellTLY
- Get top-left position Y by cell index
- Cell index ( number ) : Cell index.
Visible
Expression:TLVisibleCellXIndex
- Get top-left visible cell X index.
Expression:TLVisibleCelYIndex
- Get top-left visible cell Y index.
Expression:BRVisibleCellXIndex
- Get top-left visible cell X index.
Expression:BRVisibleCellYIndex
- Get top-left visible cell Y index.
Visible - On visible
Expression:CellIndex
- Get selected cell index in "Condition: On cell visible", or "Condition: On cell invisible".
Expression:CellXIndex
- Get selected cell X index in "Condition: On cell visible", or "Condition: On cell invisible".
Expression:CellYIndex
- Get selected cell Y index in "Condition: On cell visible", or "Condition: On cell invisible".
Expression:CellTLX
- Get top-left position X of cell in "Condition: On cell visible", in pixels
Expression:CellTLY
- Get top-left position Y of cell in "Condition: On cell visible", in pixels
Visible/For each
Expression:CurCellXIndex
- Get current cell X index in "Condition: For each cell", or "Condition: For each visible cell".
Expression:CurCellYIndex
- Get current cell Y index in "Condition: For each cell", or "Condition: For each visible cell".
Conditions
Bound
Condition:Is OY out of bound
- Retrurn true if OY is out of bound.
- Bound ( Combo ) : Bound types.
- Options : ["Top bound","Bottom bound","Top or bottom bounds"]
Condition:On OY out of bound
- Triggered when OY out of bound.
- Bound ( Combo ) : Bound types.
- Options : ["Top bound","Bottom bound","Top or bottom bounds"]
Condition:Is OX out of bound
- Retrurn true if OX is out of bound.
- Bound ( Combo ) : Bound types.
- Options : ["Left bound","Right bound","Left or Right bounds"]
Condition:On OY out of bound
- Triggered when OX out of bound.
- Bound ( Combo ) : Bound types.
- Options : ["Left bound","Right bound","Left or Right bounds"]
Filter
Condition:For each matched cell
- Repeat the event for each matched cell.
- Key ( string ) : The key of custom data.
- Comparison ( cmp ) : Choose the way to compare data.
- Value ( number ) : The value to compare the data to.
List
Condition:For each cell
- Repeat the event for each cell in list.
Condition:For each cell in a range
- Repeat the event for each cell in a range in list.
- Start ( number ) : Start cell index.
- End ( number ) : Start cell index.
SOL: instances
Condition:Pick instances
- Pick instances on cell.
- Cell index ( number ) : Cell index.
- Object ( object ) : Object for picking
Condition:Pick all instances
- Pick all instances on cell.
- Cell index ( number ) : Cell index.
Visible
Condition:On cell visible
- Triggered when a cell is visible.
Condition:On cell invisible
- Triggered when a cell is invisible.
Condition:For each visible cell
- Repeat the event for each visible cell.