@param StringBuffer The passed in pointer to the buffer which will\r
hold the typed in string if HotKey is FALSE\r
@param KeyValue The EFI_KEY value returned if HotKey is TRUE..\r
- @param String Pointer to the first string in the list\r
@param ... A series of (quantity == NumberOfLines) text\r
strings which will be used to construct the dialog\r
box\r
IN UINTN MaximumStringSize,\r
OUT CHAR16 *StringBuffer,\r
OUT EFI_INPUT_KEY *KeyValue,\r
- IN CHAR16 *String,\r
...\r
)\r
{\r
VA_LIST Marker;\r
+ VA_LIST MarkerBackup;\r
UINTN Count;\r
EFI_INPUT_KEY Key;\r
UINTN LargestString;\r
ASSERT (TempString);\r
ASSERT (BufferedString);\r
\r
- VA_START (Marker, String);\r
+ VA_START (Marker, KeyValue);\r
+ MarkerBackup = Marker;\r
\r
//\r
// Zero the outgoing buffer\r
//\r
gST->ConOut->EnableCursor (gST->ConOut, FALSE);\r
\r
- LargestString = (GetStringWidth (String) / 2);\r
+ LargestString = 0;\r
\r
- if (*String == L' ') {\r
- InputOffset = 1;\r
- }\r
//\r
// Determine the largest string in the dialog box\r
// Notice we are starting with 1 since String is the first string\r
//\r
- for (Count = 1; Count < NumberOfLines; Count++) {\r
+ for (Count = 0; Count < NumberOfLines; Count++) {\r
StackString = VA_ARG (Marker, CHAR16 *);\r
\r
if (StackString[0] == L' ') {\r
//\r
// Display the Popup\r
//\r
- CreateSharedPopUp (LargestString, NumberOfLines, &String);\r
+ CreateSharedPopUp (LargestString, NumberOfLines, MarkerBackup);\r
\r
//\r
// Take the first key typed and report it back?\r
\r
@param RequestedWidth The width of the pop-up.\r
@param NumberOfLines The number of lines.\r
- @param ArrayOfStrings The array of string to be printed.\r
+ @param Marker The variable argument list for the list of string to be printed.\r
\r
**/\r
VOID\r
CreateSharedPopUp (\r
IN UINTN RequestedWidth,\r
IN UINTN NumberOfLines,\r
- IN CHAR16 **ArrayOfStrings\r
+ IN VA_LIST Marker\r
)\r
{\r
UINTN Index;\r
DimensionsWidth = gScreenDimensions.RightColumn - gScreenDimensions.LeftColumn;\r
DimensionsHeight = gScreenDimensions.BottomRow - gScreenDimensions.TopRow;\r
\r
- Count = 0;\r
-\r
gST->ConOut->SetAttribute (gST->ConOut, POPUP_TEXT | POPUP_BACKGROUND);\r
\r
if ((RequestedWidth + 2) > DimensionsWidth) {\r
Character = BOXDRAW_DOWN_LEFT;\r
PrintChar (Character);\r
Character = BOXDRAW_VERTICAL;\r
- for (Index = Top; Index + 2 < Bottom; Index++) {\r
- String = ArrayOfStrings[Count];\r
- Count++;\r
+\r
+ Count = 0;\r
+ for (Index = Top; Index + 2 < Bottom; Index++, Count++) {\r
+ String = VA_ARG (Marker, CHAR16*);\r
\r
//\r
// This will clear the background of the line - we never know who might have been\r
\r
@param RequestedWidth The width of the pop-up.\r
@param NumberOfLines The number of lines.\r
- @param ArrayOfStrings The array of string to be printed.\r
@param ... A series of text strings that displayed in the pop-up.\r
\r
**/\r
CreatePopUp (\r
IN UINTN RequestedWidth,\r
IN UINTN NumberOfLines,\r
- IN CHAR16 *ArrayOfStrings,\r
...\r
)\r
{\r
- CreateSharedPopUp (RequestedWidth, NumberOfLines, &ArrayOfStrings);\r
+ VA_LIST Marker;\r
+\r
+ VA_START (Marker, NumberOfLines);\r
+ \r
+ CreateSharedPopUp (RequestedWidth, NumberOfLines, Marker);\r
+\r
+ VA_END (Marker);\r
}\r
\r
\r