home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d8xx
/
d886
/
goalkeeper.lha
/
GoalKeeper
/
Sources
/
ShowText.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-16
|
696b
|
36 lines
#include <intuition/intuition.h>
extern struct IntuitionBase *IntuitionBase;
extern struct TextAttr Style;
struct IntuiText Body =
{
0, 1, JAM2, 10, 10, &Style,
NULL, NULL
};
struct IntuiText 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);
}