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

Set icon

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:25, 26 June 2007 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Current revision (00:36, 19 December 2007) (edit) (undo)
Sandman (Talk | contribs)
m
 
Line 46: Line 46:
</pre> </pre>
Used in example: [[new_map]](), [[map_clear]](), [[set_title]](), [[set_mode]], [[unload_map]](), [[key]]() Used in example: [[new_map]](), [[map_clear]](), [[set_title]](), [[set_mode]], [[unload_map]](), [[key]]()
 +
 +{{Funcbox
 + | category=Programinteraction
 +}}

Current revision


Contents

[edit] Definition

INT set_icon ( <INT fileID> , <INT graphID> )

Set the window icon to a certain graph.

The icon will only be updated after set_mode() is called, so call set_icon() before set_mode(). The map used for the icon must be 32x32 large, but it can have a depth of 8bit or 16bit. After set_icon() and set_mode() have been called, the map used for the icon can be freed from memory using unload_map().

[edit] Parameters

INT fileID - The fileID of the file containing the graph.
INT graphID - The graphID of the graph to be used as an icon.

[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_title(), set_mode, unload_map(), key()


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