Revert "Make console, ... stay on top of ui elements"
This reverts commit fb90cc22dc3e7c6242985b3e29c7520e2c53afe1.
This commit is contained in:
parent
b66bee5f82
commit
65cfeeb8c8
@ -10,18 +10,6 @@
|
|||||||
|
|
||||||
namespace branding
|
namespace branding
|
||||||
{
|
{
|
||||||
namespace
|
|
||||||
{
|
|
||||||
void draw_brand()
|
|
||||||
{
|
|
||||||
const auto font = game::R_RegisterFont("fonts/defaultBold.otf", 22);
|
|
||||||
float color[4] = {0.9f, 0.9f, 0.5f, 1.f};
|
|
||||||
|
|
||||||
game::R_AddCmdDrawText("h2-mod", 0x7FFFFFFF, font, 15.f, 15.f + static_cast<float>(font->pixelHeight),
|
|
||||||
1.f, 1.f, 0.0f, color, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class component final : public component_interface
|
class component final : public component_interface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -29,12 +17,21 @@ namespace branding
|
|||||||
{
|
{
|
||||||
localized_strings::override("MENU_SP_CAMPAIGN", "H2-Mod");
|
localized_strings::override("MENU_SP_CAMPAIGN", "H2-Mod");
|
||||||
|
|
||||||
scheduler::once([]()
|
scheduler::loop([]()
|
||||||
{
|
{
|
||||||
scheduler::loop([]()
|
const auto x = 15.f;
|
||||||
{
|
const auto y = 15.f;
|
||||||
draw_brand();
|
const auto scale = 1.0f;
|
||||||
}, scheduler::pipeline::renderer);
|
float color[4] = {0.9f, 0.9f, 0.5f, 1.f};
|
||||||
|
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);
|
||||||
}, scheduler::pipeline::renderer);
|
}, scheduler::pipeline::renderer);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -262,11 +262,6 @@ namespace fps
|
|||||||
public:
|
public:
|
||||||
void post_unpack() override
|
void post_unpack() override
|
||||||
{
|
{
|
||||||
scheduler::once([]()
|
|
||||||
{
|
|
||||||
scheduler::loop(draw, scheduler::pipeline::renderer);
|
|
||||||
}, scheduler::pipeline::renderer);
|
|
||||||
|
|
||||||
cg_drawSpeed = dvars::register_int("cg_drawSpeed", 0, 0, 2, game::DVAR_FLAG_SAVED);
|
cg_drawSpeed = dvars::register_int("cg_drawSpeed", 0, 0, 2, game::DVAR_FLAG_SAVED);
|
||||||
cg_drawFps = dvars::register_int("cg_drawFPS", 0, 0, 4, game::DVAR_FLAG_SAVED, false);
|
cg_drawFps = dvars::register_int("cg_drawFPS", 0, 0, 4, game::DVAR_FLAG_SAVED, false);
|
||||||
|
|
||||||
@ -282,6 +277,7 @@ namespace fps
|
|||||||
cg_speedGraphWidth = dvars::register_int("cg_speedGraphWidth", 200, 0, 1000, game::DVAR_FLAG_SAVED);
|
cg_speedGraphWidth = dvars::register_int("cg_speedGraphWidth", 200, 0, 1000, game::DVAR_FLAG_SAVED);
|
||||||
cg_speedGraphHeight = dvars::register_int("cg_speedGraphHeight", 80, 0, 1000, game::DVAR_FLAG_SAVED);
|
cg_speedGraphHeight = dvars::register_int("cg_speedGraphHeight", 80, 0, 1000, game::DVAR_FLAG_SAVED);
|
||||||
|
|
||||||
|
scheduler::loop(draw, scheduler::pipeline::renderer);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -683,11 +683,7 @@ namespace game_console
|
|||||||
public:
|
public:
|
||||||
void post_unpack() override
|
void post_unpack() override
|
||||||
{
|
{
|
||||||
scheduler::once([]()
|
scheduler::loop(draw_console, scheduler::pipeline::renderer);
|
||||||
{
|
|
||||||
scheduler::loop(draw_console, scheduler::pipeline::renderer);
|
|
||||||
}, scheduler::pipeline::renderer);
|
|
||||||
|
|
||||||
|
|
||||||
con.cursor = 0;
|
con.cursor = 0;
|
||||||
con.visible_line_count = 0;
|
con.visible_line_count = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user