win32-gui: Do not auto-assign non-alphabet accelerator characters to menu items. Picking up pile that contains gold forces accelerators to start with $ so the next one becomes %, ...

This commit is contained in:
Alex Kompel
2018-03-18 12:52:30 -07:00
committed by Alex Kompel
parent 5b03dccb19
commit 60454b4f92

View File

@@ -160,10 +160,11 @@ mswin_menu_window_select_menu(HWND hWnd, int how, MENU_ITEM_P **_selected,
ap = data->menu.gacc;
for (i = 0; i < data->menu.size; i++) {
if (data->menu.items[i].accelerator != 0) {
next_char = (char) (data->menu.items[i].accelerator + 1);
if (isalpha(data->menu.items[i].accelerator)) {
next_char = (char)(data->menu.items[i].accelerator + 1);
}
} else if (NHMENU_IS_SELECTABLE(data->menu.items[i])) {
if ((next_char >= 'a' && next_char <= 'z')
|| (next_char >= 'A' && next_char <= 'Z')) {
if (isalpha(next_char)) {
data->menu.items[i].accelerator = next_char;
} else {
if (next_char > 'z')