MCPcopy Create free account
hub / github.com/NetHack/NetHack / SelectMenuItem

Function SelectMenuItem

outdated/sys/wince/mhmenu.c:1417–1436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1415}
1416
1417void
1418SelectMenuItem(HWND hwndList, PNHMenuWindow data, int item, int count)
1419{
1420 int i;
1421
1422 if (item < 0 || item >= data->menu.size)
1423 return;
1424
1425 if (data->how == PICK_ONE && count != 0) {
1426 for (i = 0; i < data->menu.size; i++)
1427 if (item != i && data->menu.items[i].count != 0) {
1428 data->menu.items[i].count = 0;
1429 ListView_RedrawItems(hwndList, i, i);
1430 };
1431 }
1432
1433 data->menu.items[item].count = count;
1434 ListView_RedrawItems(hwndList, item, item);
1435 reset_menu_count(hwndList, data);
1436}
1437
1438void
1439reset_menu_count(HWND hwndList, PNHMenuWindow data)

Callers 2

MenuWndProcFunction · 0.70
onListCharFunction · 0.70

Calls 1

reset_menu_countFunction · 0.70

Tested by

no test coverage detected