This wiki is out of date, use the continuation of this wiki instead

Move text

From FenixWiki

Revision as of 00:35, 24 July 2007 by Rincewind (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search


Contents

[edit] Definition

INT move_text ( <INT TextID> , <INT x> , <INT y> )

Moves an existing text to another place on the screen.

[edit] Parameters

INT TextID - Identifier of the text you want to move. This identifier should have been appointed to a text earlier on.
INT x - The new horizontal coordinate (of the control point) of your text.
INT y - The new vertical coordinate (of the control point) of your text.

[edit] Returns

<If someone knows, please edit!>

[edit] Notes

None.

[edit] Errors

<If someone knows, please edit!>

[edit] Example

Program test;
Global
    My_text;
Begin
    My_text=write(0,320/2,200/2,4,"Press space to move this.");
    Loop
        If (key(_space))
            Move_text(My_text,rand(0,319),rand(0,199));
        End
        Frame;
    End
End

Used in example: write(), key(), rand()

This will result in something like:
Image:Move_text.png

Personal tools