Fix the issue of Wide char help strings cannot break into multiple lines correctly

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2473 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2
2007-03-15 06:30:33 +00:00
parent 2e71184711
commit f4e8c17bc2
3 changed files with 207 additions and 217 deletions

View File

@ -1,5 +1,6 @@
/*++
/**@file
Implementation for UI.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@ -9,17 +10,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
Ui.c
Abstract:
Implementation for UI.
Revision History
--*/
**/
#include "Setup.h"
#include "Ui.h"
@ -2053,14 +2044,14 @@ Returns:
//
// Pad String with spaces to simulate a clearing of the previous line
//
for (; GetStringWidth (&FormattedString[Index * gHelpBlockWidth]) / 2 < gHelpBlockWidth;) {
StrCat (&FormattedString[Index * gHelpBlockWidth], (CHAR16 *) L" ");
for (; GetStringWidth (&FormattedString[Index * gHelpBlockWidth * 2]) / 2 < gHelpBlockWidth;) {
StrCat (&FormattedString[Index * gHelpBlockWidth * 2], (CHAR16 *) L" ");
}
PrintStringAt (
LocalScreen.RightColumn - gHelpBlockWidth,
Index + TopRow,
&FormattedString[Index * gHelpBlockWidth]
&FormattedString[Index * gHelpBlockWidth * 2]
);
}
}