Not-Nik / raylib-zig

Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib
MIT License
459 stars 101 forks source link

Make raygui.zig nicer #103

Closed AndrewKraevskii closed 4 weeks ago

AndrewKraevskii commented 4 weeks ago
  1. Return void if raylib function always returns value of 0.
  2. Return bool if raylib returns 1 of 0.
  3. Use enum for guiSetState and guiGetState.
  4. Convert i32 to ?u32 if it can be -1 or positive.
  5. Also link libc for tests because they can't be run overwise.

further improvements: use u32 instead of i32 for guiSetStyle and gutGetStyle as it can only be positive in raygui code (used for array access and array is unsigned char) but im not sure about that

Not-Nik commented 4 weeks ago

I'm hesitant to merge this, at the very least it needs a lot of work.