cleaner branding
This commit is contained in:
parent
bd3af45378
commit
f91a0458ee
@ -15,11 +15,9 @@ namespace branding
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
utils::hook::detour ui_get_formatted_build_number_hook;
|
utils::hook::detour ui_get_formatted_build_number_hook;
|
||||||
float color[4] = { 0.666f, 0.666f, 0.666f, 0.666f };
|
|
||||||
|
|
||||||
const char* ui_get_formatted_build_number_stub()
|
const char* ui_get_formatted_build_number_stub()
|
||||||
{
|
{
|
||||||
const auto* const build_num = ui_get_formatted_build_number_hook.invoke<const char*>();
|
const auto build_num = ui_get_formatted_build_number_hook.invoke<const char*>();
|
||||||
return utils::string::va("%s (%s)", VERSION, build_num);
|
return utils::string::va("%s (%s)", VERSION, build_num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,11 +47,12 @@ namespace branding
|
|||||||
{
|
{
|
||||||
if (dvars::branding && dvars::branding->current.enabled)
|
if (dvars::branding && dvars::branding->current.enabled)
|
||||||
{
|
{
|
||||||
const auto font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 20);
|
const auto font = game::R_RegisterFont("fonts/fira_mono_bold.ttf", 15);
|
||||||
if (font)
|
if (font)
|
||||||
{
|
{
|
||||||
game::R_AddCmdDrawText("IW7-Mod: " VERSION, 0x7FFFFFFF, font, 10.f,
|
static float text_color[4] = { 0.860f, 0.459f, 0.925f, 0.400f };
|
||||||
5.f + static_cast<float>(font->pixelHeight), 1.f, 1.f, 0.0f, color, 0);
|
game::R_AddCmdDrawText("iw7-mod: " VERSION, 0x7FFFFFFF, font, 10.f,
|
||||||
|
5.f + static_cast<float>(font->pixelHeight), 1.f, 1.f, 0.0f, text_color, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, scheduler::pipeline::renderer);
|
}, scheduler::pipeline::renderer);
|
||||||
|
Loading…
Reference in New Issue
Block a user