61 Commits

Author SHA1 Message Date
Daniel Hill
67fd5af55a fix(raygui): strip "Gui" prefix from Zig functions 2025-04-20 13:50:02 +02:00
Daniel Hill
f4b69764db feat(raygui): get message box example working 2025-04-20 13:50:02 +02:00
Nikolas
d6c77762cb
Automatically generate functions that return their slice length, where possible 2025-03-30 19:29:51 +02:00
Tommy D. Rossi
a00552ea79
Fix exportImageToMemory (#232)
* fix exportImageToMemory

* update make_return_cast
2025-03-30 18:00:07 +02:00
Nikolas
e18e2db5e5
Make secretViewActive in guiTextInputBox optional (#205) 2025-03-06 15:24:09 +01:00
Nikolas
e4d66a8dae
Perform colorToInt conversion manually during compiletime (#176) 2025-03-04 17:50:50 +01:00
Nikolas
bc82c6ebd7
Move from sentinel-terminated pointers to sentinel-terminated slices globally ([+:0] -> [:0]) (#203) 2025-02-24 16:44:49 +01:00
vent
41022159ad
Error check using IsValid functions and return error unions (#191)
* Verify shaders are valid

* Verify images are valid

* Verify models are valid

* Verify materials are valid

* Verify textures are valid

* Verify render textures are valid

* Verify waves are valid

* Verify sounds are valid

* Verify music is valid

* Verify audio streams are valid

* Verify fonts are valid

* Update examples to handle error unions
2025-01-11 18:07:33 +01:00
James Davis
30ce68004f
Use GamepadAxis enum for getGamepadAxisMovement instead of c_int (#187)
* Updated getGamepadAxisMovement to take enum and cast return to f32

* Updated raylib-ext.zig GetGamepadAxisMovement to take enum

* modified generate_functions.py to make changes instead
2025-01-10 19:18:45 +01:00
raugl
4e05ee5a3f
Added missing variadic arguments to traceLog() (#186)
* Added missing variadic arguments to `traceLog()`

* Made changes resillient to `generate_function.py`
2025-01-06 17:26:37 +01:00
Not-Nik
57041e707c
[raygui] Allow GuiControlProperty and GuiDefaultProperty as types for property in GuiGetStyle/GuiSetStyle (#131) 2025-01-04 00:24:09 +01:00
Андрей Краевский
ff775330c7
Update raylib to version 5.5 (#174) 2024-11-25 14:18:03 +01:00
Not-Nik
a2397363aa
meta: Bump raylib/raygui 2024-10-13 14:12:39 +02:00
Not-Nik
855ab9cd70
raygui: Revert property parameters back to i32s (#131) 2024-10-02 22:19:20 +02:00
Not-Nik
e3e3a7518a
Bump to raylib 5.5-dev 2024-08-31 11:20:45 +02:00
Not-Nik
6cc4aec3c4
Allow passing points for drawing as const slices (#127) 2024-08-04 23:33:48 +02:00
Not-Nik
da1da5a66c
Allow passing null pointers to more rlgl functions (#128) 2024-08-04 23:25:47 +02:00
Not-Nik
a7f25c615b
Use slice length for spline and image kernel functions 2024-07-28 00:11:56 +02:00
M. Bamberg
155a95feeb
Add shebang line to python script and make it executable (#124) 2024-07-27 23:28:09 +02:00
Not-Nik
c96627f91a
Use proper enums for GuiGetStyle/GuiSetStyle (#125) 2024-07-27 23:27:00 +02:00
pancelor
6efc03f6fe
fix setMouseCursor() and setTextureWrap() enum types (#126)
* tidying

no change to behavior, just change a few things to be
more consistent with the rest

* fix enum type conversions

setMouseCursor() and setTextureWrap() both took c_int arguments;
now they take zig enums instead

* make fix_enums table-driven

hopefully this is easier to visually parse than the if-else chain
2024-07-27 23:19:14 +02:00
Not-Nik
a03b65a76c
Move from sentinel-terminated slices to sentinel-terminated pointers ([:0] -> [*:0]) 2024-07-09 21:59:38 +02:00
Dumb Bird
2d8e856009
Make use of Zigs doc comments (#116)
* copy over inline comments

* remove trailing comma

* add more doc comments

* implement requested changes

* Newly generated file

* Manually add docstrings to raygui functions in prelude

* Fix generator script

---------

Co-authored-by: Not-Nik <nik.wipper@gmx.de>
2024-07-03 21:32:56 +02:00
Not-Nik
361d3962cf
Allow passing null pointers to certain rlgl functions (#112) 2024-06-30 21:03:56 +02:00
Not-Nik
fb11a4e1c8
Make panel text optional (#109) 2024-06-25 19:49:57 +02:00
Not-Nik
674e5ada11
Use ShaderUniformDataType instead of int 2024-05-31 20:31:58 +02:00
Not-Nik
6ff9f0a45b
Use packed struct for ConfigFlags (#93) 2024-05-31 20:23:04 +02:00
Not-Nik
98ced86523
Use more enums instead of ints 2024-05-31 19:52:06 +02:00
Mohanavel S K
efb7b736db
Adding support for raygui (#95)
* updated build.zig and generate_functions.py to add raygui

* added raygui.h and manually coded some structs & enums in raygui prelude WIP

* ported all the structs, enums and globals to zig till raygui implementation

* imported types from raylib in raygui

* re-encoded raygui-prelude.zig. I don't know for some reason it was showing up as UTF-16 unicode text file. re-encoded it to UTF-8

* fixed imports in prelude to work properly with generated files

* updated generate_functions.py file to generate for raygui [text type error not fixed]

* simple temporary patch for mentioned text type issue

* removed unused imports from raylib in raygui

* added generated files

* Manually define raygui functions for slice arguments

* Manually define raygui functions with pointer return values

---------

Co-authored-by: Not-Nik <nik.wipper@gmx.de>
2024-05-31 19:24:05 +02:00
Nikolas
ae751ce82e
Bump to Zig 0.12/raylib 5.1-dev (#81)
* Update to Zig 0.12.0 and raylib 5.1-dev

* More build.zig fixes for 0.12

* Get module with target and optimization

* Add examples to build step when compiling for emscripten

* Remove unused function

* Add build.* and emcc.zig to the zon paths (#83)

As per some info found through https://github.com/ziglang/zig/issues/18282,
this is apparently necessary to use this library as a dependency.

Co-authored-by: Drum Ogilvie <me@daogilvie.com>

* Update binding
2024-04-28 23:46:51 +02:00
Not-Nik
9600e2108a
Rename library files 2024-04-14 22:20:30 +02:00
Not-Nik
ee7593d5ef
Add rlgl binding (#77) 2024-04-14 22:14:49 +02:00
Locria Cyber
528bcf29c5
fix const 2023-12-28 15:04:26 +00:00
Locria Cyber
37ddb70f93
Update zig functions to raylib 5.0 2023-12-28 14:59:48 +00:00
vent
4dbbea186e Clean up generate_functions.py
This commit fixes the PEP8 warnings, with the only change to the PEP8
standard being the column limit change from 80 to 120. These warnings
were gathered with `flake8` version 6.1.0.

The complete command to see warnings was:
    `flake8 --max-line-length 120 generate_functions.py`

Additionally, comments have been line wrapped in places, start of
sentences have been capitalized, and full stops have been added to
terminate sentences.
2023-09-11 15:14:59 +01:00
Not-Nik
cd66693011
Use slice length instead of asking for it from the callee on some functions (#50) 2023-08-18 00:58:13 +02:00
Not-Nik
edbd73e6be
Bump to Zig 0.11/raylib 4.6-dev 2023-07-21 17:04:56 +02:00
Not-Nik
e25a3e070a
Image member functions 2023-07-20 17:58:29 +02:00
Not-Nik
e13c5bf521
Compression/Encoding functions now with proper slices + correct casting for lens 2023-07-20 16:33:37 +02:00
Not-Nik
f09c38381b
Use correct zero-terminated type for strings (#46) 2023-07-19 19:36:21 +02:00
Not-Nik
66b7a087c3
More work on slices 2023-07-18 21:43:18 +02:00
Not-Nik
c08e5f51c2
Fix issues with slices in font loading functions (#47) 2023-07-18 12:20:01 +02:00
Not-Nik
052ab7b75b
Convert some more enums 2023-07-11 19:14:05 +02:00
Not-Nik
3f046d9db7
Convert return values 2023-07-11 18:58:07 +02:00
Not-Nik
8a2cd7dce2
Convert WindowState flags again, this time with a non-exaustive enum (#43) 2023-07-10 22:51:13 +02:00
Not-Nik
e29e012981
Map C pointers to Zig and functions names use Zig naming conventions 2023-07-10 22:22:37 +02:00
Not-Nik
642ca0513f
Remove unneccessary empty lines at the end of library files 2023-07-10 00:45:21 +02:00
Not-Nik
ffe8091bc4
Don't convert flags type to enum for WindowState (#43) 2023-07-07 02:09:23 +02:00
Not-Nik
af773c79e2
Use single library files instead of keeping function declarations in a seperate file 2023-07-07 02:03:54 +02:00
Not-Nik
1e06706bff
Update to 4.5-dev 2023-01-23 22:07:43 +01:00