2020-05-07 23:54:08 +00:00
|
|
|
local lua_color = rl.new("Color", 3, 3, 128, 255)
|
2020-02-27 17:01:34 +00:00
|
|
|
|
|
|
|
local width, height = 800, 450
|
|
|
|
|
2020-03-29 13:40:02 +00:00
|
|
|
rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
|
2020-02-27 17:01:34 +00:00
|
|
|
rl.InitWindow(800, 450, "raylib [shapes] example - basic shapes drawing")
|
|
|
|
|
|
|
|
while not rl.WindowShouldClose() do
|
|
|
|
rl.BeginDrawing()
|
|
|
|
|
|
|
|
rl.ClearBackground(rl.RAYWHITE)
|
|
|
|
|
|
|
|
rl.DrawRectangle(width / 2 - 128, height / 2 - 128, 256, 256, lua_color)
|
|
|
|
rl.DrawRectangle(width / 2 - 112, height / 2 - 112, 224, 224, rl.RAYWHITE)
|
|
|
|
rl.DrawText("raylib", width / 2 - 44, height / 2 + 24, 50, lua_color)
|
|
|
|
rl.DrawText("Lua", width / 2 - 44, height / 2 + 65, 50, lua_color)
|
|
|
|
|
|
|
|
rl.DrawText("this is NOT a texture!", 350, 370, 10, rl.GRAY)
|
|
|
|
|
2020-09-05 18:44:37 +00:00
|
|
|
rl.EndDrawing()
|
2020-02-27 17:01:34 +00:00
|
|
|
end
|
|
|
|
|
2020-09-05 18:44:37 +00:00
|
|
|
rl.CloseWindow()
|