import GUI
var x, y, butNum, butupdown, button, buttonnum, buttonupdown, col2 : int
var px, py, absX, absY : int
var words : string
var temppic : int
col2 := 0
var canvas : int := GUI.CreateCanvas (90, 85, 510, 245)
var fontID : int
proc myMouse (var x, y, b : int)
var absX, absY : int
Mouse.Where (absX, absY,

x := absX - 90
y := absY - 85
end myMouse
proc text
var fontName, font, size, style : string
var boxID : int := GUI.CreateTextBox (20, 390, 150, 65)
var winID, font11 : int
font11 := Font.New ("serif:12")
Font.Draw ("Font Names ", 20, 464, font11, 11)
Font.StartName
loop
fontName := Font.GetName
exit when fontName = ""
GUI.AddLine (boxID, fontName)
end loop
winID := Window.Open ("position:center;center,graphics:200;200")
put fontName
put "Type in name of font you wish to use: " ..
get font
put "Size:" ..
get size
put "Style (bold or italic) : " ..
get style
Window.Close (winID)
Mouse.ButtonWait ("down", x, y, butNum, butupdown)
temppic := Pic.New (90, 85, 600, 330)
myMouse (px, py, button)
loop
setscreen ("nocursor")
var ch : string (1)
if hasch then
getch (ch)
exit when ch = "q"
end if
var textbtn : int := GUI.CreateButtonFull (20, 130, 0, "Text", text, 0, '^T', true)
GUI.Disable (textbtn)
fontID := Font.New ("font : size")
GUI.PicDraw (canvas, temppic, 0, 0, picCopy)
loop
Mouse.Where (x, y, button)
setscreen ("cursor")
get words : *
GUI.FontDraw (canvas, words, x - 90, y - 85, fontID, 7)
end loop
end loop
end text
text
Archived topic from Iceteks, old topic ID:1908, old post ID:15611