mirror of
https://github.com/reactos/reactos.git
synced 2024-11-30 23:13:31 +08:00
[FREELDR] Add variable for default text color
On PC/AT-compatible machines it's Gray, and on NEC PC-98 series it's White.
This commit is contained in:
parent
db1b04340f
commit
8a4273b6ee
@ -277,7 +277,7 @@ CreateCommonFreeLdrSections(
|
||||
|
||||
/* MenuTextColor=White */
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
L"MenuTextColor", L"Gray");
|
||||
L"MenuTextColor", L"Default");
|
||||
|
||||
/* MenuColor=Blue */
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
@ -285,15 +285,15 @@ CreateCommonFreeLdrSections(
|
||||
|
||||
/* TextColor=Yellow */
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
L"TextColor", L"Gray");
|
||||
L"TextColor", L"Default");
|
||||
|
||||
/* SelectedTextColor=Black */
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
L"SelectedTextColor", L"Black");
|
||||
|
||||
/* SelectedColor=Gray */
|
||||
/* SelectedColor=Default */
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
L"SelectedColor", L"Gray");
|
||||
L"SelectedColor", L"Default");
|
||||
|
||||
/* ShowTime=Yes */
|
||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||
|
@ -13,11 +13,11 @@ TitleBoxTextColor=White
|
||||
TitleBoxColor=Red
|
||||
MessageBoxTextColor=White
|
||||
MessageBoxColor=Blue
|
||||
MenuTextColor=Gray
|
||||
MenuTextColor=Default
|
||||
MenuColor=Black
|
||||
TextColor=Gray
|
||||
TextColor=Default
|
||||
SelectedTextColor=Black
|
||||
SelectedColor=Gray
|
||||
SelectedColor=Default
|
||||
ShowTime=No
|
||||
MenuBox=No
|
||||
CenterMenu=No
|
||||
|
@ -13,11 +13,11 @@ TitleBoxTextColor=White
|
||||
TitleBoxColor=Red
|
||||
MessageBoxTextColor=White
|
||||
MessageBoxColor=Blue
|
||||
MenuTextColor=Gray
|
||||
MenuTextColor=Default
|
||||
MenuColor=Black
|
||||
TextColor=Gray
|
||||
TextColor=Default
|
||||
SelectedTextColor=Black
|
||||
SelectedColor=Gray
|
||||
SelectedColor=Default
|
||||
ShowTime=No
|
||||
MenuBox=No
|
||||
CenterMenu=No
|
||||
|
@ -13,11 +13,11 @@ TitleBoxTextColor=White
|
||||
TitleBoxColor=Red
|
||||
MessageBoxTextColor=White
|
||||
MessageBoxColor=Blue
|
||||
MenuTextColor=Gray
|
||||
MenuTextColor=Default
|
||||
MenuColor=Black
|
||||
TextColor=Gray
|
||||
TextColor=Default
|
||||
SelectedTextColor=Black
|
||||
SelectedColor=Gray
|
||||
SelectedColor=Default
|
||||
ShowTime=No
|
||||
MenuBox=No
|
||||
CenterMenu=No
|
||||
|
@ -13,11 +13,11 @@ TitleBoxTextColor=White
|
||||
TitleBoxColor=Red
|
||||
MessageBoxTextColor=White
|
||||
MessageBoxColor=Blue
|
||||
MenuTextColor=Gray
|
||||
MenuTextColor=Default
|
||||
MenuColor=Black
|
||||
TextColor=Gray
|
||||
TextColor=Default
|
||||
SelectedTextColor=Black
|
||||
SelectedColor=Gray
|
||||
SelectedColor=Default
|
||||
ShowTime=No
|
||||
MenuBox=No
|
||||
CenterMenu=No
|
||||
|
@ -50,7 +50,10 @@
|
||||
;
|
||||
; Text colors can be any one of the background colors and any of the following:
|
||||
; DarkGray, LightBlue, LightGreen, LightCyan, LightRed, LightMagenta,
|
||||
; Yellow, White.
|
||||
; Yellow, White, Default.
|
||||
;
|
||||
; Default color is the one that is being used by BIOS firmware by default.
|
||||
; On PC/AT-compatible machines it's Gray, and on NEC PC-98 series it's White.
|
||||
|
||||
; [OS-General] Section Commands:
|
||||
;
|
||||
|
@ -108,6 +108,8 @@ typedef struct
|
||||
} SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
|
||||
#include <poppack.h>
|
||||
|
||||
UCHAR MachDefaultTextColor = COLOR_GRAY;
|
||||
|
||||
static USHORT BiosVideoMode; /* Current video mode as known by BIOS */
|
||||
static ULONG ScreenWidth = 80; /* Screen Width in characters */
|
||||
static ULONG ScreenHeight = 25; /* Screen Height in characters */
|
||||
|
@ -35,6 +35,8 @@ static BOOLEAN UseCGFont = TRUE;
|
||||
* This option is possible only with BIOS fonts enabled. */
|
||||
static BOOLEAN CGAccelDraw = TRUE;
|
||||
|
||||
UCHAR MachDefaultTextColor = COLOR_WHITE;
|
||||
|
||||
ULONG VramText;
|
||||
static ULONG VramPlaneB;
|
||||
static ULONG VramPlaneG;
|
||||
|
@ -33,6 +33,8 @@ static ULONG BytesPerPixel;
|
||||
static ULONG Delta;
|
||||
extern multiboot_info_t * MultibootInfoPtr;
|
||||
|
||||
UCHAR MachDefaultTextColor = COLOR_GRAY;
|
||||
|
||||
#define CHAR_WIDTH 8
|
||||
#define CHAR_HEIGHT 16
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#define TAG_TAG_TUI_PALETTE 'PiuT'
|
||||
|
||||
PVOID TextVideoBuffer = NULL;
|
||||
extern UCHAR MachDefaultTextColor;
|
||||
|
||||
/*
|
||||
* TuiPrintf()
|
||||
@ -724,6 +725,9 @@ UCHAR TuiTextToColor(PCSTR ColorText)
|
||||
};
|
||||
ULONG i;
|
||||
|
||||
if (_stricmp(ColorText, "Default") == 0)
|
||||
return MachDefaultTextColor;
|
||||
|
||||
for (i = 0; i < sizeof(Colors)/sizeof(Colors[0]); ++i)
|
||||
{
|
||||
if (_stricmp(ColorText, Colors[i].ColorName) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user