mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
Implement secondary keybindings
This commit is contained in:
parent
4f42b4308c
commit
f767a7a529
7 changed files with 51 additions and 25 deletions
|
@ -212,11 +212,11 @@ static KeyPress id_to_keypress(touch_gui_button_id id)
|
|||
auto setting_name = id_to_setting(id);
|
||||
|
||||
assert(!setting_name.empty());
|
||||
auto kp = getKeySetting(setting_name);
|
||||
if (!kp)
|
||||
const auto &keylist = getKeySetting(setting_name);
|
||||
if (keylist.empty())
|
||||
warningstream << "TouchControls: Unbound or invalid key for "
|
||||
<< setting_name << ", hiding button." << std::endl;
|
||||
return kp;
|
||||
return keylist[0];
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue