TorqueScript Reference
GuiColorPopupCtrl Class Reference

#include <guiColorPopupCtrl_ScriptBinding.h>

Inherits GuiControl.

Public Member Functions

void addSwatchF (color red/green/blue/[alpha])"
void addSwatchI (color red/green/blue/[alpha])"
void clearSwatches ()
void closeColorPopup ()"
Float getColorChannel (channel)
String getColorF ()
String getColorI ()
Integer getSwatchCount ()
String getSwatchF (index)
String getSwatchI (index)
void openColorPopup ()"
void selectSwatch (index)
void setBackgroundProfile (GuiControlProfile p)
void setColorChannel (channel, value)
void setColorF (color red/green/blue/[alpha])"
void setColorI (color red/green/blue/[alpha])"
void setPickerProfile (GuiControlProfile p)
void setPopupProfile (GuiControlProfile p)
void setSelectorProfile (GuiControlProfile p)
void setValueProfile (GuiControlProfile p)
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

◆ addSwatchF()

void addSwatchF ( color red/green/blue/ [alpha])

Adds a swatch to the row beneath the color bars using floating point values.

Parameters
colorThe swatch color as a stock color name or values between 0 and 1.
Returns
No return value.

◆ addSwatchI()

void addSwatchI ( color red/green/blue/ [alpha])

Adds a swatch to the row beneath the color bars using integer values. The row is hidden while there are no swatches, so this is also what turns it on.

Parameters
colorThe swatch color as a stock color name or values between 0 and 255.
Returns
No return value.

◆ clearSwatches()

void clearSwatches ( )

Removes every swatch, hiding the swatch row.

Returns
No return value.

◆ closeColorPopup()

void closeColorPopup ( )

Closes the popup. Does nothing if the popup is already closed.

Returns
No return value.

◆ getColorChannel()

Float getColorChannel ( channel )

Gets one channel of the selected color, in the units the value row is using.

Parameters
channel0 for red, 1 for green, 2 for blue, 3 for alpha.
Returns
The channel value, 0 to 255 in Integer mode or 0 to 1 in Float mode.

◆ getColorF()

String getColorF ( )

Gets the selected color as floating point values.

Returns
The selected color as four floating point values between 0 and 1.

◆ getColorI()

String getColorI ( )

Gets the selected color as integer values.

Returns
The selected color as four integer values between 0 and 255.

◆ getSwatchCount()

Integer getSwatchCount ( )

Gets how many swatches the popup is showing.

Returns
The swatch count.

◆ getSwatchF()

String getSwatchF ( index )

Gets a swatch color as floating point values.

Parameters
indexThe swatch to read, from zero.
Returns
The swatch color as four floating point values between 0 and 1.

◆ getSwatchI()

String getSwatchI ( index )

Gets a swatch color as integer values.

Parameters
indexThe swatch to read, from zero.
Returns
The swatch color as four integer values between 0 and 255.

◆ openColorPopup()

void openColorPopup ( )

Opens the popup. Does nothing if the popup is already open.

Returns
No return value.

◆ selectSwatch()

void selectSwatch ( index )

Displays a swatch's color, exactly as clicking that swatch would.

Parameters
indexThe swatch to select, from zero.
Returns
No return value.

◆ setBackgroundProfile()

void setBackgroundProfile ( GuiControlProfile p)

Sets the currently used BackgroundProfile for the GuiControl

Parameters
pThe BackgroundProfile applies to the the entire screen when the list opens.
Returns
No return value

◆ setColorChannel()

void setColorChannel ( channel ,
value  )

Sets one channel of the selected color, in the units the value row is using. This is the same path a typed value takes.

Parameters
channel0 for red, 1 for green, 2 for blue, 3 for alpha.
valueThe channel value, 0 to 255 in Integer mode or 0 to 1 in Float mode.
Returns
No return value.

◆ setColorF()

void setColorF ( color red/green/blue/ [alpha])

Sets the base color displayed using floating point values.

Parameters
colorThe color to display as values between 0 and 1.0.
Returns
No return value.

◆ setColorI()

void setColorI ( color red/green/blue/ [alpha])

Sets the base color displayed using integer values.

Parameters
colorThe color to display as values between 0 and 255.
Returns
No return value.

◆ setPickerProfile()

void setPickerProfile ( GuiControlProfile p)

Sets the currently used PickerProfile for the GuiControl

Parameters
pThe PickerProfile applies to the the entire screen when the list opens.
Returns
No return value

◆ setPopupProfile()

void setPopupProfile ( GuiControlProfile p)

Sets the currently used PopupProfile for the GuiControl

Parameters
pThe PopupProfile applies to the the entire screen when the list opens.
Returns
No return value

◆ setSelectorProfile()

void setSelectorProfile ( GuiControlProfile p)

Sets the currently used SelectorProfile for the GuiControl

Parameters
pThe SelectorProfile applies to the the entire screen when the list opens.
Returns
No return value

◆ setValueProfile()

void setValueProfile ( GuiControlProfile p)

Sets the currently used ValueProfile for the GuiControl

Parameters
pThe ValueProfile applies to the numeric boxes of the value row.
Returns
No return value