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

Function DoMenuScroll

sys/amiga/winamenu.c:229–1083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229int
230DoMenuScroll(int win, int blocking, int how, menu_item **retmip)
231{
232 amii_menu_item *amip;
233 struct Window *w;
234 struct NewWindow *nw;
235 struct PropInfo *pip;
236 struct amii_WinDesc *cw;
237 struct IntuiMessage *imsg;
238 struct Gadget *gd;
239 int wheight, xsize, ysize, aredone = 0;
240 int txwd, txh;
241 long mics, secs, class, code;
242 long oldmics = 0, oldsecs = 0;
243 int aidx, oidx, topidx, hidden;
244 int totalvis;
245 SHORT mx, my;
246 static char title[100];
247 int dosize = 1;
248 struct Screen *scrn = HackScreen;
249 int x1, x2, y1, y2;
250 long counting = FALSE, count = 0, reset_counting = FALSE;
251 char countString[32];
252
253 if (win == WIN_ERR || (cw = amii_wins[win]) == NULL)
254 panic(winpanicstr, win, "DoMenuScroll");
255
256 /* Initial guess at window sizing values */
257 txwd = txwidth;
258 if (WINVERS_AMIV) {
259 if (win == WIN_INVEN)
260 txh = max(txheight, pictdata.ysize + 3); /* interline space */
261 else
262 txh = txheight; /* interline space */
263 } else
264 txh = txheight; /* interline space */
265
266 /* Check to see if we should open the window, should need to for
267 * TEXT and MENU but not MESSAGE.
268 */
269
270 w = cw->win;
271 topidx = 0;
272
273 if (w == NULL) {
274#ifdef INTUI_NEW_LOOK
275 if (IntuitionBase->LibNode.lib_Version >= 37) {
276 PropScroll.Flags |= PROPNEWLOOK;
277 }
278#endif
279 nw = (void *) DupNewWindow((void *) (&new_wins[cw->type].newwin));
280 if (!alwaysinvent || win != WIN_INVEN) {
281 xsize = scrn->WBorLeft + scrn->WBorRight + MenuScroll.Width + 1
282 + (txwd * cw->maxcol);
283 if (WINVERS_AMIV) {
284 if (win == WIN_INVEN)
285 xsize += pictdata.xsize + 4;
286 }

Callers 2

amii_display_nhwindowFunction · 0.85
amii_select_menuFunction · 0.85

Calls 15

DupNewWindowFunction · 0.85
OpenShWindowFunction · 0.85
CountLinesFunction · 0.85
DisplayDataFunction · 0.85
SetPropInfoFunction · 0.85
ConvertKeyFunction · 0.85
amii_setfillpensFunction · 0.85
map_menu_cmdFunction · 0.85
amii_getlinFunction · 0.85
strstriFunction · 0.85
isdigitFunction · 0.85
find_menu_itemFunction · 0.85

Tested by

no test coverage detected