search: give text input priority over cursor keys

develop
lethosor 2015-06-30 16:45:45 -04:00
parent 8058472dd9
commit 87b1524aec
1 changed files with 6 additions and 0 deletions

@ -115,6 +115,12 @@ static string get_unit_description(df::unit *unit)
static bool cursor_key_pressed (std::set<df::interface_key> *input) static bool cursor_key_pressed (std::set<df::interface_key> *input)
{ {
// give text input (e.g. "2") priority over cursor keys
for (auto it = input->begin(); it != input->end(); ++it)
{
if (Screen::keyToChar(*it) != -1)
return false;
}
return return
input->count(df::interface_key::CURSOR_UP) || input->count(df::interface_key::CURSOR_UP) ||
input->count(df::interface_key::CURSOR_DOWN) || input->count(df::interface_key::CURSOR_DOWN) ||