--- gui/controls/guiPopUpCtrlEx.cpp	Thu Jan 15 03:14:12 1970
+++ gui/controls/guiPopUpCtrlEx.cpp	Thu Jan 15 03:14:12 1970
@@ -13,6 +13,12 @@
 #include "gfx/gfxDrawUtil.h"
 #include "console/engineAPI.h"
 
+static enum eGuiPopUpCtrlEx
+{
+	eGUI_PopupCtrlEx_Category = -5				// special entry identifier to indicate a non-selectable category label
+};
+
+
 ConsoleDocClass( GuiPopUpMenuCtrlEx,
 	"@brief A control that allows to select a value from a drop-down list.\n\n"
 
@@ -66,6 +72,10 @@
 static const char *getColumn(const char *string, char* returnbuff, U32 index, const char *set)
 {
    U32 sz;
+
+   // bugfix: make return buffer an emtpy string
+   *returnbuff = 0;
+
    while(index--)
    {
       if(!*string)
@@ -141,7 +151,7 @@
 {
    for( S32 i = 0; i < mList.size(); i++)
    {
-      if( mList[i].id == -1)
+      if( mList[i].id == eGUI_PopupCtrlEx_Category)
          return true;
    }
 
@@ -186,7 +196,7 @@
 
    if (cell.x >= 0 && cell.x < mSize.x && cell.y >= 0 && cell.y < mSize.y)
    {
-      if (mList[cell.y].id == -1)
+      if (mList[cell.y].id == eGUI_PopupCtrlEx_Category)
          return;
    }
 
@@ -250,10 +260,10 @@
    }
 
    // Render 'Group' background
-   if ( mList[cell.y].id == -1)
+   if ( mList[cell.y].id == eGUI_PopupCtrlEx_Category)
    {
       RectI cellR( offset.x, offset.y, size.x, size.y );
-      GFX->getDrawUtil()->drawRectFill( cellR, mProfile->mFillColorHL );
+      GFX->getDrawUtil()->drawRectFill( cellR, mProfile->mFillColorNA );
    }
 
    ColorI fontColor;
@@ -282,7 +292,7 @@
 
    } else
    {
-      if ((mList[cell.y].id == -1) || (!hasCategories()))
+      if ((mList[cell.y].id == eGUI_PopupCtrlEx_Category) || (!hasCategories()))
          GFX->getDrawUtil()->drawText( mFont, Point2I( textXOffset, offset.y ), mList[cell.y].text ); //  Used mTextOffset as a margin for the text list rather than the hard coded value of '4'.
       else
          GFX->getDrawUtil()->drawText( mFont, Point2I( textXOffset + 8, offset.y ), mList[cell.y].text ); //  Used mTextOffset as a margin for the text list rather than the hard coded value of '4'.
@@ -352,25 +362,27 @@
 {
 	if ( argc == 4 )
 		object->addEntry(argv[2],dAtoi(argv[3]));
-   if ( argc == 5 )
+   else if ( argc == 5 )
       object->addEntry(argv[2],dAtoi(argv[3]),dAtoi(argv[4]));
    else
       object->addEntry(argv[2]);
 }
 
-DefineEngineMethod( GuiPopUpMenuCtrlEx, addCategory, void, (const char* text),,
+DefineEngineMethod( GuiPopUpMenuCtrlEx, addCategory, void, (const char* text, S32 scheme), (0),
 				   "@brief Add a category to the list.\n\n"
 
 				   "Acts as a separator between entries, allowing for sub-lists\n\n"
 
-				   "@param text Name of the new category\n\n")
+				   "@param text Name of the new category\n"
+				   "@param scheme Optional ID associated with a scheme "
+				   "for font coloring, highlight coloring, and selection coloring\n\n")
 {
-	object->addEntry(text, -1, 0);
+	object->addEntry(text, eGUI_PopupCtrlEx_Category, scheme);
 }
 
 DefineEngineMethod( GuiPopUpMenuCtrlEx, addScheme, void, (S32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL),,
 				   "@brief Create a new scheme and add it to the list of choices for when a new text entry is added.\n\n"
-				   "@param id Numerical id associated with this scheme\n"
+				   "@param id Numerical id associated with this scheme. This id must be greater than zero or it will be ignored.\n"
 				   "@param fontColor The base text font color. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n"
 				   "@param fontColorHL Color of text when being highlighted. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n"
 				   "@param fontColorSel Color of text when being selected. Formatted as \"Red Green Blue\", each a numerical between 0 and 255.\n")
@@ -828,6 +840,8 @@
          return;
    }
 
+	// Note: do not ignore or change entries with an ID of eGUI_PopupCtrlEx_Category.
+
 	// If we don't give an id, create one from mIdMax
 	if( id == -1 )
 		id = mIdMax + 1;
@@ -1595,8 +1609,8 @@
       }
    }
 
-   if(id == -1)
-      fontColor = mProfile->mFontColorHL;
+   if(id == eGUI_PopupCtrlEx_Category)
+      fontColor = mProfile->mFontColorNA;
    else
    // Default color scheme...
    fontColor = selected ? mProfile->mFontColorSEL : mouseOver ? mProfile->mFontColorHL : mProfile->mFontColorNA; //  Modified the final color choice from mProfile->mFontColor to mProfile->mFontColorNA
