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

Method getFontColor

Engine/source/gui/controls/guiPopUpCtrlEx.cpp:1595–1631  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1593
1594//------------------------------------------------------------------------------
1595bool GuiPopUpMenuCtrlEx::getFontColor( ColorI &fontColor, S32 id, bool selected, bool mouseOver )
1596{
1597 U32 i;
1598 Entry* entry = NULL;
1599 for ( i = 0; i < mEntries.size(); i++ )
1600 {
1601 if ( mEntries[i].id == id )
1602 {
1603 entry = &mEntries[i];
1604 break;
1605 }
1606 }
1607
1608 if ( !entry )
1609 return( false );
1610
1611 if ( entry->scheme != 0 )
1612 {
1613 // Find the entry's color scheme:
1614 for ( i = 0; i < mSchemes.size(); i++ )
1615 {
1616 if ( mSchemes[i].id == entry->scheme )
1617 {
1618 fontColor = selected ? mSchemes[i].fontColorSEL : mouseOver ? mSchemes[i].fontColorHL : mSchemes[i].fontColor;
1619 return( true );
1620 }
1621 }
1622 }
1623
1624 if(id == -1)
1625 fontColor = mProfile->mFontColorHL;
1626 else
1627 // Default color scheme...
1628 fontColor = selected ? mProfile->mFontColorSEL : mouseOver ? mProfile->mFontColorHL : mProfile->mFontColorNA; // Modified the final color choice from mProfile->mFontColor to mProfile->mFontColorNA
1629
1630 return( true );
1631}
1632
1633//------------------------------------------------------------------------------
1634// Added

Callers 1

onRenderCellMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected