raylib-lua-legacy/examples/lua_repl.lua

19 lines
370 B
Lua
Raw Normal View History

2020-03-31 19:30:17 +00:00
rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
2020-04-01 11:16:25 +00:00
rl.InitWindow(800, 450, "raylib [lua] example - repl")
2020-03-31 19:30:17 +00:00
while not rl.WindowShouldClose() do
rl.BeginDrawing()
rl.ClearBackground(rl.RAYWHITE)
rl.DrawText("Press [R] to go to REPL !", 260, 200, 20, rl.LIGHTGRAY)
if rl.IsKeyDown(rl.KEY_R) then
raylua.repl()
end
rl.EndDrawing()
end
rl.CloseWindow()