Torque3D Documentation / _generateds / GuiIconButtonCtrl

GuiIconButtonCtrl

Engine/source/gui/buttons/guiIconButtonCtrl.h

The GuiIconButtonCtrl draws an icon and text caption within a normal button control with several layout options.

More...

Protected Types

enum
_Anonymous_ {
  stateNormal 
  stateMouseOver 
  statePressed 
  stateDisabled 
}

Public Types

enum
IconLocation {
  IconLocNone 
  IconLocLeft 
  IconLocRight 
  IconLocCenter 
}
enum
TextLocation {
  TextLocNone 
  TextLocBottom 
  TextLocRight 
  TextLocTop 
  TextLocLeft 
  TextLocCenter 
}

Private Types

Protected Attributes

bool

Calculate extent based on icon size, text width, and layout options.

bool

Make the bitmap fill the button extent.

bool

Keep a square aspect ration on the icon.

Protected Functions

renderBitmapArray(RectI & bounds, S32 state)
renderButton(Point2I & offset, const RectI & updateRect)

Public Functions

DECLARE_DESCRIPTION("A button <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that displays an icon on the button in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">addition\n</a>" "<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the optional text label." )

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

onRender(Point2I offset, const RectI & updateRect)

Called when this control is to render itself.

Called when this object is asked to sleep.

onStaticModified(const char * slotName, const char * newValue)

Specifically, these are called by setDataField when a static or dynamic field is modified, see the console details.

bool

Called when this object is asked to wake up returns true if it's actually awake at the end.

bool
resize(const Point2I & newPosition, const Point2I & newExtent)

Changes the size and/or position of this control.

setBitmap(const char * name)
setErrorBitmap(const char * name)

Public Static Functions

Detailed Description

The GuiIconButtonCtrl draws an icon and text caption within a normal button control with several layout options.

Protected Types

@89

Enumerator

stateNormal
stateMouseOver
statePressed
stateDisabled

Public Types

IconLocation

Enumerator

IconLocNone
IconLocLeft
IconLocRight
IconLocCenter
TextLocation

Enumerator

TextLocNone
TextLocBottom
TextLocRight
TextLocTop
TextLocLeft
TextLocCenter

Private Types

typedef GuiButtonCtrl Parent 

Protected Attributes

bool mAutoSize 

Calculate extent based on icon size, text width, and layout options.

StringTableEntry mBitmapName 
Point2I mButtonMargin 
StringTableEntry mErrorBitmapName 
GFXTexHandle mErrorTextureHandle 
bool mFitBitmapToButton 

Make the bitmap fill the button extent.

S32 mIconLocation 
bool mMakeIconSquare 

Keep a square aspect ration on the icon.

S32 mTextLocation 
S32 mTextMargin 
GFXTexHandle mTextureNormal 

Protected Functions

renderBitmapArray(RectI & bounds, S32 state)

renderButton(Point2I & offset, const RectI & updateRect)

Public Functions

GuiIconButtonCtrl()

DECLARE_CONOBJECT(GuiIconButtonCtrl )

DECLARE_DESCRIPTION("A button <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that displays an icon on the button in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">addition\n</a>" "<a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> the optional text label." )

inspectPostApply()

Reimplemented from: SimObject

onRender(Point2I offset, const RectI & updateRect)

Reimplemented from: GuiButtonCtrl

onSleep()

Reimplemented from: GuiControl

onStaticModified(const char * slotName, const char * newValue)

Reimplemented from: SimObject

onWake()

Reimplemented from: GuiButtonCtrl

resize(const Point2I & newPosition, const Point2I & newExtent)

Reimplemented from: GuiControl

setBitmap(const char * name)

setErrorBitmap(const char * name)

Public Static Functions

initPersistFields()