MULTI-LINE HELPTEXT
Useful for Displaying Info In Games + Editors...
` Multi-Line HelpText
`
` By Michael Mihalyfi
` Mihalyfi@Hotmail.co.uk
set window off : sync on : sync rate 0
Set Display Mode 1024,768,32
Dim HelpText(0) As String
Do : Cls
EmptyHelpText()
AddHelpText("Mouse X = "+Str$(MouseX()))
AddHelpText("Mouse Y = "+Str$(MouseY()))
AddHelpText("Mouse Z = "+Str$(MouseZ()))
UseHelpText(MouseX()+20,MouseY()+20)
Sync : Loop
Function AddHelpText(String$)
Add To Stack HelpText()
HelpText(Array Count(HelpText())-1) = String$
endfunction
Function UseHelpText(x,y)
b = 2 : ` Text Boarder Space
bb = 4 : ` Colored Border
` Get The xSize
For n = 0 to Array Count(HelpText())-1
If Text Width(HelpText(n)) > xSize Then xSize = Text Width(HelpText(n))
Next n
` Draw The Boarder
Ink RGB(255,0,0),0
Box x-bb,y-bb,x+xSize+bb,y+(n*Text Height("A"))+bb
` Draw The Background
Ink RGB(255,255,255),0
Box x-b,y-b,x+xSize+b,y+(n*Text Height("A"))+b
` Write The Text
Ink RGB(1,1,1),0
For n = 0 to Array Count(HelpText())-1
Text x,y+(n*Text Height("A")),HelpText(n)
Next n
EndFunction
Function EmptyHelpText()
Dim HelpText(0) As String
EndFunction