Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More examples showing the Lua interop #7

Open
bentxt opened this issue Jul 8, 2023 · 1 comment
Open

More examples showing the Lua interop #7

bentxt opened this issue Jul 8, 2023 · 1 comment

Comments

@bentxt
Copy link

bentxt commented Jul 8, 2023

Hi,
LunarML is truly great, but I struggle a bit with the Lua integration. Yes there is documentation but it is really dense and it would be nice to show the all the subjects like call(sml->lua), call(lua->sml), datatype conversions, value exporting, with a little more detail.
Thanks for all the work.
Ben

@bentxt
Copy link
Author

bentxt commented Jul 8, 2023

For example, with this basic example in Lua, what would be the equivalent LunarML implementation:

cat examples/core_basic_window.lua

rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)

rl.InitWindow(800, 450, "raylib [core] example - basic window")

while not rl.WindowShouldClose() do
  rl.BeginDrawing()
  rl.ClearBackground(rl.RAYWHITE)
  rl.DrawText("Congrats! You created your first window!", 190, 200, 20, rl.LIGHTGRAY)
  rl.EndDrawing()
end

rl.CloseWindow()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant