# GuiInterface.setGridMouseFocusCallback

Sets a callback to be called when a grid widget gets mouse focus

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
guiInterface:setGridMouseFocusCallback( buttonName, callback )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/GuiInterface.md#setgridmousefocuscallback)

**Availability:** Client only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `gui` | [GuiInterface](../Game-Script-Environment/Userdata/GuiInterface.md) | The Gui interface |
| `buttonName` | string | The button name |
| `callback` | string | Function to be called when button is pressed |
