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

Method onWake

Engine/source/gui/containers/guiTabBookCtrl.cpp:263–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261//-----------------------------------------------------------------------------
262
263bool GuiTabBookCtrl::onWake()
264{
265 if (! Parent::onWake())
266 return false;
267
268 mHasTexture = mProfile->constructBitmapArray() > 0;
269 if( mHasTexture )
270 {
271 mBitmapBounds = mProfile->mBitmapArrayRects.address();
272 mTabHeight = mBitmapBounds[TabSelected].extent.y;
273 }
274
275 calculatePageTabs();
276
277 if( mIsFirstWake )
278 {
279 // Awaken all pages, visible or not. We need to do this so
280 // any pages that make use of a language table for their label
281 // are correctly initialized.
282 for ( U32 i = 0; i < mPages.size(); ++i)
283 {
284 if ( !mPages[i].Page->isAwake() )
285 {
286 mPages[i].Page->awaken();
287 }
288 }
289
290 if( mDefaultPageNum >= 0 && mDefaultPageNum < mPages.size() )
291 selectPage( mDefaultPageNum );
292
293 mIsFirstWake = false;
294 }
295
296 return true;
297}
298
299//-----------------------------------------------------------------------------
300

Callers

nothing calls this directly

Calls 4

constructBitmapArrayMethod · 0.80
awakenMethod · 0.80
addressMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected