Fix progress bar colors
This commit is contained in:
parent
e3a4460dbc
commit
c649087c3e
@ -23,6 +23,8 @@
|
|||||||
typedef struct _XTBL_DIALOG_HANDLE
|
typedef struct _XTBL_DIALOG_HANDLE
|
||||||
{
|
{
|
||||||
UCHAR Attributes;
|
UCHAR Attributes;
|
||||||
|
UCHAR DialogColor;
|
||||||
|
UCHAR TextColor;
|
||||||
UINT_PTR ResX;
|
UINT_PTR ResX;
|
||||||
UINT_PTR ResY;
|
UINT_PTR ResY;
|
||||||
UINT_PTR PosX;
|
UINT_PTR PosX;
|
||||||
@ -147,25 +149,26 @@ BlpDrawDialogBox(IN PXTBL_DIALOG_HANDLE Handle,
|
|||||||
PWCHAR MsgLine, LastMsgLine;
|
PWCHAR MsgLine, LastMsgLine;
|
||||||
UINT_PTR Line, PosX, PosY;
|
UINT_PTR Line, PosX, PosY;
|
||||||
SIZE_T CaptionLength;
|
SIZE_T CaptionLength;
|
||||||
UCHAR DialogColor;
|
|
||||||
|
|
||||||
/* Set dialog colors */
|
/* Set dialog colors */
|
||||||
if(Handle->Attributes & TUI_DIALOG_ERROR_BOX)
|
if(Handle->Attributes & TUI_DIALOG_ERROR_BOX)
|
||||||
{
|
{
|
||||||
/* Error dialog with red background and brown button */
|
/* Error dialog with red background and brown button */
|
||||||
DialogColor = EFI_TEXT_BGCOLOR_RED;
|
Handle->DialogColor = EFI_TEXT_BGCOLOR_RED;
|
||||||
|
Handle->TextColor = EFI_TEXT_FGCOLOR_WHITE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Generic dialog with blue background and cyan button */
|
/* Generic dialog with blue background and cyan button */
|
||||||
DialogColor = EFI_TEXT_BGCOLOR_BLUE;
|
Handle->DialogColor = EFI_TEXT_BGCOLOR_BLUE;
|
||||||
|
Handle->TextColor = EFI_TEXT_FGCOLOR_WHITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get caption length */
|
/* Get caption length */
|
||||||
CaptionLength = RtlWideStringLength(Caption, 0);
|
CaptionLength = RtlWideStringLength(Caption, 0);
|
||||||
|
|
||||||
/* Set dialog box colors */
|
/* Set dialog box colors */
|
||||||
BlSetConsoleAttributes(DialogColor | 0x0F);
|
BlSetConsoleAttributes(Handle->DialogColor | 0x0F);
|
||||||
|
|
||||||
/* Iterate through dialog box lines */
|
/* Iterate through dialog box lines */
|
||||||
for(PosY = Handle->PosY; PosY < Handle->PosY + Handle->Height; PosY++)
|
for(PosY = Handle->PosY; PosY < Handle->PosY + Handle->Height; PosY++)
|
||||||
@ -688,6 +691,7 @@ BlUpdateProgressBar(IN PXTBL_DIALOG_HANDLE Handle,
|
|||||||
|
|
||||||
/* Update message in the dialog box */
|
/* Update message in the dialog box */
|
||||||
BlSetCursorPosition(Handle->PosX + 2, Handle->PosY + 2);
|
BlSetCursorPosition(Handle->PosX + 2, Handle->PosY + 2);
|
||||||
|
BlSetConsoleAttributes(Handle->DialogColor | Handle->TextColor);
|
||||||
BlConsolePrint(L"%S", Message);
|
BlConsolePrint(L"%S", Message);
|
||||||
|
|
||||||
if(Length < Handle->Width - 4)
|
if(Length < Handle->Width - 4)
|
||||||
|
Loading…
Reference in New Issue
Block a user