MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / renderButton

Method renderButton

Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp:182–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180//------------------------------------------------------------------------------
181
182void GuiToolboxButtonCtrl::renderButton(GFXTexHandle &texture, Point2I &offset, const RectI& updateRect)
183{
184 if (texture)
185 {
186 Point2I finalOffset = offset;
187
188 finalOffset.x += ( ( getWidth() / 2 ) - ( texture.getWidth() / 2 ) );
189 finalOffset.y += ( ( getHeight() / 2 ) - ( texture.getHeight() / 2 ) );
190
191 GFX->getDrawUtil()->clearBitmapModulation();
192 GFX->getDrawUtil()->drawBitmap(texture, finalOffset);
193 renderChildControls( offset, updateRect);
194 }
195}
196
197DEF_ASSET_BINDS(GuiToolboxButtonCtrl, NormalBitmap);
198DEF_ASSET_BINDS(GuiToolboxButtonCtrl, LoweredBitmap);

Callers

nothing calls this directly

Calls 7

getWidthFunction · 0.85
clearBitmapModulationMethod · 0.80
getDrawUtilMethod · 0.80
drawBitmapMethod · 0.80
getHeightFunction · 0.50
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected