mirror of
https://github.com/raylib-zig/raylib-zig.git
synced 2026-02-21 16:54:36 +00:00
Make textLeft, textRight, value optional in GuiSlider, GuiSliderBar, GuiProgressBar (#306)
This commit is contained in:
parent
aaaa53c3ce
commit
81c58a3d44
@ -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)
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user