home *** CD-ROM | disk | FTP | other *** search
-
- /* ST.c Simple message routine for all OS releases */
-
- #include <intuition/intuition.h>
-
- extern struct IntuitionBase *IntuitionBase;
- extern struct TextAttr Style;
-
- struct IntuiText
- Body = { 0, 1, JAM2, 10, 10, &Style, NULL, NULL },
- NegText = { 0, 1, JAM2, 5, 3, &Style, NULL , NULL };
-
-
- void ShowText(Window, str1, str2)
- struct Window *Window;
- UBYTE str1[], str2[];
- {
- ULONG Width1, Width2, Height;
-
- Body.IText = str1;
- if (str2) NegText.IText = str2;
- else NegText.IText = (UBYTE *)" OK ";
- Width1 = IntuiTextLength(&Body) + 60;
- Width2 = IntuiTextLength(&NegText) + 60;
- Height = 60;
- if (Width2 > Width1) Width1 = Width2;
- AutoRequest(Window, &Body, NULL, &NegText, 0L, 0L, Width1, Height);
- }
-