Fix console tab

This commit is contained in:
fed 2023-01-27 00:38:00 +01:00
parent 57859e327b
commit 2da040d197

View File

@ -269,17 +269,13 @@ namespace game_console
if (matches.size() > 24) if (matches.size() > 24)
{ {
draw_hint_box(1, dvars::con_inputHintBoxColor->current.vector); draw_hint_box(1, dvars::con_inputHintBoxColor->current.vector);
draw_hint_text(0, utils::string::va("%i matches (too many to show here, press shift+tilde to open full console)", matches.size()), draw_hint_text(0,
dvars::con_inputDvarMatchColor->current.vector); utils::string::va(
"%i matches (too many to show here, "
if (GetAsyncKeyState(VK_TAB) & 1) "press shift+tilde to open full console, "
{ "press tab to print them all)",
console::info("]%s\n", con.buffer); matches.size()
for (size_t i = 0; i < matches.size(); i++) ), dvars::con_inputDvarMatchColor->current.vector);
{
console::info("\t%s\n", matches[i].name.data());
}
}
} }
else if (matches.size() == 1) else if (matches.size() == 1)
{ {
@ -717,6 +713,15 @@ namespace game_console
clear(); clear();
} }
if (key == game::keyNum_t::K_TAB && std::strlen(con.buffer) >= 2 && matches.size() > 24)
{
console::info("]%s\n", con.buffer);
for (const auto& match : matches)
{
console::info("\t%s\n", match.name.data());
}
}
} }
} }