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

Function mar_set_accelerators

outdated/win/gem/wingem1.c:1472–1494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1470}
1471
1472void
1473mar_set_accelerators()
1474{
1475 char ch = 'a';
1476 Gem_menu_item *curr;
1477
1478 for (curr = invent_list; curr; curr = curr->Gmi_next) {
1479 int extent[8];
1480 v_set_text(menu_font.id, menu_font.size, BLACK, 0, 0, NULL);
1481 vqt_extent(x_handle, curr->Gmi_str, extent);
1482 Max(&Inv_breite, extent[4] + Tile_width + menu_font.cw);
1483 if (ch && curr->Gmi_accelerator == 0 && curr->Gmi_identifier) {
1484 curr->Gmi_accelerator = ch;
1485 curr->Gmi_str[0] = ch;
1486 if (ch == 'z')
1487 ch = 'A';
1488 else if (ch == 'Z')
1489 ch = 0;
1490 else
1491 ch++;
1492 }
1493 }
1494}
1495
1496Gem_menu_item *
1497mar_hol_inv()

Callers 1

Gem_end_menuFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected