mirror of
https://github.com/raylib-zig/raylib-zig.git
synced 2025-12-16 03:03:13 +00:00
47 lines
1.3 KiB
Zig
47 lines
1.3 KiB
Zig
//
|
|
// mouse_ray
|
|
// Zig version: 0.6.0
|
|
// Author: Nikolas Wipper
|
|
// Date: 2020-02-15
|
|
//
|
|
|
|
usingnamespace @import("raylib");
|
|
|
|
pub fn main() anyerror!void
|
|
{
|
|
// Initialization
|
|
//--------------------------------------------------------------------------------------
|
|
const screenWidth = 800;
|
|
const screenHeight = 450;
|
|
|
|
InitWindow(screenWidth, screenHeight, "raylib-zig [core] test - disable exit key");
|
|
|
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
|
|
|
//SetExitKey(@intToEnum(KeyboardKey, 0));
|
|
SetExitKey(.KEY_NULL);
|
|
//--------------------------------------------------------------------------------------
|
|
|
|
// Main game loop
|
|
while (!WindowShouldClose()) // Detect window close button or ESC key
|
|
{
|
|
|
|
// Draw
|
|
//----------------------------------------------------------------------------------
|
|
BeginDrawing();
|
|
|
|
ClearBackground(WHITE);
|
|
|
|
|
|
|
|
EndDrawing();
|
|
//----------------------------------------------------------------------------------
|
|
}
|
|
|
|
// De-Initialization
|
|
//--------------------------------------------------------------------------------------
|
|
CloseWindow(); // Close window and OpenGL context
|
|
//--------------------------------------------------------------------------------------
|
|
}
|
|
|