UiInitialize(IN BOOLEAN ShowGui)
{
ULONG Depth;
-
- /* Nothing to do */
- if (!ShowGui) return TRUE;
- /* Set mode and query size */
+ /* Nothing to do */
+ if (!ShowGui) return TRUE;
+
+ /* Set mode and query size */
MachVideoSetDisplayMode(NULL, TRUE);
MachVideoGetDisplaySize(&UiScreenWidth, &UiScreenHeight, &Depth);
return TRUE;
IN ULONG MaxChars)
{
/* If it's too large, just add some ellipsis past the maximum */
- if (strlen(StringText) > MaxChars) strcpy(&StringText[MaxChars - 3], "...");
+ if (strlen(StringText) > MaxChars) strcpy(&StringText[MaxChars - 3], "...");
}
VOID
/* Display under the menu directly */
UiDrawText(0,
- MenuInfo->Bottom + 3,
+ MenuInfo->Bottom + 4,
MenuLineText,
ATTR(UiMenuFgColor, UiMenuBgColor));
}
/* Draw this "empty" string to erase */
UiDrawText(0,
- MenuInfo->Bottom + 3,
+ MenuInfo->Bottom + 4,
MenuLineText,
ATTR(UiMenuFgColor, UiMenuBgColor));
}
/* No GUI status bar text, just minimal text. first to tell the user to choose */
UiDrawText(0,
MenuInfo->Top - 2,
- "Please select the operating system to start:",
+ MenuInfo->MenuTitle,
ATTR(UiMenuFgColor, UiMenuBgColor));
/* Now tell him how to choose */
UiDrawText(0,
MenuInfo->Bottom + 1,
- "Use the up and down arrow keys to move the highlight to "
- "your choice.",
+ "Use \x18 and \x19 to move the highlight to your choice.",
ATTR(UiMenuFgColor, UiMenuBgColor));
UiDrawText(0,
MenuInfo->Bottom + 2,
UiDrawMenuBox(MenuInfo);
/* Draw each line of the menu */
- for (i = 0; i < MenuInfo->MenuItemCount; i++) UiDrawMenuItem(MenuInfo, i);
+ for (i = 0; i < MenuInfo->MenuItemCount; i++)
+ {
+ UiDrawMenuItem(MenuInfo, i);
+ }
}
ULONG
}
BOOLEAN
-UiDisplayMenu(IN PCSTR MenuItemList[],
+UiDisplayMenu(IN PCSTR MenuTitle,
+ IN PCSTR MenuItemList[],
IN ULONG MenuItemCount,
IN ULONG DefaultMenuItem,
IN LONG MenuTimeOut,
}
/* Setup the MENU_INFO structure */
+ MenuInformation.MenuTitle = MenuTitle;
MenuInformation.MenuItemList = MenuItemList;
MenuInformation.MenuItemCount = MenuItemCount;
MenuInformation.MenuTimeRemaining = MenuTimeOut;