Closed c-cube closed 3 months ago
There are now :D
I have never used it myself but it does seem nice. I'll look into it
Awesome. So far I'm impressed by how clean the bindings are :grin:
Some first things are working! Now to implement an example and see what's missing
I've added the raygui bindings as an extra package 'raygui', see https://tjammer.github.io/raylib-ocaml/raygui/Raygui/index.html https://github.com/tjammer/raylib-ocaml/blob/master/src/raygui/raygui.mli
I've also ported one example which covers most of the functions https://github.com/tjammer/raylib-ocaml/blob/master/examples/gui/controls_test_suite.ml
That looks simply amazing. I'll give it a try when I'm off work. Thank you!!
edit: tried the demo, it works directly. Very nice.
I'm not sure how to continue with these bindings. They certainly work ok for the time spent, but raygui feels limited compared to https://github.com/ocornut/imgui for instance. This is mainly due to the lack of windows or nesting. And keeping track of all this by hand is tedious.
I thought about dropping raygui bindings and try to bind dear imgui instead when I saw that you (@c-cube ) have started on imgui bindings already. It should be possible to use raylib as a backend as well, see https://github.com/oswjk/imgui-impl-raylib https://github.com/WEREMSOFT/c99-raylib-cimgui-template. What is the state of your imgui bindings right now?
They're not very usable, sorry. The imgui API is big, my code generation is complicated because I tried to generate ctypes with the multiple layers of code generation (to avoid dynamic linking). You can give it a try, but look at the dune files and tell me if you feel like that's maintainable :-).
I'm not sure where to go with that either. Imgui has a lot of pass-by-reference functions (with small structures or int[2]
pairs, this kind of stuff). That's not very idiomatic in OCaml.
imgui looks super impressive. I am looking for a GUI lib for ocaml, so I am subscribing to this thread 😄
are there plans to support raygui? It'd be useful to get a quick GUI running in OCaml…