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

Method getFontColor

Engine/source/gui/controls/guiPopUpCtrl.cpp:1354–1387  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1352
1353//------------------------------------------------------------------------------
1354bool GuiPopUpMenuCtrl::getFontColor( ColorI &fontColor, S32 id, bool selected, bool mouseOver )
1355{
1356 U32 i;
1357 Entry* entry = NULL;
1358 for ( i = 0; i < mEntries.size(); i++ )
1359 {
1360 if ( mEntries[i].id == id )
1361 {
1362 entry = &mEntries[i];
1363 break;
1364 }
1365 }
1366
1367 if ( !entry )
1368 return( false );
1369
1370 if ( entry->scheme != 0 )
1371 {
1372 // Find the entry's color scheme:
1373 for ( i = 0; i < mSchemes.size(); i++ )
1374 {
1375 if ( mSchemes[i].id == entry->scheme )
1376 {
1377 fontColor = selected ? mSchemes[i].fontColorSEL : mouseOver ? mSchemes[i].fontColorHL : mSchemes[i].fontColor;
1378 return( true );
1379 }
1380 }
1381 }
1382
1383 // Default color scheme...
1384 fontColor = selected ? mProfile->mFontColorSEL : mouseOver ? mProfile->mFontColorHL : mProfile->mFontColorNA; // Modified the final color choice from mProfile->mFontColor to mProfile->mFontColorNA
1385
1386 return( true );
1387}
1388
1389//------------------------------------------------------------------------------
1390// Added

Callers 1

onRenderCellMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected