Theme
HUD
Drawn by the engine's own UI; slots pack per corner.
| Export | Summary |
|---|---|
ShHudCreate | Register a line. |
ShHudSet | Text may hold newlines. |
ShHudFlash | As ShHudSet, but the line hides itself after ms milliseconds. |
ShHudColour | See ShHudFlash. |
ShHudShow | See ShHudFlash. |
ShHudDestroy | See ShHudFlash. |
ShToast | Show text for SH_TOAST_MS_DEFAULT, or replace the text of the toast last shown. |
ShToastEx | As ShToast with a colour (0xRRGGBB) and a duration. |
ShToastSet | Change the text of a toast already up and start its time again. |
ShToastHide | Take a toast down now and free it. |
ShToastClear | Take every toast down. |
ShHudToastSnapshot | The lines to draw now: how many there are, and up to max of them written into out. |
ShHudCreate
c
SH_API uint32_t ShHudCreate(const char *name, int anchor,
int priority);Register a line. Lower priority sits nearer the edge.
scripthook.h, line 1771
ShHudSet
c
SH_API int ShHudSet(uint32_t hud, const char *text);Text may hold newlines. Empty text hides the slot. The line stays until it is changed or hidden.
scripthook.h, line 1775
ShHudFlash
c
SH_API int ShHudFlash(uint32_t hud, const char *text, uint32_t ms);As ShHudSet, but the line hides itself after ms milliseconds. ms 0 keeps it until it is changed or hidden.
scripthook.h, line 1778
ShHudColour
c
SH_API int ShHudColour(uint32_t hud, uint32_t rgb);Documented together with ShHudFlash just above.
scripthook.h, line 1779
ShHudShow
c
SH_API int ShHudShow(uint32_t hud, int visible);Documented together with ShHudFlash just above.
scripthook.h, line 1780
ShHudDestroy
c
SH_API void ShHudDestroy(uint32_t hud);Documented together with ShHudFlash just above.
scripthook.h, line 1781
ShToast
c
SH_API uint32_t ShToast(const char *text);Show text for SH_TOAST_MS_DEFAULT, or replace the text of the toast last shown. Returns the toast id, 0 when none is free.
scripthook.h, line 1799
ShToastEx
c
SH_API uint32_t ShToastEx(const char *text, uint32_t rgb,
uint32_t ms);As ShToast with a colour (0xRRGGBB) and a duration. ms 0 keeps it up until it is changed or hidden.
scripthook.h, line 1803
ShToastSet
c
SH_API int ShToastSet(uint32_t id, const char *text, uint32_t rgb,
uint32_t ms);Change the text of a toast already up and start its time again. This is how a state moves on - "scanning" to "hidden" - without a second line appearing.
scripthook.h, line 1809
ShToastHide
c
SH_API int ShToastHide(uint32_t id);Take a toast down now and free it.
scripthook.h, line 1813
ShToastClear
c
SH_API void ShToastClear(void);Take every toast down.
scripthook.h, line 1816
ShHudToastSnapshot
c
SH_API int ShHudToastSnapshot(ShToastView *out, int max);The lines to draw now: how many there are, and up to max of them written into out. Taking the snapshot is also what retires a line whose time is up, so this is called once a frame by the drawer and nothing else has to keep time.
scripthook.h, line 1836