GuiGradientCtrl
Engine/source/gui/controls/guiGradientCtrl.h
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
renderColorBox(RectI & bounds)
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
setValue(LinearColorF & value)
getValue()
NOTE: getValue() returns baseColor if pallet (since pallet controls can't "pick" colours themselves)
Input Events
Public Types
PickMode { pHorizColorRange pHorizAlphaRange }
SelectorMode { sHorizontal = 0 sVertical }
Private Types
Parent
Public Attributes
bool
Show reticle on render.
Private Attributes
Public Functions
addColorRange(ColorI color)
addColorRange(Point2I pos, const LinearColorF & color)
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
onAdd()
Called when this object is added to the scene.
removeColorRange(GuiGradientSwatchCtrl * swatch)
Public Static Functions
Detailed Description
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
Public Functions
GuiGradientCtrl()
addColorRange(ColorI color)
addColorRange(Point2I pos, const LinearColorF & color)
DECLARE_CATEGORY("Gui Editor" )
DECLARE_CONOBJECT(GuiGradientCtrl )
getDisplayMode()
inspectPostApply()
Reimplemented from: SimObject
inspectPreApply()
Reimplemented from: SimObject
onAdd()
Reimplemented from: GuiControl
onRender(Point2I offset, const RectI & updateRect)
Reimplemented from: GuiControl
reInitSwatches(GuiGradientCtrl::PickMode )
removeColorRange(GuiGradientSwatchCtrl * swatch)
setupDefaultRange()
sortColorRange()