# sm.gui.createWorldIconGui

Create a world icon GUI from a layout file.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.gui.createWorldIconGui( width, height, layout?, destroyOnClose? )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.gui.md#createworldicongui)

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `width` | integer | The width. |
| `height` | integer | The height. |
| `layout` *(optional)* | string | Path to the layout file (Defaults to "$GAME_DATA/Gui/Layouts/Hud/Hud_WorldIcon.layout") |
| `destroyOnClose` *(optional)* | boolean | If true the gui is destroyed when closed, otherwise the gui can be reused. (Defaults to false) |

**Returns:**

| Type | Description |
| --- | --- |
| [GuiInterface](../Game-Script-Environment/Userdata/GuiInterface.md) | The gui interface to the created gui. |
