mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-09-09 03:01:41 -04:00
Setup basic class to test with windows forms
- Added DrawControl class to test windows forms with raylib. Need a way to get the window handle?
This commit is contained in:
@@ -7,49 +7,9 @@ namespace ExampleApplication
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// LoadApp();
|
||||
Run();
|
||||
}
|
||||
|
||||
public static int Run()
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "Raylib-cs [core] example - basic window");
|
||||
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
while (!WindowShouldClose()) // Detect window close button or ESC key
|
||||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// TODO: Update your variables here
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
DrawFPS(0, 0);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//-----------------------------
|
||||
|
||||
return 0;
|
||||
// LoadApp();
|
||||
Examples.shapes_basic_shapes();
|
||||
// DrawControl.Run();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user