You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do I have to include #define RAYGUI_CUSTOM_ICONS in every file where I include raygui.h, no matter if custom icons are used in it or not?
because I had an issue where - if I left it out of main.cpp - it would show an empty button (in my case) instead of the custom symbol. In my case main.cpp is the "root" file that includes different UI screens via the respective files (eg. sndMenu.cpp), therefore main.cpp doesn't use any custom symbols (or even plain text) at all.
Structure to render my menu screen (whose declaration-header is sndScenes.h) is like this:
`
//main.cpp
//------------------------------
#include <raylib.h>
#define RAYGUI_IMPLEMENTATION // only define once
#define RAYGUI_CUSTOM_ICONS // left this line out before, adding it solved the issue
#include "../resources/sndIcons.rgi.h" // left this line out before, adding it solved the issue
#include <raygui.h>
#include "sndScenes.h"
// no custom symbol used in here
//------------------------------
Do I have to include
#define RAYGUI_CUSTOM_ICONS
in every file where I includeraygui.h
, no matter if custom icons are used in it or not?because I had an issue where - if I left it out of
main.cpp
- it would show an empty button (in my case) instead of the custom symbol. In my casemain.cpp
is the "root" file that includes different UI screens via the respective files (eg.sndMenu.cpp
), thereforemain.cpp
doesn't use any custom symbols (or even plain text) at all.Structure to render my menu screen (whose declaration-header is sndScenes.h) is like this:
`
//main.cpp
//------------------------------
#include <raylib.h>
#define RAYGUI_IMPLEMENTATION // only define once
#define RAYGUI_CUSTOM_ICONS // left this line out before, adding it solved the issue
#include "../resources/sndIcons.rgi.h" // left this line out before, adding it solved the issue
#include <raygui.h>
#include "sndScenes.h"
// no custom symbol used in here
//------------------------------
//sndMenu.cpp
//------------------------------
#define RAYGUI_CUSTOM_ICONS // Custom icons set required
#include "../resources/sndIcons.rgi.h"
#include <raygui.h>
#include "sndScenes.h"
GuiButton((Rectangle)(left, right, width, height), GuiIconText(ICON_DARK_MODE, ""))
//------------------------------
`
The text was updated successfully, but these errors were encountered: