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

Method getFontColor

Engine/source/gui/controls/guiPopUpCtrl.cpp:1403–1436  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1401
1402//------------------------------------------------------------------------------
1403bool GuiPopUpMenuCtrl::getFontColor( ColorI &fontColor, S32 id, bool selected, bool mouseOver )
1404{
1405 U32 i;
1406 Entry* entry = NULL;
1407 for ( i = 0; i < mEntries.size(); i++ )
1408 {
1409 if ( mEntries[i].id == id )
1410 {
1411 entry = &mEntries[i];
1412 break;
1413 }
1414 }
1415
1416 if ( !entry )
1417 return( false );
1418
1419 if ( entry->scheme != 0 )
1420 {
1421 // Find the entry's color scheme:
1422 for ( i = 0; i < mSchemes.size(); i++ )
1423 {
1424 if ( mSchemes[i].id == entry->scheme )
1425 {
1426 fontColor = selected ? mSchemes[i].fontColorSEL : mouseOver ? mSchemes[i].fontColorHL : mSchemes[i].fontColor;
1427 return( true );
1428 }
1429 }
1430 }
1431
1432 // Default color scheme...
1433 fontColor = selected ? mProfile->mFontColorSEL : mouseOver ? mProfile->mFontColorHL : mProfile->mFontColorNA; // Modified the final color choice from mProfile->mFontColor to mProfile->mFontColorNA
1434
1435 return( true );
1436}
1437
1438//------------------------------------------------------------------------------
1439// Added

Callers 1

onRenderCellMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected