Here is a newer version of the program taking Grogs advice into account.
`balloon maker version 2'
`allows you to enter text to demonstrate the balloon'
`format is text for line 1,2,3,4,textsize,font,image number
`you must enter a space for skipped lines or the balloon will missize.
` default text is Arial
dim a$(4)
cls
for a = 1 to 4
print "Enter Text for balloon line ";a;":";
input B$
A$(A)=B$
next a
balloon(a$(1),a$(2),a$(3),a$(4),12,"",10)
sprite 1,100,100,10
sync
suspend for key
end
function balloon(a$,b$,c$,d$,textsize,font$,imnumber)
set text size textsize
if font$=""
set text font "Arial"
else
set text font font$
endif
height=text height(a$)
x=text width(a$)+10
if text width(b$)+10>x then x=text width(b$)+10
if text width(c$)+10>x then x=text width(c$)+10
if text width(d$)+10>x then x=text width(d$)+10
bsize=height+10
if b$<>"" then bsize=bsize+height+2
if c$<>"" then bsize=bsize+height+2
if d$<>"" then bsize=bsize+height+2
ink rgb(255,255,255),0
create bitmap 1,x+50,bsize+100
box 0,0,x+1,bsize
dot (x/2),bsize+1:dot (x/2)+1,bsize+1:dot (x/2)+2,bsize+1
dot (x/2)-1,bsize+2:dot (x/2),bsize+2
dot (x/2)-2,bsize+3:dot (x/2)-1,bsize+3
dot (x/2)-3,bsize+4
ink 0,0
center text (x/2),5,a$
if b$<>"" then center text (x/2),7+height,b$
if c$<>"" then center text (x/2),9+height*2,c$
if d$<>"" then center text (x/2),11+height*3,d$
dot 0,0:dot 0,bsize:dot x-1,0:dot x-1,bsize
dot 0,1:dot 0,bsize-1:dot x-1,1:dot x-1,bsize-1
dot 1,0:dot 1,bsize:dot x-2,0:dot x-2,bsize
get image imnumber,0,0,x,bsize+5
delete bitmap 1
endfunction