Closed furudbat closed 2 years ago
I'm made some custom icons with rGuiIcons ONE, but when I include the ricons.h-file, I getting this Error(s):
ricons.h
Error C2078 too many initializers ricons.h:546
Seems like the generated ricons uses a different guiIcons array size: (custom) ricons.h:
static unsigned int guiIcons[RICON_MAX_ICONS] = {
default icons (from raygui.h):
raygui.h
static unsigned int guiIcons[RICON_MAX_ICONS*RICON_DATA_ELEMENTS] = {
Solution: Use RICON_MAX_ICONS*RICON_DATA_ELEMENTS for the array size.
RICON_MAX_ICONS*RICON_DATA_ELEMENTS
Error C2065 'RICON_MAX_NAME_LENGTH': undeclared identifier raygui.h:3644
Solution: Add #define RICON_MAX_NAME_LENGTH 32.
#define RICON_MAX_NAME_LENGTH 32
Environment: OS: Windows 10 Compiler: MSVC (2019) raylib Version: 4.0-dev (from github) raygui Version: 3.0-dev (from github) rGuiIcons ONE Version: 1.0 (from itch.io)
My raygui.c:
raygui.c
#define RAYGUI_SUPPORT_RICONS #define RAYGUI_SUPPORT_CUSTOM_RICONS #define RAYGUI_IMPLEMENTATION #include <raylib.h> #include <raygui.h>
My Header:
#include <raylib.h> #undef RAYGUI_IMPLEMENTATION #define RAYGUI_SUPPORT_RICONS #define RAYGUI_SUPPORT_CUSTOM_RICONS #include <raygui.h>
@furudbat thanks for reporting! raygui and ricons changed lately and I need to update the tools.
raygui
ricons
@furudbat Updated source code, I'm planning a new release by the end of the month.
I'm made some custom icons with rGuiIcons ONE, but when I include the
ricons.h
-file, I getting this Error(s):Error C2078 too many initializers ricons.h:546
Seems like the generated ricons uses a different guiIcons array size:
(custom) ricons.h:
default icons (from
raygui.h
):Solution:
Use
RICON_MAX_ICONS*RICON_DATA_ELEMENTS
for the array size.Error C2065 'RICON_MAX_NAME_LENGTH': undeclared identifier raygui.h:3644
Solution:
Add
#define RICON_MAX_NAME_LENGTH 32
.Environment: OS: Windows 10 Compiler: MSVC (2019) raylib Version: 4.0-dev (from github)
raygui Version: 3.0-dev (from github)
rGuiIcons ONE Version: 1.0 (from itch.io)
My
raygui.c
:My Header: