TorqueScript Reference
Public Member Functions | List of all members
SceneWindow Class Reference

#include <SceneWindow_ScriptBinding.h>

Inherits GuiControl.

Public Member Functions

Boolean addInputListener (inputListener)
 
void clampCameraViewLimit ()
 
void completeCameraMove ()
 
void dismount ()
 
String getBackgroundColor (...)
 
Float getCameraAngle ()
 
String getCameraArea ()
 
String getCameraPosition ()
 
String getCameraRenderPosition ()
 
String getCameraRenderScale ()
 
String getCameraSize ()
 
String getCameraWorldScale ()
 
Float getCameraZoom ()
 
String getCanvasPoint (X/Y)
 
Boolean getIsCameraMounted ()
 
Boolean getIsCameraMoving ()
 
Boolean getIsWindowPoint (X/Y)
 
Boolean getLockMouse ()
 
String getMousePosition ()
 
Integer getRenderGroupMask ()
 
Integer getRenderLayerMask ()
 
String getScene ()
 
Float getTargetCameraAngle ()
 
String getTargetCameraArea ()
 
String getTargetCameraPosition ()
 
String getTargetCameraSize ()
 
Float getTargetCameraZoom ()
 
Boolean getUseBackgroundColor (...)
 
Boolean getUseObjectInputEvents ()
 
Boolean getUseWindowInputEvents ()
 
String getWindowArea ()
 
String getWindowPoint (X/Y)
 
String getWorldPoint (X/Y)
 
void mount (sceneObject, [offsetX/offsetY], [mountForce], [sendToMount?], [mountAngle?])
 
Boolean removeInputListener (inputListener)
 
void resetScene ()
 
void setArrowProfile (GuiControlProfile p)
 
void setAudioListener ()
 
void setBackgroundColor (float red, float green, float blue, [float alpha=1.0])
 
void setCameraAngle (angle)
 
void setCameraArea (x1/y1/x2/y2)
 
void setCameraInterpolationMode (interpolationMode)
 
void setCameraInterpolationTime (interpolationTime)
 
void setCameraPosition (x, y)
 
void setCameraSize (width, height)
 
void setCameraZoom (zoomFactor)
 
void setLockMouse (bool lockSet)
 
void setMousePosition (x/y)
 
void setMouseWheelScrolls (setting)
 
void setObjectInputEventFilter (groupMask, layerMask, [useInvisibleFilter?])
 
void setObjectInputEventGroupFilter (groups$)
 
void setObjectInputEventInvisibleFilter (bool useInvisibleFilter)
 
void setObjectInputEventLayerFilter (layers$)
 
void setRenderGroups (groups$)
 
void setRenderLayers (layers$)
 
void setRenderMasks (layerMask, groupMask)
 
void setScene (Scene)
 
void setShowScrollBar (setting)
 
void setTargetCameraAngle (angle)
 
void setTargetCameraArea (x1/y1/x2/y2)
 
void setTargetCameraPosition (x, y)
 
void setTargetCameraSize (width, height)
 
void setTargetCameraZoom (zoomFactor)
 
void setThumbProfile (GuiControlProfile p)
 
void setTrackProfile (GuiControlProfile p)
 
void setUseBackgroundColor (...)
 
void setUseObjectInputEvents (inputStatus)
 
void setUseWindowInputEvents (inputStatus)
 
void setViewLimitOff ()
 
void setViewLimitOn ([minX/minY/maxX/maxY])
 
void startCameraMove ([interpolationTime])
 
void startCameraShake (shakeMagnitude, time)
 
void stopCameraMove ()
 
void stopCameraShake ()
 
void undoCameraMove ([interpolationTime])
 
- Public Member Functions inherited from GuiControl
void addGuiControl (int controlId)
 
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 isVisible ()
 
void makeFirstResponder (isFirst)
 
void performClick ()
 
Boolean pointInControl (int x, int y)
 
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

◆ addInputListener()

Boolean addInputListener ( inputListener  )

Adds an object as an input listener.

Parameters
inputListenerThe object to add as an input listener.
Returns
Whether the object was added as an input event listener or not.

◆ clampCameraViewLimit()

void clampCameraViewLimit ( )

Clamps the current camera to the current view limit. Nothing will happen if the view-limit is not active or the camera is moving.

Returns
No return value

◆ completeCameraMove()

void completeCameraMove ( )

Moves camera directly to target.

Returns
No return value.

◆ dismount()

void dismount ( )

Dismounts Camera from object.

Returns
No return value

◆ getBackgroundColor()

String getBackgroundColor (   ...)

Gets the background color for the scene.

Returns
(float red / float green / float blue / float alpha) The background color for the scene.

◆ getCameraAngle()

Float getCameraAngle ( )

Gets the current camera angle.

Returns
The current camera angle in degrees.

◆ getCameraArea()

String getCameraArea ( )

Get the current camera Area.

Returns
The camera area formatted as \x1 y1 x2 y2\

◆ getCameraPosition()

String getCameraPosition ( )

Get the current camera position.

Returns
The current camera position.

◆ getCameraRenderPosition()

String getCameraRenderPosition ( )

Get current camera position post-view-limit clamping.

Returns
The current camera render position.

◆ getCameraRenderScale()

String getCameraRenderScale ( )

Get current camera scale to render.

Returns
Returns the cameras window width/height scale to render as a string formatted as \widthScale heightScale\

◆ getCameraSize()

String getCameraSize ( )

Get the current camera size.

Returns
The current camera width and height.

◆ getCameraWorldScale()

String getCameraWorldScale ( )

Get current camera scale to world.

Returns
Returns the cameras window width/height scale to world as a string formatted as \widthScale heightScale\

◆ getCameraZoom()

Float getCameraZoom ( )

Get the current camera Zoom.

Returns
The current camera zoom.

◆ getCanvasPoint()

String getCanvasPoint ( X/  Y)

Returns Canvas coordinate of Window coordinate.

Parameters
x,yThe coordinates in world coordinates you wish to convert to window coordinates. Accepts either (x,y) or (\x y\
Returns
Returns the desired canvas coordinates as a string formatted as \x y\

◆ getIsCameraMounted()

Boolean getIsCameraMounted ( )

Check the camera mounted status.

Returns
Returns a boolean value as to whether or not the camera is mounted.

◆ getIsCameraMoving()

Boolean getIsCameraMoving ( )

Check the camera moving status.

Returns
Returns a boolean value as to whether or not the camera is moving.

◆ getIsWindowPoint()

Boolean getIsWindowPoint ( X/  Y)

Checks if World coordinate is inside Window.

Parameters
x,yThe coordinates in world coordinates you wish to check. Accepts either (x,y) or (\x y\
Returns
Returns true if the coordinates are within the window, and false otherwise.

◆ getLockMouse()

Boolean getLockMouse ( )

Gets the window mouse-lock status.

◆ getMousePosition()

String getMousePosition ( )

Gets Current Mouse Position.

Returns
Returns a string with the current mouse cursor coordinates formatted as \x y\

◆ getRenderGroupMask()

Integer getRenderGroupMask ( )

Gets the group mask which controls what is rendered.

Returns
The bit mask corresponding to the groups which are to be rendered

◆ getRenderLayerMask()

Integer getRenderLayerMask ( )

Gets the layer mask which controls what is rendered.

Returns
The bit mask corresponding to the layers which are to be rendered

◆ getScene()

String getScene ( )

Returns the Scene associated with this window.

Returns
Returns the scene ID as a string

◆ getTargetCameraAngle()

Float getTargetCameraAngle ( )

Gets the target camera angle.

Returns
The target camera angle in degrees.

◆ getTargetCameraArea()

String getTargetCameraArea ( )

Get the target camera Area.

Returns
The camera area formatted as \x1 y1 x2 y2\

◆ getTargetCameraPosition()

String getTargetCameraPosition ( )

Get the target camera position.

Returns
The target camera position.

◆ getTargetCameraSize()

String getTargetCameraSize ( )

Get the target camera size.

Returns
The target camera width and height.

◆ getTargetCameraZoom()

Float getTargetCameraZoom ( )

Get the target camera Zoom.

Returns
The current camera zoom.

◆ getUseBackgroundColor()

Boolean getUseBackgroundColor (   ...)

Gets whether the scene background color is in use or not.

Returns
Whether the scene background color is in use or not.

◆ getUseObjectInputEvents()

Boolean getUseObjectInputEvents ( )

Gets whether input events are passed onto scene objects or not.

Returns
Whether input events are passed onto scene objects or not..

◆ getUseWindowInputEvents()

Boolean getUseWindowInputEvents ( )

Gets whether input events are monitored by the window or not.

Returns
Whether input events are monitored by the window or not.

◆ getWindowArea()

String getWindowArea ( )

Returns the windows position and extent.

Returns
Returns the window dimensions as a string formatted as follows: <position.x> <position.y> <width> <height>

◆ getWindowPoint()

String getWindowPoint ( X/  Y)

Returns Window coordinate of World coordinate.

Parameters
x,yThe coordinates in world coordinates you wish to convert to window coordinates. Accepts either (x,y) or (\x y\
Returns
Returns the desired window coordinates as a string formatted as \x y\

◆ getWorldPoint()

String getWorldPoint ( X/  Y)

Returns World coordinate of Window coordinate.

Parameters
x,yThe coordinates in window coordinates you wish to convert to world coordinates. Accepts either (x,y) or (\x y\
Returns
Returns the desired world coordinates as a string formatted as \x y\

◆ mount()

void mount ( sceneObject  )

Mounts the camera onto the specified object.

Parameters
sceneObjectThe scene object to mount the camera to.
offsetX/ offsetY The offset from the objects position to mount the camera to. Optional: Defaults to no offset.
mountForceThe force to use to keep the camera mounted to the object. Zero is a rigid mount. Optional: Defaults to zero.
sendToMountWhether to immediately move the camera to the objects position or not. Optional: Defaults to true.
mountAngleWhether to mount the cameras angle to the objects angle or not. Optional: Defaults to false.
Returns
No return value

◆ removeInputListener()

Boolean removeInputListener ( inputListener  )

Removes an object from being an input listener.

Parameters
inputListenerThe object to remove as an input listener.
Returns
Whether the object was removed as an input event listener or not.

◆ resetScene()

void resetScene ( )

Detaches the window from any Scene Object.

Returns
No return value

◆ setArrowProfile()

void setArrowProfile ( GuiControlProfile  p)

Sets the currently used ArrowProfile for the GuiControl

Parameters
pThe Arrowprofile you wish to set the control to use
Returns
No return value

◆ setAudioListener()

void setAudioListener ( )

Sets this Scenewindow to process the AudioListener's position and velocity WARNING : The code does not verify if multiple SceneWindows have this function enabled. User must make sure to manage this manually. Multiple listeners may lead to crashes/bugs/unexpected behaviors.

Parameters
status- Whether to enable or disable AudioListener processing (optional, default to true)

◆ setBackgroundColor()

void setBackgroundColor ( float  red,
float  green,
float  blue 
)

or ( stockColorName ) - Sets the background color for the scene.

Parameters
redThe red value as floating point value between 0 and 1.
greenThe green value as floating point value between 0 and 1.
blueThe blue value as floating point value between 0 and 1.
alphaThe alpha value as floating point value between 0 and 1.
Returns
No return Value.

◆ setCameraAngle()

void setCameraAngle ( angle  )

Sets the current camera angle.

Parameters
angleThe current camera angle in degrees.
Returns
No return value.

◆ setCameraArea()

void setCameraArea ( x1/y1/x2/  y2)

Set the current camera area.

Parameters
x1,y1,x2,y2The coordinates of the minimum and maximum points (top left, bottom right) The input can be formatted as either \x1 y1 x2 y2\, \x1 y1, x2 y2\, \x1, y1, x2, y2\
Returns
No return value.

◆ setCameraInterpolationMode()

void setCameraInterpolationMode ( interpolationMode  )

Set camera interpolation mode.

Parameters
interpolationModePosible values are Linear and Sigmoid.
Returns
No return value.

◆ setCameraInterpolationTime()

void setCameraInterpolationTime ( interpolationTime  )

Set camera interpolation time.

Parameters
interpolationTimeTime to animate given in seconds.
Returns
No return value

◆ setCameraPosition()

void setCameraPosition ( ,
 
)

Set the current camera position.

Parameters
XPosition along the X axis.
YPosition along the Y axis.
Returns
No return value.

◆ setCameraSize()

void setCameraSize ( width  ,
height   
)

Set the current camera position.

Parameters
widthSize along the X axis.
heightSize along the Y axis.
Returns
No return value.

◆ setCameraZoom()

void setCameraZoom ( zoomFactor  )

Set the current camera Zoom Factor.

Parameters
zoomFactorA float value representing the zoom factor
Returns
No return value.

◆ setLockMouse()

void setLockMouse ( bool  lockSet)

Sets the window mouse-lock status.

Returns
No return value.

◆ setMousePosition()

void setMousePosition ( x/  y)

Sets Current Mouse Position.

Parameters
x,yThe coordinates to set the mouse cursor. Accepts either (x,y) or (\x y\

◆ setMouseWheelScrolls()

void setMouseWheelScrolls ( setting  )

When true, allows the mouse wheel to move the scroll bar when it's turned on.

Parameters
settingIf true, the scroll bars will consume the mouse wheel events instead of being passed to the scene. Holding shift will reverse this behavior.
Returns
No return value

◆ setObjectInputEventFilter()

void setObjectInputEventFilter ( groupMask  ,
layerMask   
)

Sets input filter for input events.

◆ setObjectInputEventGroupFilter()

void setObjectInputEventGroupFilter ( groups$  )

Sets the input events group filter.

Parameters
Listof groups to filter input events with.
Returns
No return value.

◆ setObjectInputEventInvisibleFilter()

void setObjectInputEventInvisibleFilter ( bool  useInvisibleFilter)

Sets whether invisible objects should be filtered for input events or not.

◆ setObjectInputEventLayerFilter()

void setObjectInputEventLayerFilter ( layers$  )

Sets the input events layer filter.

Parameters
Thelist of layers to filter input events with.
Returns
No return value.

◆ setRenderGroups()

void setRenderGroups ( groups$  )

Sets the render group(s).

Parameters
groupsThe list of groups you wish to set.
Returns
No return value.

◆ setRenderLayers()

void setRenderLayers ( layers$  )

Sets the render layers(s).

Parameters
Thelayer numbers you wish to set.
Returns
No return value.

◆ setRenderMasks()

void setRenderMasks ( layerMask  ,
groupMask   
)

Sets the layer/group mask which control what is rendered.

Parameters
layermaskThe bitmask for setting the layers to render
groupmaskThe bitmask for setting the groups to render
Returns
No return value.

◆ setScene()

void setScene ( Scene  )

Associates Scene Object.

Parameters
SceneThe scene ID or name.
Returns
No return value.

◆ setShowScrollBar()

void setShowScrollBar ( setting  )

Sets the scroll bars on. View Limits should be set prior to turning on scroll bars.

Parameters
settingIf true, scroll bars will be on.
Returns
No return value

◆ setTargetCameraAngle()

void setTargetCameraAngle ( angle  )

Sets the target camera angle.

Parameters
angleThe target camera angle in degrees.
Returns
No return value.

◆ setTargetCameraArea()

void setTargetCameraArea ( x1/y1/x2/  y2)

Set the target camera area.

Parameters
x1/ y1 Coordinates of the lower left corner of the target area.
x2/ y2 Coordinates of the upper right corner of the target area.
Returns
No return value.

◆ setTargetCameraPosition()

void setTargetCameraPosition ( ,
 
)

Set the target camera position.

Parameters
XPosition along the X axis.
YPosition along the Y axis.
Returns
No return value.

◆ setTargetCameraSize()

void setTargetCameraSize ( width  ,
height   
)

Set the target camera position.

Parameters
widthSize along the X axis.
heightSize along the Y axis.
Returns
No return value.

◆ setTargetCameraZoom()

void setTargetCameraZoom ( zoomFactor  )

Set the target camera Zoom Factor.

Returns
No return value.

◆ setThumbProfile()

void setThumbProfile ( GuiControlProfile  p)

Sets the currently used ThumbProfile for the GuiControl

Parameters
pThe Thumbprofile you wish to set the control to use
Returns
No return value

◆ setTrackProfile()

void setTrackProfile ( GuiControlProfile  p)

Sets the currently used TrackProfile for the GuiControl

Parameters
pThe Trackprofile you wish to set the control to use
Returns
No return value

◆ setUseBackgroundColor()

void setUseBackgroundColor (   ...)

Sets whether to use the scene background color or not.

Parameters
useBackgroundColorWhether to use the scene background color or not.
Returns
No return value.

◆ setUseObjectInputEvents()

void setUseObjectInputEvents ( inputStatus  )

Sets whether input events are passed onto scene objects or not.

Parameters
mouseStatusWhether input events are passed onto scene objects or not.

◆ setUseWindowInputEvents()

void setUseWindowInputEvents ( inputStatus  )

Sets whether input events are monitored by the window or not.

Parameters
inputStatusWhether input events are processed by the window or not.
Returns
No return value.

◆ setViewLimitOff()

void setViewLimitOff ( )

Set View Limit Off.

Returns
No return value

◆ setViewLimitOn()

void setViewLimitOn ( )

Set View Limit On.

Parameters
[minX/ minY / maxX / maxY] Optionally supplies the limits for the view.
Returns
No return value

◆ startCameraMove()

void startCameraMove ( )

Start Camera Move.

Returns
No return value.

◆ startCameraShake()

void startCameraShake ( shakeMagnitude  ,
time   
)

Starts the camera shaking.

Parameters
shakeMagnitudeThe intensity of the shaking
timeThe length of the shake
Returns
No return value

◆ stopCameraMove()

void stopCameraMove ( )

Stops current camera movement

Returns
No return value.

◆ stopCameraShake()

void stopCameraShake ( )

Stops the camera shaking.

Returns
No return value

◆ undoCameraMove()

void undoCameraMove ( )

Reverses previous camera movement.

Returns
No return value.