Merge pull request #17 from skkuull/main

console: matches changes
This commit is contained in:
quaK 2023-01-29 03:14:49 +02:00 committed by GitHub
commit 6ff37507d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -278,17 +278,8 @@ namespace game_console
if (matches.size() > 24)
{
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 + TAB to show more", matches.size()),
draw_hint_text(0, utils::string::va("%i matches (too many to show here. press shift+tilde to open full console, press tab to print all matches)", matches.size()),
dvars::con_inputDvarMatchColor->current.vector);
if (game::playerKeys[0].keys[game::keyNum_t::K_SHIFT].down && game::playerKeys[0].keys[game::keyNum_t::K_TAB].down)
{
console::info("]%s\n", con.buffer);
for (size_t i = 0; i < matches.size(); i++)
{
console::info("\t%s\n", matches[i].data());
}
}
}
else if (matches.size() == 1)
{
@ -721,6 +712,15 @@ namespace game_console
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.data());
}
}
}
}