Use text styles.
This commit is contained in:
parent
497a4ecefb
commit
17f5c5e436
@ -56,14 +56,15 @@ namespace Components
|
|||||||
Game::Font* font = Game::R_RegisterFont("fonts/normalFont");
|
Game::Font* font = Game::R_RegisterFont("fonts/normalFont");
|
||||||
float color[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
float color[4] = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||||
|
|
||||||
|
// Change the color when attaching a debugger
|
||||||
if (IsDebuggerPresent())
|
if (IsDebuggerPresent())
|
||||||
{
|
{
|
||||||
color[0] = 1.00f;
|
color[0] = 0.6588f;
|
||||||
color[1] = 0.53f;
|
color[1] = 1.0000f;
|
||||||
color[2] = 0.23f;
|
color[2] = 0.0000f;
|
||||||
}
|
}
|
||||||
|
|
||||||
Game::R_AddCmdDrawText("DEBUG-BUILD", 0x7FFFFFFF, font, 15.0f, 10.0f + Game::R_TextHeight(font), 1.0f, 1.0f, 0.0f, color, 0);
|
Game::R_AddCmdDrawText("DEBUG-BUILD", 0x7FFFFFFF, font, 15.0f, 10.0f + Game::R_TextHeight(font), 1.0f, 1.0f, 0.0f, color, Game::ITEM_TEXTSTYLE_SHADOWED);
|
||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
Utils::Hook::Set(0x6D70AC, Exception::SetUnhandledExceptionFilterStub);
|
Utils::Hook::Set(0x6D70AC, Exception::SetUnhandledExceptionFilterStub);
|
||||||
|
@ -170,7 +170,7 @@ namespace Components
|
|||||||
|
|
||||||
Game::Font* font = Game::R_RegisterFont("fonts/consoleFont"); // Inlining that seems to skip xpos, no idea why xD
|
Game::Font* font = Game::R_RegisterFont("fonts/consoleFont"); // Inlining that seems to skip xpos, no idea why xD
|
||||||
float color[4] = { 1.0f, 1.0f, 1.0f, (Game::CL_IsCgameInitialized() ? 0.3f : 1.0f) };
|
float color[4] = { 1.0f, 1.0f, 1.0f, (Game::CL_IsCgameInitialized() ? 0.3f : 1.0f) };
|
||||||
Game::R_AddCmdDrawText(Utils::VA("Loading FastFile: %s", FastFiles::Current().data()), 0x7FFFFFFF, font, 5.0f, static_cast<float>(Renderer::Height() - 5), 1.0f, 1.0f, 0.0f, color, 0);
|
Game::R_AddCmdDrawText(Utils::VA("Loading FastFile: %s", FastFiles::Current().data()), 0x7FFFFFFF, font, 5.0f, static_cast<float>(Renderer::Height() - 5), 1.0f, 1.0f, 0.0f, color, Game::ITEM_TEXTSTYLE_NORMAL);
|
||||||
});
|
});
|
||||||
|
|
||||||
Command::Add("loadzone", [] (Command::Params params)
|
Command::Add("loadzone", [] (Command::Params params)
|
||||||
|
@ -365,6 +365,18 @@ namespace Game
|
|||||||
const char *s2;
|
const char *s2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Taken from menudefinition.h
|
||||||
|
enum itemTextStyle
|
||||||
|
{
|
||||||
|
ITEM_TEXTSTYLE_NORMAL = 0, // normal text
|
||||||
|
ITEM_TEXTSTYLE_SHADOWED = 3, // drop shadow ( need a color for this )
|
||||||
|
ITEM_TEXTSTYLE_SHADOWEDMORE = 6, // drop shadow ( need a color for this )
|
||||||
|
ITEM_TEXTSTYLE_BORDERED = 7, // border (stroke)
|
||||||
|
ITEM_TEXTSTYLE_BORDEREDMORE = 8, // more border :P
|
||||||
|
ITEM_TEXTSTYLE_MONOSPACE = 128,
|
||||||
|
ITEM_TEXTSTYLE_MONOSPACESHADOWED = 132,
|
||||||
|
};
|
||||||
|
|
||||||
#define ITEM_TYPE_TEXT 0 // simple text
|
#define ITEM_TYPE_TEXT 0 // simple text
|
||||||
#define ITEM_TYPE_BUTTON 1 // button, basically text with a border
|
#define ITEM_TYPE_BUTTON 1 // button, basically text with a border
|
||||||
#define ITEM_TYPE_RADIOBUTTON 2 // toggle button, may be grouped
|
#define ITEM_TYPE_RADIOBUTTON 2 // toggle button, may be grouped
|
||||||
|
Loading…
Reference in New Issue
Block a user