home *** CD-ROM | disk | FTP | other *** search
- /*
- * Requesters for Amiga GnuChess, using Nico François ReqTools library.
- */
-
- #include <exec/types.h>
- #include <libraries/reqtools.h>
- #include <proto/reqtools.h>
-
- extern struct ReqToolsBase *ReqToolsBase;
-
- void DoPalette(struct Window *w)
- {
- static color = 1;
-
- if (ReqToolsBase)
- color = rtPaletteRequest("Chess colors", NULL,
- RT_Window, w,
- RTPA_Color, color,
- TAG_DONE);
- }
-
- BOOL DoFileRequest(struct Window *w, char *hail, char *name)
- {
- struct rtFileRequester *req;
- char filename[108];
- BOOL rc;
-
- if (ReqToolsBase)
- if (req = rtAllocRequest(RT_FILEREQ, NULL))
- {
- if (rc = rtFileRequest(req, filename, hail,
- RT_Window, w,
- RT_LockWindow, TRUE,
- TAG_DONE))
- {
- strcpy(name, req->Dir);
- AddPart(name, filename, 256);
- }
- else name[0] = '\0';
-
- rtFreeRequest(req);
- return TRUE;
- }
-
- return FALSE;
- }
-
-