blob: 4f2880059e4f08f36d5117fb9f9ceba4dd33635b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
-- Initialization
----------------------------------------------------------------------------------------
local screenWidth = 800
local screenHeight = 450
InitWindow(screenWidth, screenHeight, "raylib [rlua] example - basic window")
InitAudioDevice()
--local pause = false
--local texture = LoadTexture("resources/texture.png")
SetTargetFPS(60) -- Set target frames-per-second
----------------------------------------------------------------------------------------
while not WindowShouldClose() do
-- Update
------------------------------------------------------------------------------------
--if (IsKeyPressed(KEY.SPACE)) then
-- pause = not pause
--end
------------------------------------------------------------------------------------
-- Draw
------------------------------------------------------------------------------------
BeginDrawing()
ClearBackground(RAYWHITE)
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY)
EndDrawing()
------------------------------------------------------------------------------------
end
-- De-Initialization
------------------------------------------------------------------------------------
CloseAudioDevice() -- Close audio device
CloseWindow() -- Close window and OpenGL context
------------------------------------------------------------------------------------
|