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

Set title

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:19, 22 April 2007 (edit)
Woody (Talk | contribs)

← Previous diff
Current revision (00:37, 19 December 2007) (edit) (undo)
Sandman (Talk | contribs)
m
 
(3 intermediate revisions not shown.)
Line 1: Line 1:
[[Category:functions]] [[Category:functions]]
-[[Category:initialization]]+[[Category:programinteraction]]
 +== Definition ==
'''INT''' set_title ( <'''STRING''' title> ) '''INT''' set_title ( <'''STRING''' title> )
Sets the title of the program's window. Sets the title of the program's window.
 +
 +The title will only be updated after [[set_mode]]() is called, so call set_title() before set_mode().
 +
 +== Parameters ==
 +{|
 +| '''STRING''' title || - The new title for the program's window.
 +|}
 +
 +== Returns ==
 +'''INT''' : [[true]]
 +
 +== Example ==
 +<pre>
 +Program icon;
 +Private
 + int map;
 + int screen_width = 320;
 + int screen_height = 200;
 + int screen_depth = 8;
 + int iconsize = 32;
 +Begin
 +
 + map = new_map(iconsize,iconsize,screen_depth);
 + map_clear(0,map,rgb(0,255,255));
 +
 + set_icon(0,map);
 + set_title("<-- Look at the cyan block!");
 + set_mode(screen_width,screen_height,screen_depth);
 +
 + unload_map(0,map);
 +
 + Repeat
 + frame;
 + Until(key(_esc))
 +
 +End
 +</pre>
 +Used in example: [[new_map]](), [[map_clear]](), [[set_icon]](), [[set_mode]], [[unload_map]](), [[key]]()
 +
 +{{Funcbox
 + | category=Programinteraction
 +}}

Current revision


Contents

[edit] Definition

INT set_title ( <STRING title> )

Sets the title of the program's window.

The title will only be updated after set_mode() is called, so call set_title() before set_mode().

[edit] Parameters

STRING title - The new title for the program's window.

[edit] Returns

INT : true

[edit] Example

Program icon;
Private
    int map;
    int screen_width  = 320;
    int screen_height = 200;
    int screen_depth  =   8;
    int iconsize      =  32;
Begin

    map = new_map(iconsize,iconsize,screen_depth);
    map_clear(0,map,rgb(0,255,255));

    set_icon(0,map);
    set_title("<-- Look at the cyan block!");
    set_mode(screen_width,screen_height,screen_depth);

    unload_map(0,map);

    Repeat
        frame;
    Until(key(_esc))

End

Used in example: new_map(), map_clear(), set_icon(), set_mode, unload_map(), key()


Programinteraction Functions
Exit() • Getenv() • Key() • Move_window() • Set_fps() • Set_icon() • Set_mode() • Set_title() •
Personal tools