GRW ScriptHook 0.11.0
Plugin API for Ghost Recon Wildlands
Loading...
Searching...
No Matches
Menu

One root owned by the API; every plugin adds a submenu. More...

Typedefs

typedef void(*) ShMenuFn(uint32_t menu, uint32_t item, int value, void *user)

Functions

SH_API uint32_t ShMenuCreate (const char *title)
 A top level entry for your plugin.
SH_API uint32_t ShMenuSub (uint32_t parent, const char *label)
SH_API int ShMenuAction (uint32_t menu, const char *label, ShMenuFn fn, void *user)
SH_API int ShMenuToggle (uint32_t menu, const char *label, int initial, ShMenuFn fn, void *user)
SH_API int ShMenuNumber (uint32_t menu, const char *label, float initial, float lo, float hi, float step, ShMenuFn fn, void *user)
SH_API int ShMenuList (uint32_t menu, const char *label, const char **opts, int n, int initial, ShMenuFn fn, void *user)
 opts must outlive the menu.
SH_API int ShMenuClear (uint32_t menu)
 Drop a menu's items, keeping the row, so a plugin can rebuild its own menu without stacking duplicates.
SH_API int ShMenuDestroy (uint32_t menu)
 Remove the row and its subtree.
SH_API int ShMenuStatus (uint32_t menu, const char *text)
 The line under the items.
SH_API void ShMenuSetKey (int vk)
SH_API int ShMenuIsOpen (void)
SH_API void ShMenuOpen (int open)

Detailed Description

One root owned by the API; every plugin adds a submenu.

Typedef Documentation

◆ ShMenuFn

typedef void(*) ShMenuFn(uint32_t menu, uint32_t item, int value, void *user)

Function Documentation

◆ ShMenuCreate()

SH_API uint32_t ShMenuCreate ( const char * title)

A top level entry for your plugin.

F4 opens the root.

◆ ShMenuSub()

SH_API uint32_t ShMenuSub ( uint32_t parent,
const char * label )

◆ ShMenuAction()

SH_API int ShMenuAction ( uint32_t menu,
const char * label,
ShMenuFn fn,
void * user )

◆ ShMenuToggle()

SH_API int ShMenuToggle ( uint32_t menu,
const char * label,
int initial,
ShMenuFn fn,
void * user )

◆ ShMenuNumber()

SH_API int ShMenuNumber ( uint32_t menu,
const char * label,
float initial,
float lo,
float hi,
float step,
ShMenuFn fn,
void * user )

◆ ShMenuList()

SH_API int ShMenuList ( uint32_t menu,
const char * label,
const char ** opts,
int n,
int initial,
ShMenuFn fn,
void * user )

opts must outlive the menu.

String literals are fine.

◆ ShMenuClear()

SH_API int ShMenuClear ( uint32_t menu)

Drop a menu's items, keeping the row, so a plugin can rebuild its own menu without stacking duplicates.

◆ ShMenuDestroy()

SH_API int ShMenuDestroy ( uint32_t menu)

Remove the row and its subtree.

◆ ShMenuStatus()

SH_API int ShMenuStatus ( uint32_t menu,
const char * text )

The line under the items.

Empty text removes it.

◆ ShMenuSetKey()

SH_API void ShMenuSetKey ( int vk)

◆ ShMenuIsOpen()

SH_API int ShMenuIsOpen ( void )

◆ ShMenuOpen()

SH_API void ShMenuOpen ( int open)