mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-20 21:08:06 +00:00
fixes to keyboard in search-for-setting
This commit is contained in:
@@ -4203,7 +4203,6 @@ EX void find_parameter() {
|
||||
gamescreen();
|
||||
|
||||
dialog::init(XLAT("find a setting"));
|
||||
if(dialog::infix != "") mouseovers = dialog::infix;
|
||||
|
||||
dialog::start_list(900, 900, '1');
|
||||
|
||||
@@ -4221,13 +4220,15 @@ EX void find_parameter() {
|
||||
dialog::end_list();
|
||||
|
||||
dialog::addBreak(100);
|
||||
dialog::addInfo(XLAT("press letters to search"));
|
||||
add_edit(dialog::onscreen_keyboard);
|
||||
|
||||
if(dialog::onscreen_keyboard) dialog::setting_keyboard();
|
||||
|
||||
dialog::addSelItem(XLAT("matching items"), its(found), 0);
|
||||
dialog::display();
|
||||
|
||||
if(dialog::infix != "") mouseovers = dialog::infix;
|
||||
|
||||
keyhandler = [] (int sym, int uni) {
|
||||
dialog::handleNavigation(sym, uni);
|
||||
if(dialog::editInfix(sym, uni)) dialog::list_skip = 0;
|
||||
|
||||
15
dialogs.cpp
15
dialogs.cpp
@@ -1391,9 +1391,10 @@ EX namespace dialog {
|
||||
}
|
||||
|
||||
EX void setting_keyboard() {
|
||||
addKeyboardItem("qwertyuiop");
|
||||
addKeyboardItem("asdfghjkl");
|
||||
addKeyboardItem("zxcvbnm_\b");
|
||||
addKeyboardItem("1234567890");
|
||||
addKeyboardItem("QWERTYUIOP");
|
||||
addKeyboardItem("ASDFGHJKL");
|
||||
addKeyboardItem("ZXCVBNM_\b");
|
||||
}
|
||||
|
||||
EX bool onscreen_keyboard = ISMOBILE;
|
||||
@@ -1967,13 +1968,13 @@ EX namespace dialog {
|
||||
if(uni >= 'A' && uni <= 'Z') infix += uni;
|
||||
else if(uni >= 'a' && uni <= 'z') infix += uni-32;
|
||||
else if(infix != "" && (uni == 8 || is_joy_index(sym, deck::space) || is_joy_index(sym, deck::key_pageup))) infix = infix.substr(0, isize(infix)-1);
|
||||
else if(infix != "" && uni != 0) infix = "";
|
||||
else if(is_joy_index(sym, deck::show_keyboard)) {
|
||||
onscreen_keyboard = !onscreen_keyboard;
|
||||
}
|
||||
else if(uni == PSEUDOKEY_ONSCREEN_KEYBOARD) {
|
||||
infix += keyboard_what;
|
||||
}
|
||||
else if(is_joy_index(sym, deck::show_keyboard)) {
|
||||
onscreen_keyboard = !onscreen_keyboard;
|
||||
}
|
||||
else if(infix != "" && uni != 0) infix = "";
|
||||
else return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user