home *** CD-ROM | disk | FTP | other *** search
- /* AskUser.h © 1990 Arnie Cachelin CLI "ASK" using System Request */
- /* 24 Sep 1991 At 22:20:28 */
-
- struct TextAttr Topaz80 = {"topaz.font", 8, (LONG)NULL, (LONG)NULL};
- #ifndef YES_ANSWER
- #define YES_ANSWER " CONTINUE "
- #endif
- #ifndef NO_ANSWER
- #define NO_ANSWER " CANCEL "
- #endif
- UBYTE MsgBuffer[255] = "\000";
- struct IntuiText MsgText =
- {2, 1, JAM1, 20, 15, &Topaz80, &MsgBuffer[0], NULL};
-
- struct IntuiText yestext =
- {AUTOFRONTPEN, AUTOBACKPEN, AUTODRAWMODE, AUTOLEFTEDGE,
- AUTOTOPEDGE, &Topaz80, YES_ANSWER, NULL};
-
- struct IntuiText notext =
- {AUTOFRONTPEN, AUTOBACKPEN, AUTODRAWMODE, AUTOLEFTEDGE,
- AUTOTOPEDGE, &Topaz80, NO_ANSWER, NULL};
-
- BOOL AskUser (struct Window * win, UBYTE * msg)
- {
- struct IntuiText *asktext;
- SHORT arwidth, arheight = 60, arwadj = 60;
-
- sprintf (MsgBuffer, "%s\000", msg);
- asktext = &MsgText;
- arwidth = IntuiTextLength (asktext) + arwadj;
- return ((BOOL) AutoRequest (win, asktext, &yestext, ¬ext,
- 0, 0, arwidth, arheight));
- }