MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / setBitmap

Method setBitmap

Engine/source/gui/buttons/guiIconButtonCtrl.cpp:202–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void GuiIconButtonCtrl::setBitmap(const char *name)
203{
204 mBitmapName = StringTable->insert(name);
205 if(!isAwake())
206 return;
207
208 if (*mBitmapName)
209 {
210 mTextureNormal = GFXTexHandle( name, &GFXDefaultPersistentProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__) );
211 }
212 else
213 {
214 mTextureNormal = NULL;
215 }
216
217 // So that extent is recalculated if autoSize is set.
218 resize( getPosition(), getExtent() );
219
220 setUpdate();
221}
222
223void GuiIconButtonCtrl::onRender(Point2I offset, const RectI& updateRect)
224{

Callers 1

Calls 5

avarFunction · 0.85
isAwakeFunction · 0.50
GFXTexHandleClass · 0.50
resizeFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected