2025-02-06 16:12:15 +01:00

39 lines
917 B
C++

#include <raylib.h>
#include <imgui.h>
#include <rlImGui.h>
int main(int argc, char *argv[])
{
int screenWidth = 1000;
int screenHeight = 1000;
SetConfigFlags(FLAG_WINDOW_RESIZABLE);
InitWindow(screenWidth, screenHeight, "VIEW");
SetTargetFPS(60);
rlImGuiSetup(true);
bool showDemoWindow = true;
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_DockingEnable;
while (!WindowShouldClose())
{
BeginDrawing();
rlImGuiBegin();
ImGui::DockSpaceOverViewport(0, NULL, ImGuiDockNodeFlags_PassthruCentralNode);
ClearBackground(RAYWHITE);
if (ImGui::BeginMainMenuBar())
{
if (ImGui::MenuItem("Demo Window", nullptr, showDemoWindow))
showDemoWindow = !showDemoWindow;
ImGui::EndMainMenuBar();
}
if (showDemoWindow)
ImGui::ShowDemoWindow(&showDemoWindow);
rlImGuiEnd();
EndDrawing();
}
rlImGuiShutdown();
CloseWindow();
return 0;
}