Torque3D Documentation / _generateds / GuiGradientCtrl

GuiGradientCtrl

Engine/source/gui/controls/guiGradientCtrl.h

GuiGradientCtrl.

More...

Classes:

Core Variables

Color that has been picked from control.

Colour we display (in case of pallet and blend mode)

Current color display mode of the selector.

bool

Current position has changed since last render?

bool

Mouse is over?

bool

Mouse button down?

bool

Perform onAction() when position has changed?

Core Rendering functions

Function that draws the actual color box.

drawBlendRangeBox(RectI & bounds, bool vertical, Vector< ColorRange > colorRange)

Function to draw a set of boxes blending throughout an array of colors.

Color Value Functions

NOTE: setValue only sets baseColor, since setting pickColor wouldn't be useful

NOTE: getValue() returns baseColor if pallet (since pallet controls can't "pick" colours themselves)

Public Types

enum
PickMode {
  pHorizColorRange 
  pHorizAlphaRange 
}
enum
SelectorMode {
  sHorizontal = 0
  sVertical 
}

Private Types

Parent 

Private Attributes

Public Functions

DECLARE_CATEGORY("Gui Editor" )

Called after any property of the object is changed in the world editor.

Called before any property of the object is changed in the world editor.

bool

Called when this object is added to the scene.

onRender(Point2I offset, const RectI & updateRect)

Called when this control is to render itself.

Public Static Functions

Detailed Description

GuiGradientCtrl.

Core Variables

LinearColorF mPickColor 

Color that has been picked from control.

LinearColorF mBaseColor 

Colour we display (in case of pallet and blend mode)

PickMode mDisplayMode 

Current color display mode of the selector.

PickMode mSaveDisplayMode 
bool mPositionChanged 

Current position has changed since last render?

bool mMouseOver 

Mouse is over?

bool mMouseDown 

Mouse button down?

bool mActionOnMove 

Perform onAction() when position has changed?

GFXStateBlockRef mStateBlock 
LinearColorF colorWhite 
LinearColorF colorWhiteBlend 
LinearColorF colorBlack 
LinearColorF colorAlpha 
LinearColorF colorAlphaW 

Core Rendering functions

renderColorBox(RectI & bounds)

Function that draws the actual color box.

Function to invoke calls to draw the picker box and swatch controls.

drawBlendRangeBox(RectI & bounds, bool vertical, Vector< ColorRange > colorRange)

Function to draw a set of boxes blending throughout an array of colors.

Color Value Functions

NOTE: setValue only sets baseColor, since setting pickColor wouldn't be useful

setValue(LinearColorF & value)

getValue()

NOTE: getValue() returns baseColor if pallet (since pallet controls can't "pick" colours themselves)

updateColor()

Input Events

onMouseDown(const GuiEvent & )

Reimplemented from: GuiControl

onMouseUp(const GuiEvent & )

Reimplemented from: GuiControl

onMouseEnter(const GuiEvent & )

Reimplemented from: GuiControl

onMouseLeave(const GuiEvent & )

Reimplemented from: GuiControl

Public Types

PickMode

Enumerator

pHorizColorRange

We have a range of base colors going horizontally.

pHorizAlphaRange

We have a box which shows a range in alpha going horizontally.

SelectorMode

Enumerator

sHorizontal = 0

Horizontal selector with small gap.

sVertical

Vertical selector with small gap.

Private Types

typedef GuiControl Parent 

Public Attributes

Vector< ColorRange > mAlphaRange 
RectI mBlendRangeBox 
Vector< ColorRange > mColorRange 
bool mShowReticle 

Show reticle on render.

S32 mSwatchFactor 

Private Attributes

String mColorFunction