
-----------------------------------
Michael Hasson
Mon Jun 08, 2009 3:53 pm

Put statements.
-----------------------------------
What is it you are trying to achieve?
How do i place a put statement on top of a drawfill box?

-----------------------------------
wallc++
Mon Jun 08, 2009 3:59 pm

Re: Put statements.
-----------------------------------
do you mean like putting text above a box?

-----------------------------------
Michael Hasson
Mon Jun 08, 2009 4:00 pm

Re: Put statements.
-----------------------------------
I mean right on top of it.

-----------------------------------
BigBear
Mon Jun 08, 2009 4:23 pm

RE:Put statements.
-----------------------------------
look into locatexy

-----------------------------------
Tony
Mon Jun 08, 2009 4:27 pm

RE:Put statements.
-----------------------------------
put will draw a box of background colour behind itself. You might be looking for [tdoc]Font.Draw[/tdoc]

-----------------------------------
BigBear
Mon Jun 08, 2009 4:30 pm

RE:Put statements.
-----------------------------------
or colorback

-----------------------------------
Kharybdis
Mon Jun 08, 2009 4:41 pm

RE:Put statements.
-----------------------------------

procedure DrawFont (name : string, input : string, locationx, locationy : int)
    var font : int %font name
    %Example for description of name : "Papyrus:10:Bold"
    font := Font.New (name) %font is assigned to the name given in the parameters
    assert font > 0 %checks if the font exists
    Font.Draw (input, locationx, locationy, font, green) %draws what i want, in position locationx, locationy, with my desired font, also in green.
    Font.Free (font) %frees the font
end DrawFont



example of how to call the procedure:
DrawFont("Papyrus:10:Bold","i am drawing this onto the screen!",300,300

this is just an example of how one would utlize Font.Draw ...

-----------------------------------
BigBear
Mon Jun 08, 2009 4:55 pm

RE:Put statements.
-----------------------------------
You wouldn't need an assert statement because if the font doesn't exist turing will use arial

-----------------------------------
Kharybdis
Mon Jun 08, 2009 7:37 pm

Re: RE:Put statements.
-----------------------------------
You wouldn't need an assert statement because if the font doesn't exist turing will use arial

and what if the computer that the program is being run on doesn't have arial installed? picky, but ... hey :P

-----------------------------------
Dusk Eagle
Mon Jun 08, 2009 10:40 pm

Re: Put statements.
-----------------------------------
I don't have the Arial font yet it still works for me :P ... I believe Turing will just default to whatever font you are using in its text window if a specified font is not installed.
