Function tetra::window::set_icon

source ·
pub fn set_icon(ctx: &mut Context, data: &mut ImageData) -> Result
Expand description

Sets the icon for the window.

Note that the preferred way of setting the icon is as part of packaging your game, as detailed in the ‘Distributing’ page of Tetra’s documentation, as this allows for the icon to be displayed in more places (system menus, file managers, etc) and for multiple resolutions to be provided. This function is mainly useful if you wish to change the icon once the application is already running.

Errors