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

Write in map

From FenixWiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 23:49, 24 July 2007


Contents

Definition

INT write_in_map ( <INT fontID> , <STRING text> , <INT alignment> )

Creates a new map in memory with the given text on it (with the map borders as tight around the text as possible).

Parameters

INT fontID - The FontID of the font to be used for the text.
STRING text - The text to be used.
INT alignment - The type of alignment.

Returns

INT : graph number of the newly created map (in file 0, memory).

Notes

Map_put() or map_xput() can be used to put the newly created text map on another map (this is also why the alignment parameter is handy: it enables you to chose alignment when putting the text map on another map).

Errors

<If someone knows, please edit!>

Example

Program test;
Begin
    x=320/2;
    y=200/2;
    Set_text_color(154);
    Graph=write_in_map(0,"Game programming is awesome!",4);
    Loop
        Frame;
    End
End

Used in example: set_text_color()

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

Personal tools