![]() |
BSB Developer Docs
|
A widget that shows an advanced animated menu. More...
Go to the source code of this file.
Typedefs | |
| typedef struct AnimMenu | AnimMenu |
| AnimMenu opaque structure. | |
| typedef void(* | AnimMenuCallback) (uint32_t index, void *context) |
| AnimMenu item callback function type. | |
Functions | |
| AnimMenu * | anim_menu_alloc (Widget *parent) |
| Create a new AnimMenu instance. | |
| void | anim_menu_free (AnimMenu *instance) |
| Delete a AnimMenu instance. | |
| Widget * | anim_menu_get_base (AnimMenu *instance) |
| Get a pointer to the base class instance. | |
| AnimPlayer * | anim_menu_get_anim_player (AnimMenu *instance) |
| Get a pointer to the underlying AnimPlayer instance. | |
| bool | anim_menu_set_source (AnimMenu *instance, const char *file_path, size_t options) |
| Set the animation file for the AnimMenu instance. | |
| void | anim_menu_set_callback (AnimMenu *instance, AnimMenuCallback callback, void *context) |
| Set a function to be called when an item has been clicked. | |
A widget that shows an advanced animated menu.
See assets/animations/README.md for .anim file requirements
| typedef void(* AnimMenuCallback) (uint32_t index, void *context) |
AnimMenu item callback function type.
| [in] | index | index of the clicked item |
| [in,out] | context | pointer to a user-specific object |
Create a new AnimMenu instance.
| [in,out] | parent | pointer to the parent Widget instance |
| void anim_menu_free | ( | AnimMenu * | instance | ) |
Delete a AnimMenu instance.
| [in,out] | instance | pointer to the AnimMenu instance to be deleted |
| AnimPlayer * anim_menu_get_anim_player | ( | AnimMenu * | instance | ) |
Get a pointer to the underlying AnimPlayer instance.
The return value can be used in all AnimPlayer methods.
| [in,out] | instance | pointer to the AnimMenu instance to be queried |
Get a pointer to the base class instance.
The return value can be used in all Widget methods.
| [in,out] | instance | pointer to the AnimMenu instance to be queried |
| void anim_menu_set_callback | ( | AnimMenu * | instance, |
| AnimMenuCallback | callback, | ||
| void * | context ) |
Set a function to be called when an item has been clicked.
| [in,out] | instance | pointer to the AnimMenu instance to be modified |
| [in] | callback | pointer to the function to be called when the item is clicked |
| [in,out] | context | pointer to a user-specific object, will be passed to callback |
| bool anim_menu_set_source | ( | AnimMenu * | instance, |
| const char * | file_path, | ||
| size_t | options ) |
Set the animation file for the AnimMenu instance.
| [in,out] | instance | pointer to the AnimMenu instance to be modified |
| [in] | file_path | zero-terminated string containing the full path to animation file |
| [in] | options | number of menu options |