BOOLEAN TuiInitialize(VOID)
{
- MachVideoClearScreen(ATTR(COLOR_WHITE, COLOR_BLACK));
MachVideoHideShowTextCursor(FALSE);
+ MachVideoClearScreen(ATTR(COLOR_GRAY, COLOR_BLACK));
TextVideoBuffer = VideoAllocateOffScreenBuffer();
if (TextVideoBuffer == NULL)
MachVideoSetDisplayMode(NULL, FALSE);
}
- //VideoClearScreen();
+ MachVideoClearScreen(ATTR(COLOR_GRAY, COLOR_BLACK));
MachVideoHideShowTextCursor(TRUE);
}
//
// Draw title text
//
- TuiDrawText( (UiScreenWidth / 2) - ((ULONG)strlen(UiTitleBoxTitleText) / 2),
+ TuiDrawText((UiScreenWidth - (ULONG)strlen(UiTitleBoxTitleText)) / 2,
2,
UiTitleBoxTitleText,
ATTR(UiTitleBoxFgColor, UiTitleBoxBgColor));
- //
- // Draw status bar
- //
- TuiDrawStatusText("Welcome to FreeLoader!");
-
//
// Update the date & time
//
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */)
{
PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer;
- ULONG i, j;
+ ULONG i, j;
// Clip the area to the screen
if ((Left >= UiScreenWidth) || (Top >= UiScreenHeight))
VOID TuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
{
PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer;
- ULONG Idx;
+ ULONG Idx;
// Shade the bottom of the area
if (Bottom < (UiScreenHeight - 1))
VOID TuiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr)
{
PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer;
- ULONG i, j;
+ ULONG i, j;
// Draw the text
for (i=X, j=0; Text[j] && i<UiScreenWidth; i++,j++)
VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr)
{
- SIZE_T TextLength;
- ULONG BoxWidth;
- ULONG BoxHeight;
- ULONG LineBreakCount;
- SIZE_T Index;
- SIZE_T LastIndex;
- ULONG RealLeft;
- ULONG RealTop;
- ULONG X;
- ULONG Y;
+ SIZE_T TextLength;
+ ULONG BoxWidth;
+ ULONG BoxHeight;
+ ULONG LineBreakCount;
+ SIZE_T Index;
+ SIZE_T LastIndex;
+ ULONG RealLeft;
+ ULONG RealTop;
+ ULONG X;
+ ULONG Y;
CHAR Temp[2];
TextLength = strlen(TextString);
VOID TuiDrawStatusText(PCSTR StatusText)
{
- SIZE_T i;
+ SIZE_T i;
TuiDrawText(0, UiScreenHeight-1, " ", ATTR(UiStatusBarFgColor, UiStatusBarBgColor));
TuiDrawText(1, UiScreenHeight-1, StatusText, ATTR(UiStatusBarFgColor, UiStatusBarBgColor));
VOID TuiSaveScreen(PUCHAR Buffer)
{
PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer;
- ULONG i;
+ ULONG i;
for (i=0; i < (UiScreenWidth * UiScreenHeight * 2); i++)
{
VOID TuiRestoreScreen(PUCHAR Buffer)
{
PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer;
- ULONG i;
+ ULONG i;
for (i=0; i < (UiScreenWidth * UiScreenHeight * 2); i++)
{
}
-
VOID TuiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText)
{
- ULONG Left, Top, Right, Bottom;
- ULONG Width = 50; // Allow for 50 "bars"
- ULONG Height = 2;
+ ULONG Left, Top, Right, Bottom;
+ ULONG Width = 50; // Allow for 50 "bars"
+ ULONG Height = 2;
Left = (UiScreenWidth - Width - 4) / 2;
Right = Left + Width + 3;
VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText)
{
- ULONG i;
- ULONG ProgressBarWidth = (Right - Left) - 3;
+ ULONG i;
+ ULONG ProgressBarWidth = (Right - Left) - 3;
// First make sure the progress bar text fits
UiTruncateStringEllipsis(ProgressText, ProgressBarWidth - 4);