@@ -18,7 +18,10 @@ namespace tcgfx {
1818 static unsigned char rendererUpArrowXbm[] = { 0x03 , 0x07 , 0x0f , 0x1f , 0x3f , 0x7f , 0x3f , 0x1f , 0x0f , 0x07 , 0x03 };
1919 static unsigned char rendererDownArrowXbm[] = { 0xc0 , 0xe0 , 0xf0 , 0xf8 , 0xfc , 0xfe , 0xfc , 0xf8 , 0xf0 , 0xe0 , 0xc0 };
2020
21- bool GraphicsDeviceRenderer::isActiveOrEditing (MenuItem* pItem, const DrawingFlags& drawingFlags) {
21+ bool GraphicsDeviceRenderer::isActiveOrEditing (MenuItem* pItem, const DrawingFlags& drawingFlags) const {
22+ // in card layout we should not select.
23+ if (cardLayoutPane != nullptr && cardLayoutPane->isSubMenuCardLayout (menuMgr.getCurrentSubMenu ())) return false ;
24+
2225 auto mt = pItem->getMenuType ();
2326 return (drawingFlags.isEditing () || drawingFlags.isActive ()) && mt != MENUTYPE_TITLE_ITEM && mt != MENUTYPE_BACK_VALUE ;
2427 }
@@ -506,7 +509,7 @@ namespace tcgfx {
506509 int outsideAreaX = maximumSliderArea - filledAreaX;
507510 helper.getDrawable ()->setDrawColor (props->getColor (ItemDisplayProperties::HIGHLIGHT1 ));
508511 helper.getDrawable ()->drawBox (Coord (where.x , where.y ), Coord (filledAreaX, size.y ), true );
509- auto mainBg = (drawingFlags. isActive () || drawingFlags. isEditing () ) ? propertiesFactory.getSelectedColor (ItemDisplayProperties::BACKGROUND ) : props->getColor (ItemDisplayProperties::BACKGROUND );
512+ auto mainBg = isActiveOrEditing (pItem, drawingFlags) ? propertiesFactory.getSelectedColor (ItemDisplayProperties::BACKGROUND ) : props->getColor (ItemDisplayProperties::BACKGROUND );
510513 helper.getDrawable ()->setDrawColor (mainBg);
511514 helper.getDrawable ()->drawBox (Coord (where.x + filledAreaX, where.y ), Coord (outsideAreaX, size.y ), true );
512515 internalDrawText (entry, Coord (where.x , where.y ), Coord (size.x , size.y ), drawingFlags);
0 commit comments