mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00: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 */
|
/* MenuTextColor=White */
|
||||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||||
L"MenuTextColor", L"Gray");
|
L"MenuTextColor", L"Default");
|
||||||
|
|
||||||
/* MenuColor=Blue */
|
/* MenuColor=Blue */
|
||||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||||
|
@ -285,15 +285,15 @@ CreateCommonFreeLdrSections(
|
||||||
|
|
||||||
/* TextColor=Yellow */
|
/* TextColor=Yellow */
|
||||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||||
L"TextColor", L"Gray");
|
L"TextColor", L"Default");
|
||||||
|
|
||||||
/* SelectedTextColor=Black */
|
/* SelectedTextColor=Black */
|
||||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||||
L"SelectedTextColor", L"Black");
|
L"SelectedTextColor", L"Black");
|
||||||
|
|
||||||
/* SelectedColor=Gray */
|
/* SelectedColor=Default */
|
||||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||||
L"SelectedColor", L"Gray");
|
L"SelectedColor", L"Default");
|
||||||
|
|
||||||
/* ShowTime=Yes */
|
/* ShowTime=Yes */
|
||||||
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
IniCacheInsertKey(IniSection, NULL, INSERT_LAST,
|
||||||
|
|
|
@ -13,11 +13,11 @@ TitleBoxTextColor=White
|
||||||
TitleBoxColor=Red
|
TitleBoxColor=Red
|
||||||
MessageBoxTextColor=White
|
MessageBoxTextColor=White
|
||||||
MessageBoxColor=Blue
|
MessageBoxColor=Blue
|
||||||
MenuTextColor=Gray
|
MenuTextColor=Default
|
||||||
MenuColor=Black
|
MenuColor=Black
|
||||||
TextColor=Gray
|
TextColor=Default
|
||||||
SelectedTextColor=Black
|
SelectedTextColor=Black
|
||||||
SelectedColor=Gray
|
SelectedColor=Default
|
||||||
ShowTime=No
|
ShowTime=No
|
||||||
MenuBox=No
|
MenuBox=No
|
||||||
CenterMenu=No
|
CenterMenu=No
|
||||||
|
|
|
@ -13,11 +13,11 @@ TitleBoxTextColor=White
|
||||||
TitleBoxColor=Red
|
TitleBoxColor=Red
|
||||||
MessageBoxTextColor=White
|
MessageBoxTextColor=White
|
||||||
MessageBoxColor=Blue
|
MessageBoxColor=Blue
|
||||||
MenuTextColor=Gray
|
MenuTextColor=Default
|
||||||
MenuColor=Black
|
MenuColor=Black
|
||||||
TextColor=Gray
|
TextColor=Default
|
||||||
SelectedTextColor=Black
|
SelectedTextColor=Black
|
||||||
SelectedColor=Gray
|
SelectedColor=Default
|
||||||
ShowTime=No
|
ShowTime=No
|
||||||
MenuBox=No
|
MenuBox=No
|
||||||
CenterMenu=No
|
CenterMenu=No
|
||||||
|
|
|
@ -13,11 +13,11 @@ TitleBoxTextColor=White
|
||||||
TitleBoxColor=Red
|
TitleBoxColor=Red
|
||||||
MessageBoxTextColor=White
|
MessageBoxTextColor=White
|
||||||
MessageBoxColor=Blue
|
MessageBoxColor=Blue
|
||||||
MenuTextColor=Gray
|
MenuTextColor=Default
|
||||||
MenuColor=Black
|
MenuColor=Black
|
||||||
TextColor=Gray
|
TextColor=Default
|
||||||
SelectedTextColor=Black
|
SelectedTextColor=Black
|
||||||
SelectedColor=Gray
|
SelectedColor=Default
|
||||||
ShowTime=No
|
ShowTime=No
|
||||||
MenuBox=No
|
MenuBox=No
|
||||||
CenterMenu=No
|
CenterMenu=No
|
||||||
|
|
|
@ -13,11 +13,11 @@ TitleBoxTextColor=White
|
||||||
TitleBoxColor=Red
|
TitleBoxColor=Red
|
||||||
MessageBoxTextColor=White
|
MessageBoxTextColor=White
|
||||||
MessageBoxColor=Blue
|
MessageBoxColor=Blue
|
||||||
MenuTextColor=Gray
|
MenuTextColor=Default
|
||||||
MenuColor=Black
|
MenuColor=Black
|
||||||
TextColor=Gray
|
TextColor=Default
|
||||||
SelectedTextColor=Black
|
SelectedTextColor=Black
|
||||||
SelectedColor=Gray
|
SelectedColor=Default
|
||||||
ShowTime=No
|
ShowTime=No
|
||||||
MenuBox=No
|
MenuBox=No
|
||||||
CenterMenu=No
|
CenterMenu=No
|
||||||
|
|
|
@ -50,7 +50,10 @@
|
||||||
;
|
;
|
||||||
; Text colors can be any one of the background colors and any of the following:
|
; Text colors can be any one of the background colors and any of the following:
|
||||||
; DarkGray, LightBlue, LightGreen, LightCyan, LightRed, LightMagenta,
|
; 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:
|
; [OS-General] Section Commands:
|
||||||
;
|
;
|
||||||
|
|
|
@ -108,6 +108,8 @@ typedef struct
|
||||||
} SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
|
} SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
|
||||||
#include <poppack.h>
|
#include <poppack.h>
|
||||||
|
|
||||||
|
UCHAR MachDefaultTextColor = COLOR_GRAY;
|
||||||
|
|
||||||
static USHORT BiosVideoMode; /* Current video mode as known by BIOS */
|
static USHORT BiosVideoMode; /* Current video mode as known by BIOS */
|
||||||
static ULONG ScreenWidth = 80; /* Screen Width in characters */
|
static ULONG ScreenWidth = 80; /* Screen Width in characters */
|
||||||
static ULONG ScreenHeight = 25; /* Screen Height 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. */
|
* This option is possible only with BIOS fonts enabled. */
|
||||||
static BOOLEAN CGAccelDraw = TRUE;
|
static BOOLEAN CGAccelDraw = TRUE;
|
||||||
|
|
||||||
|
UCHAR MachDefaultTextColor = COLOR_WHITE;
|
||||||
|
|
||||||
ULONG VramText;
|
ULONG VramText;
|
||||||
static ULONG VramPlaneB;
|
static ULONG VramPlaneB;
|
||||||
static ULONG VramPlaneG;
|
static ULONG VramPlaneG;
|
||||||
|
|
|
@ -33,6 +33,8 @@ static ULONG BytesPerPixel;
|
||||||
static ULONG Delta;
|
static ULONG Delta;
|
||||||
extern multiboot_info_t * MultibootInfoPtr;
|
extern multiboot_info_t * MultibootInfoPtr;
|
||||||
|
|
||||||
|
UCHAR MachDefaultTextColor = COLOR_GRAY;
|
||||||
|
|
||||||
#define CHAR_WIDTH 8
|
#define CHAR_WIDTH 8
|
||||||
#define CHAR_HEIGHT 16
|
#define CHAR_HEIGHT 16
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#define TAG_TAG_TUI_PALETTE 'PiuT'
|
#define TAG_TAG_TUI_PALETTE 'PiuT'
|
||||||
|
|
||||||
PVOID TextVideoBuffer = NULL;
|
PVOID TextVideoBuffer = NULL;
|
||||||
|
extern UCHAR MachDefaultTextColor;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TuiPrintf()
|
* TuiPrintf()
|
||||||
|
@ -724,6 +725,9 @@ UCHAR TuiTextToColor(PCSTR ColorText)
|
||||||
};
|
};
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
|
if (_stricmp(ColorText, "Default") == 0)
|
||||||
|
return MachDefaultTextColor;
|
||||||
|
|
||||||
for (i = 0; i < sizeof(Colors)/sizeof(Colors[0]); ++i)
|
for (i = 0; i < sizeof(Colors)/sizeof(Colors[0]); ++i)
|
||||||
{
|
{
|
||||||
if (_stricmp(ColorText, Colors[i].ColorName) == 0)
|
if (_stricmp(ColorText, Colors[i].ColorName) == 0)
|
||||||
|
|
Loading…
Reference in a new issue