TorqueScript Reference
GuiEditFrameTimelineCtrl Class Reference

#include <guiEditFrameTimelineCtrl_ScriptBinding.h>

Inherits GuiEditFrameStripCtrl.

Public Member Functions

void clearCaret ()
void clearPreviewSprite ()
String getFrames ()
String getNameAt (slot)
String getNamedFrames ()
Integer getPlayheadSlot ()
Integer getSelectedSlot ()
String getSlotRect (slot)
Boolean insertFrame (slot, frame)
Boolean insertFrameAtPoint (point, frame)
Boolean moveSlot (from, to)
Boolean removeSlot (slot)
void setFrames (frames)
void setNamedFrames (names)
Boolean setPreviewSprite (sprite)
void setSelectedSlot (slot)
Integer showCaretAt (x, y)
Public Member Functions inherited from GuiEditFrameStripCtrl
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

◆ clearCaret()

void clearCaret ( )

Hides the insertion caret.

Returns
No return value.

◆ clearPreviewSprite()

void clearPreviewSprite ( )

Forgets the preview sprite, so the playhead marker stands down.

Returns
No return value.

◆ getFrames()

String getFrames ( )

Gets the frames the timeline holds, in order. Trimmed, deliberately unlike AnimationAsset::getAnimationFrames, which leaves a trailing space.

Returns
The frame indices, space separated, or an empty string.

◆ getNameAt()

String getNameAt ( slot )

Gets the cell name in a slot.

Parameters
slotThe slot index.
Returns
The cell name, or an empty string when the image does not name its cells.

◆ getNamedFrames()

String getNamedFrames ( )

Gets the frames the timeline holds, by cell name, in order.

For an image in explicit mode, whose cells have names. A frame whose cell has since been deleted still reports its name – the timeline keeps it, and draws it as an empty outlined slot, rather than dropping a frame the user never asked to lose.

Returns
The cell names, space separated, or an empty string.

◆ getPlayheadSlot()

Integer getPlayheadSlot ( )

Gets the slot the preview is currently showing.

Returns
The slot index, or -1 when there is no preview or it is not playing this animation.

◆ getSelectedSlot()

Integer getSelectedSlot ( )

Gets the picked slot.

Returns
The slot index, or -1 when nothing is picked.

◆ getSlotRect()

String getSlotRect ( slot )

Gets where a slot is on the canvas.

Parameters
slotThe slot index.
Returns
The rect as "x y width height" in global coordinates.

◆ insertFrame()

Boolean insertFrame ( slot ,
frame  )

Puts a frame into the list at a slot.

Parameters
slotWhere it goes, from 0 to the count inclusive.
frameThe image frame index.
Returns
Whether it went in.

◆ insertFrameAtPoint()

Boolean insertFrameAtPoint ( point ,
frame  )

Puts a frame in where a drag was released. Uses the same arithmetic the caret was drawn from, so what was shown is what happens.

Parameters
pointThe global point as "x y".
frameThe image frame index.
Returns
Whether it went in.

◆ moveSlot()

Boolean moveSlot ( from ,
to  )

Moves a slot to a new place in the list.

Parameters
fromThe slot to lift.
toWhere to put it, measured against the list as it stands now.
Returns
Whether anything moved.

◆ removeSlot()

Boolean removeSlot ( slot )

Takes a slot out of the list.

Parameters
slotThe slot index.
Returns
Whether there was one to take.

◆ setFrames()

void setFrames ( frames )

Replaces the whole list. Separators are space, tab and newline, matching what AnimationAsset::setAnimationFrames accepts, so a list can be handed straight from one to the other.

Parameters
framesThe frame indices, space separated.
Returns
No return value.

◆ setNamedFrames()

void setNamedFrames ( names )

Replaces the whole list, by cell name. Separators are space, tab, newline and comma, matching what AnimationAsset::setNamedAnimationFrames accepts.

Parameters
namesThe cell names, space separated.
Returns
No return value.

◆ setPreviewSprite()

Boolean setPreviewSprite ( sprite )

Points the playhead marker at a sprite's playback.

Parameters
spriteThe preview sprite.
Returns
Whether it was a sprite.

◆ setSelectedSlot()

void setSelectedSlot ( slot )

Picks a slot, or -1 for none.

Parameters
slotThe slot index.
Returns
No return value.

◆ showCaretAt()

Integer showCaretAt ( x ,
y  )

Shows the insertion caret for a point on the canvas.

Parameters
xThe global x coordinate, or "x y" as one argument.
yThe global y coordinate.
Returns
The slot a drop released here would land in.