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

Function ListCoordinateToItem

outdated/sys/mac/macwin.c:1500–1515  ·  view source on GitHub ↗

* Find menu item in list given a line number on the window */

Source from the content-addressed store, hash-verified

1498 * Find menu item in list given a line number on the window
1499 */
1500static short
1501ListCoordinateToItem(NhWindow *aWin, short Row)
1502{
1503 int i, item = -1;
1504 MacMHMenuItem *mi;
1505
1506 HLock((char **) aWin->menuInfo);
1507 for (i = 0, mi = *aWin->menuInfo; i < aWin->miLen; i++, mi++) {
1508 if (mi->line == Row + aWin->scrollPos) {
1509 item = i;
1510 break;
1511 }
1512 }
1513 HUnlock((char **) aWin->menuInfo);
1514 return item;
1515}
1516
1517static pascal void
1518MoveScrollBar(ControlHandle theBar, short part)

Callers 1

MenwClickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected