diff --git a/lib/generate_functions.py b/lib/generate_functions.py index 89ba562..55e3ef5 100755 --- a/lib/generate_functions.py +++ b/lib/generate_functions.py @@ -399,7 +399,16 @@ def parse_header(header_name: str, output_file: str, ext_file: str, prefix: str, ("rlLoadShaderBuffer", "data"), ("rlLoadShaderCode", "vsCode"), ("rlLoadShaderCode", "fsCode"), - ("GuiTextInputBox", "secretViewActive") + ("GuiTextInputBox", "secretViewActive"), + ("GuiSlider", "textLeft"), + ("GuiSlider", "textRight"), + ("GuiSlider", "value"), + ("GuiSliderBar", "textLeft"), + ("GuiSliderBar", "textRight"), + ("GuiSliderBar", "value"), + ("GuiProgressBar", "textLeft"), + ("GuiProgressBar", "textRight"), + ("GuiProgressBar", "value"), ] zig_type = ziggify_type(arg_name, arg_type, func_name) diff --git a/lib/raygui.zig b/lib/raygui.zig index 1489c73..fd0353d 100644 --- a/lib/raygui.zig +++ b/lib/raygui.zig @@ -665,17 +665,17 @@ pub fn valueBoxFloat(bounds: Rectangle, text: [:0]const u8, textValue: [:0]u8, v } /// Slider control -pub fn slider(bounds: Rectangle, textLeft: [:0]const u8, textRight: [:0]const u8, value: *f32, minValue: f32, maxValue: f32) i32 { +pub fn slider(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: ?*f32, minValue: f32, maxValue: f32) i32 { return @as(i32, cdef.GuiSlider(bounds, @as([*c]const u8, @ptrCast(textLeft)), @as([*c]const u8, @ptrCast(textRight)), @as([*c]f32, @ptrCast(value)), minValue, maxValue)); } /// Slider Bar control -pub fn sliderBar(bounds: Rectangle, textLeft: [:0]const u8, textRight: [:0]const u8, value: *f32, minValue: f32, maxValue: f32) i32 { +pub fn sliderBar(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: ?*f32, minValue: f32, maxValue: f32) i32 { return @as(i32, cdef.GuiSliderBar(bounds, @as([*c]const u8, @ptrCast(textLeft)), @as([*c]const u8, @ptrCast(textRight)), @as([*c]f32, @ptrCast(value)), minValue, maxValue)); } /// Progress Bar control -pub fn progressBar(bounds: Rectangle, textLeft: [:0]const u8, textRight: [:0]const u8, value: *f32, minValue: f32, maxValue: f32) i32 { +pub fn progressBar(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: ?*f32, minValue: f32, maxValue: f32) i32 { return @as(i32, cdef.GuiProgressBar(bounds, @as([*c]const u8, @ptrCast(textLeft)), @as([*c]const u8, @ptrCast(textRight)), @as([*c]f32, @ptrCast(value)), minValue, maxValue)); }