mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-21 13:28:05 +00:00
editInfix now also has sym argument
This commit is contained in:
@@ -4227,7 +4227,7 @@ EX void find_parameter() {
|
||||
|
||||
keyhandler = [] (int sym, int uni) {
|
||||
dialog::handleNavigation(sym, uni);
|
||||
if(dialog::editInfix(uni)) dialog::list_skip = 0;
|
||||
if(dialog::editInfix(sym, uni)) dialog::list_skip = 0;
|
||||
else if(doexiton(sym, uni)) popScreen();
|
||||
};
|
||||
}
|
||||
|
||||
10
dialogs.cpp
10
dialogs.cpp
@@ -1950,11 +1950,17 @@ EX namespace dialog {
|
||||
}
|
||||
}
|
||||
|
||||
EX bool editInfix(int uni) {
|
||||
EX bool editInfix(int sym, int uni) {
|
||||
if(uni >= 'A' && uni <= 'Z') infix += uni;
|
||||
else if(uni >= 'a' && uni <= 'z') infix += uni-32;
|
||||
else if(infix != "" && uni == 8) infix = infix.substr(0, isize(infix)-1);
|
||||
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 return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ EX void ge_land_selection() {
|
||||
keyhandler = [] (int sym, int uni) {
|
||||
dialog::handleNavigation(sym, uni);
|
||||
|
||||
if(dialog::editInfix(uni)) dialog::list_skip = 0;
|
||||
if(dialog::editInfix(sym, uni)) dialog::list_skip = 0;
|
||||
else if(doexiton(sym, uni)) popScreen();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1075,7 +1075,7 @@ EX void customize_land_list() {
|
||||
keyhandler = [] (int sym, int uni) {
|
||||
dialog::handleNavigation(sym, uni);
|
||||
|
||||
if(dialog::editInfix(uni)) dialog::list_skip = 0;
|
||||
if(dialog::editInfix(sym, uni)) dialog::list_skip = 0;
|
||||
else if(doexiton(sym, uni)) popScreen();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2037,7 +2037,7 @@ EX namespace mapeditor {
|
||||
|
||||
keyhandler = [] (int sym, int uni) {
|
||||
dialog::handleNavigation(sym, uni);
|
||||
if(dialog::editInfix(uni)) dialog::list_skip = 0;
|
||||
if(dialog::editInfix(sym, uni)) dialog::list_skip = 0;
|
||||
else if(doexiton(sym, uni)) popScreen();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ EX void showOverview() {
|
||||
"mousewheel to gain or lose treasures and orbs quickly (Ctrl = precise, Shift = reverse)."
|
||||
);
|
||||
else if(dialog::handlePageButtons(sym, uni, true, numpages)) ;
|
||||
else if(dialog::editInfix(uni)) dialog::list_skip = 0;
|
||||
else if(dialog::editInfix(sym, uni)) dialog::list_skip = 0;
|
||||
else if(doexiton(sym, uni)) popScreen();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ void showPickScores() {
|
||||
mouseovers = dialog::infix;
|
||||
keyhandler = [] (int sym, int uni) {
|
||||
dialog::handleNavigation(sym, uni);
|
||||
if(dialog::editInfix(uni)) dialog::list_skip = 0;
|
||||
if(dialog::editInfix(sym, uni)) dialog::list_skip = 0;
|
||||
else if(doexiton(sym, uni)) popScreen();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -976,7 +976,7 @@ EX namespace tactic {
|
||||
"Good luck, and have fun!"
|
||||
);
|
||||
else if(dialog::infix == "" && dialog::handlePageButtons(sym, uni, true, numpages)) ;
|
||||
else if(dialog::editInfix(uni)) dialog::list_skip = 0;
|
||||
else if(dialog::editInfix(sym, uni)) dialog::list_skip = 0;
|
||||
else if(doexiton(sym, uni)) popScreen();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user