Alternate discord main menu image
This commit is contained in:
parent
4582c337ce
commit
0549dbf02d
@ -10,21 +10,14 @@
|
|||||||
|
|
||||||
namespace branding
|
namespace branding
|
||||||
{
|
{
|
||||||
|
float color[4] = {0.9f, 0.9f, 0.5f, 1.f};
|
||||||
|
|
||||||
void draw()
|
void draw()
|
||||||
{
|
{
|
||||||
const auto x = 15.f;
|
const auto font = game::R_RegisterFont("fonts/defaultBold.otf", 22);
|
||||||
const auto y = 15.f;
|
game::R_AddCmdDrawText("h2-mod", 0x7FFFFFFF, font, 15.f,
|
||||||
const auto scale = 1.0f;
|
15.f + static_cast<float>(font->pixelHeight),
|
||||||
float color[4] = { 0.9f, 0.9f, 0.5f, 1.f };
|
1.f, 1.f, 0.f, color, 0);
|
||||||
const auto* text = "h2-mod";
|
|
||||||
|
|
||||||
auto* font = game::R_RegisterFont("fonts/defaultBold.otf", 22);
|
|
||||||
|
|
||||||
if (!font) return;
|
|
||||||
|
|
||||||
game::R_AddCmdDrawText(text, 0x7FFFFFFF, font, static_cast<float>(x),
|
|
||||||
y + static_cast<float>(font->pixelHeight) * scale,
|
|
||||||
scale, scale, 0.0f, color, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class component final : public component_interface
|
class component final : public component_interface
|
||||||
|
@ -28,7 +28,8 @@ namespace discord
|
|||||||
|
|
||||||
discord_presence.startTimestamp = 0;
|
discord_presence.startTimestamp = 0;
|
||||||
|
|
||||||
discord_presence.largeImageKey = "h2";
|
const auto background_index = static_cast<int>(game::Sys_Milliseconds() / 300000) % 10;
|
||||||
|
discord_presence.largeImageKey = utils::string::va("bg_%i", background_index);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -120,6 +120,7 @@ namespace game
|
|||||||
|
|
||||||
WEAK symbol<void()> Sys_ShowConsole{0x633080};
|
WEAK symbol<void()> Sys_ShowConsole{0x633080};
|
||||||
WEAK symbol<bool()> Sys_IsDatabaseReady2{0x5A9FE0};
|
WEAK symbol<bool()> Sys_IsDatabaseReady2{0x5A9FE0};
|
||||||
|
WEAK symbol<int()> Sys_Milliseconds{0x650720};
|
||||||
|
|
||||||
WEAK symbol<const char*(const char* string)> UI_SafeTranslateString{0x5A2930};
|
WEAK symbol<const char*(const char* string)> UI_SafeTranslateString{0x5A2930};
|
||||||
WEAK symbol<int(int localClientNum, const char* sound)> UI_PlayLocalSoundAlias{0x606080};
|
WEAK symbol<int(int localClientNum, const char* sound)> UI_PlayLocalSoundAlias{0x606080};
|
||||||
|
Loading…
Reference in New Issue
Block a user