# Hud

### Properties:

| Name         | Type    | Description                |
| ------------ | ------- | -------------------------- |
| ShouldRender | boolean | If hud should be rendered. |

### Static Functions:

#### .ShowActionButton

`Hud.ShowActionButton(text: string, buttontype: UIButton, actiontype: string)`

| Name       | Type                                                                                 | Description |
| ---------- | ------------------------------------------------------------------------------------ | ----------- |
| text       | string                                                                               | -           |
| buttontype | [UIButton](https://sneakyevil.gitbook.io/sleeping-dogs-de-script-api/enums#uibutton) | -           |
| actiontype | string                                                                               | -           |

<figure><img src="https://870759650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBLAUmtRDKX8OvTVmMCw%2Fuploads%2FZM0CNV5f0MJbhFfPPAoF%2Fimage.png?alt=media&#x26;token=692e8861-3fa4-499f-b3c7-d2477d18c378" alt=""><figcaption><p>Preview</p></figcaption></figure>

#### .ShowActionButtonOneFrame

`Hud.ShowActionButtonOneFrame(text: string, buttontype: UIButton, actiontype: string)`

| Name       | Type                                                                                 | Description |
| ---------- | ------------------------------------------------------------------------------------ | ----------- |
| text       | string                                                                               | -           |
| buttontype | [UIButton](https://sneakyevil.gitbook.io/sleeping-dogs-de-script-api/enums#uibutton) | -           |
| actiontype | string                                                                               | -           |

#### .HideActionButton

`Hud.HideActionButton()`

#### .SetMissionHealthVisible

`Hud.SetMissionHealthVisible(visible: boolean)`

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| visible | boolean | -           |

<figure><img src="https://870759650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBLAUmtRDKX8OvTVmMCw%2Fuploads%2F9szFX6fZs8MeUGyKYj3P%2Fimage.png?alt=media&#x26;token=450fc5cc-62ec-430c-a2f2-c8bcb3e034b9" alt=""><figcaption><p>Preview</p></figcaption></figure>

#### .SetMissionHealthCaption

`Hud.SetMissionHealthCaption(text: string)`

| Name | Type   | Description |
| ---- | ------ | ----------- |
| text | string | -           |

#### .SetMissionHealthValue

`Hud.SetMissionHealthValue(value: float)`

| Name  | Type  | Description    |
| ----- | ----- | -------------- |
| value | float | (0.0 to 100.0) |

#### .SetMissionHealthSuccess

`Hud.SetMissionHealthSuccess(success: boolean)`

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| success | boolean | -           |

Makes the health progress shine at the end of line when set to true.

#### .SetMissionProgressVisible

`Hud.SetMissionProgressVisible(visible: boolean)`

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| visible | boolean | -           |

#### .ClearMissionProgress

`Hud.ClearMissionProgress()`

#### .SetMissionProgressState

`Hud.SetMissionProgressState(state: MissionProgressState, slot: integer)`

| Name  | Type                                                                                                         | Description |
| ----- | ------------------------------------------------------------------------------------------------------------ | ----------- |
| state | [MissionProgressState](https://sneakyevil.gitbook.io/sleeping-dogs-de-script-api/enums#missionprogressstate) | -           |
| slot  | integer                                                                                                      | (0 to 3)    |

#### .SetMissionProgressText

`Hud.SetMissionProgressText(text: string, slot: integer)`

| Name | Type    | Description |
| ---- | ------- | ----------- |
| text | string  | -           |
| slot | integer | (0 to 3)    |

#### .ShowHintText

`Hud.ShowHintText(text: string, time: float)`

| Name | Type   | Description |
| ---- | ------ | ----------- |
| text | string | -           |
| time | float  | -           |

<figure><img src="https://870759650-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBLAUmtRDKX8OvTVmMCw%2Fuploads%2FT54tsR43SUiFRefYfaCQ%2Fimage.png?alt=media&#x26;token=2860fa7a-ca7b-42bd-b21b-886b2d08d4a7" alt=""><figcaption><p>Preview</p></figcaption></figure>

#### .HideHintText

`Hud.HideHintText()`

#### .ShowInfoPopup

`Hud.ShowInfoPopup(text: string, time: float)`

| Name | Type   | Description |
| ---- | ------ | ----------- |
| text | string | -           |
| time | float  | -           |

Does same thing as `ShowHintText`, but has priority to show if and if called at the same time with `ShowHintText` then it will show first InfoPopup and then later the HintText.

#### .HideInfoPopup

`Hud.HideInfoPopup()`
