TorqueScript Reference
GuiEditFrameStripCtrl Class Reference

#include <guiEditFrameStripCtrl_ScriptBinding.h>

Inherits GuiControl.

Inherited by GuiEditFrameTimelineCtrl.

Public Member Functions

Integer getCellAtPoint (x, y)
Integer getCellCount ()
String getCellRect (index)
Integer getCellSize ()
Integer getFrameAt (index)
String getImageAsset ()
Integer getImageFrameCount ()
void setCellSize (cellSize)
void setImageAsset (imageAssetId)
Public Member Functions inherited from GuiControl
void addGuiControl (int controlId)
void applySizing ()
Boolean canBeChildOf (GuiControl parent)
void childrenReordered ()
Integer findHitControl (int x, int y)
String getCenter ()
String getExtent (...)
String getGlobalCenter ()
String getGlobalPosition ()
String getMinExtent ()
Integer getParent ()
String getPosition ()
String getText ()
Boolean getTextExtend ()
Boolean getTextWrap ()
String getValue ()
Boolean isActive ()
Boolean isAwake ()
Boolean isGeometryEditable ()
Boolean isVisible ()
void makeFirstResponder (isFirst)
void performClick ()
Boolean pointInControl (int x, int y)
Boolean pullIntoView ()
Boolean rendersChildren ()
void reorderChild (child1, child2)
void resize (int x, int y, int w, int h)
void setActive (isActive)
void setCanSave (bool canSave)
void setCenter (int x, int y)
void setExtent (int width, int height)
void setFirstResponder ()
void setPosition (int x, int y)
void setPositionGlobal (int x, int y)
void setProfile (GuiControlProfile p)
void setText (text)
void setTextExtend (setting)
void setTextID (id)
void setTextWrap (setting)
void setValue (value)
void setVisible (isVisible)

Member Function Documentation

◆ getCellAtPoint()

Integer getCellAtPoint ( x ,
y  )

Gets which cell a point on the canvas falls on.

Parameters
xThe global x coordinate.
yThe global y coordinate.
Returns
The cell index, or -1 for the gaps between cells and anywhere off them.

◆ getCellCount()

Integer getCellCount ( )

Gets how many cells are laid out.

Returns
The cell count.

◆ getCellRect()

String getCellRect ( index )

Gets where a cell is on the canvas. For a test that must not hard-code a point: a stale coordinate reports a missing cell, which is exactly what a broken hit test reports.

Parameters
indexThe cell index.
Returns
The rect as "x y width height" in global coordinates, or "0 0 0 0".

◆ getCellSize()

Integer getCellSize ( )

Gets the pixel size of the square one frame draws in.

Returns
The size in pixels.

◆ getFrameAt()

Integer getFrameAt ( index )

Gets which image frame a cell is showing.

Parameters
indexThe cell index.
Returns
The image frame index, or -1 when the cell does not exist.

◆ getImageAsset()

String getImageAsset ( )

Gets the image asset the cells are drawn from.

Returns
The asset id, or an empty string when none is set.

◆ getImageFrameCount()

Integer getImageFrameCount ( )

Gets how many frames the image asset offers. This is not the same as the number of cells: a timeline has as many cells as the animation has slots, which may repeat a frame or leave frames out.

Returns
The frame count, or 0 when there is no usable image.

◆ setCellSize()

void setCellSize ( cellSize )

Sets the pixel size of the square one frame draws in, clamped to what the control will show.

Parameters
cellSizeThe size in pixels.
Returns
No return value.

◆ setImageAsset()

void setImageAsset ( imageAssetId )

Sets the image asset whose frames the cells are drawn from. An empty id empties the grid.

Parameters
imageAssetIdThe asset id of the image.
Returns
No return value.