add
This commit is contained in:
10
testing/inc/App.hpp
Normal file
10
testing/inc/App.hpp
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
class App
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
void update();
|
||||
void draw();
|
||||
void deinit();
|
||||
};
|
||||
19
testing/src/App.cpp
Normal file
19
testing/src/App.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "App.hpp"
|
||||
#include <raylib.h>
|
||||
|
||||
void App::init()
|
||||
{
|
||||
}
|
||||
|
||||
void App::update()
|
||||
{
|
||||
}
|
||||
|
||||
void App::draw()
|
||||
{
|
||||
ClearBackground(RAYWHITE);
|
||||
}
|
||||
|
||||
void App::deinit()
|
||||
{
|
||||
}
|
||||
33
testing/src/main.cpp
Normal file
33
testing/src/main.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <raylib.h>
|
||||
#include <imgui.h>
|
||||
#include <rlImGui.h>
|
||||
#include "App.hpp"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int screenWidth = 1000;
|
||||
int screenHeight = 1000;
|
||||
|
||||
App app;
|
||||
SetConfigFlags(FLAG_WINDOW_RESIZABLE);
|
||||
InitWindow(screenWidth, screenHeight, "Testing");
|
||||
SetTargetFPS(60);
|
||||
rlImGuiSetup(true);
|
||||
app.init();
|
||||
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_DockingEnable;
|
||||
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
app.update();
|
||||
BeginDrawing();
|
||||
rlImGuiBegin();
|
||||
app.draw();
|
||||
|
||||
rlImGuiEnd();
|
||||
EndDrawing();
|
||||
}
|
||||
app.deinit();
|
||||
rlImGuiShutdown();
|
||||
CloseWindow();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user