{
"dependencies": [
"sfml",
{
"name": "tgui",
"default-features": true,
"features": ["tool"]
},
"vcpkg-cmake"
]
}#vcpkg_cmake_configure(
# OPTIONS
# -DTGUI_BUILD_GUI_BUILDER:BOOL=ON
#)
set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DTGUI_BUILD_GUI_BUILDER:BOOL=ON)#define NOGDI
#define NOUSER
#include <raylib.h>
#include <TGUI/TGUI.hpp>
#include <TGUI/Backend/raylib.hpp>
void run_application()
{
tgui::Gui gui;
auto menu = tgui::MenuBar::create();
menu->addMenu("File");
menu->addMenuItem("New Project");
menu->connectMenuItem({ "File", "New Project" }, [] {
std::cout << "Let me print! \n";
});
gui.add(menu, "menu1");
gui.mainLoop();
}
int main()
{
SetTraceLogLevel(LOG_WARNING);
InitWindow(800, 600, "TGUI example (RAYLIB)");
SetTargetFPS(30);
run_application();
CloseWindow();
}