蜂窝菜单
蜂窝菜单组件以蜂窝形状显示一组图标。
用法
创建蜂窝菜单组件
要创建蜂窝菜单组件,使用 gui_menu_cellular_create(void *parent, int icon_size, uint32_t *icon_array[],int array_size) 函数。用户需要提供代表图标集的图像文件数组。
配置偏移
使用 void gui_menu_cellular_offset(gui_obj_t *menu_cellular, int offset_x, int offset_y) 函数可以调整水平和垂直偏移以获得更好的显示效果。
示例
#include "gui_menu_cellular.h"
static void app_menu(gui_app_t *app)
{
/**
* @link https://docs.realmcu.com/Honeygui/latest/widgets/gui_menu_cellular.html#example
*/
uint32_t *array[] =
{
I4500009_BIN,
I4500011_BIN,
I4500015_BIN,
I4500020_BIN,
I4500028_BIN,
I4500034_BIN,
I4500035_BIN,
I4500037_BIN,
I4500040_BIN,
I4500042_BIN,
I4500047_BIN,
I4500049_BIN,
I4500052_BIN,
I4500064_BIN,
I4500009_BIN,
I4500011_BIN,
I4500015_BIN,
I4500020_BIN,
I4500028_BIN,
I4500034_BIN,
I4500035_BIN,
I4500037_BIN,
I4500040_BIN,
I4500042_BIN,
I4500047_BIN,
I4500049_BIN,
I4500052_BIN,
I4500064_BIN,
I4500009_BIN,
I4500011_BIN,
I4500015_BIN,
I4500020_BIN,
I4500028_BIN,
I4500034_BIN,
I4500035_BIN,
I4500037_BIN,
I4500040_BIN,
I4500042_BIN,
I4500047_BIN,
I4500049_BIN,
I4500052_BIN,
I4500064_BIN,
I4500009_BIN,
I4500011_BIN,
I4500015_BIN,
I4500020_BIN,
};
gui_menu_cellular_t *cell = gui_menu_cellular_create(GUI_APP_ROOT_SCREEN, 100, array,
sizeof(array) / sizeof(uint32_t *));
gui_menu_cellular_offset((void *)cell, -36, -216);
}
API
Functions
Create a honeycomb effect widget,.
- 参数:
parent – the father widget nested in
icon_size – icon’s width(px)
icon_array – icons set’s file address array
array_size – the array’s size
- 返回:
gui_menu_cellular_t*
config offset
- 参数:
menu_cellular – the menu_cellular pointer
offset_x – offset_x
offset_y – offset_y
- #include <gui_menu_cellular.h>
menu_cellular structure
Public Members
base structure
- #include <gui_menu_cellular.h>
Public Members