Don't take redundant text size in textBox() (#325)

This commit is contained in:
Nikolas committed 2026-04-25 19:54:58 +02:00
1 parent bd161c82d4
commit 47766db82f
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -519,6 +519,6 @@ pub fn checkBox(bounds: Rectangle, text: [:0]const u8, checked: *bool) bool {
/// Text Box control, updates input text
/// Returns true on ENTER pressed (useful for data validation)
pub fn textBox(bounds: Rectangle, text: [:0]u8, textSize: i32, editMode: bool) bool {
return @as(i32, cdef.GuiTextBox(bounds, @as([*c]u8, @ptrCast(text)), @as(c_int, textSize), editMode)) > 0;
pub fn textBox(bounds: Rectangle, text: [:0]u8, editMode: bool) bool {
return @as(i32, cdef.GuiTextBox(bounds, @as([*c]u8, @ptrCast(text)), @as(c_int, @intCast(text.len)), editMode)) > 0;
}
+2 -2
View File
@@ -519,8 +519,8 @@ pub fn checkBox(bounds: Rectangle, text: [:0]const u8, checked: *bool) bool {
/// Text Box control, updates input text
/// Returns true on ENTER pressed (useful for data validation)
pub fn textBox(bounds: Rectangle, text: [:0]u8, textSize: i32, editMode: bool) bool {
return @as(i32, cdef.GuiTextBox(bounds, @as([*c]u8, @ptrCast(text)), @as(c_int, textSize), editMode)) > 0;
pub fn textBox(bounds: Rectangle, text: [:0]u8, editMode: bool) bool {
return @as(i32, cdef.GuiTextBox(bounds, @as([*c]u8, @ptrCast(text)), @as(c_int, @intCast(text.len)), editMode)) > 0;
}
/// Enable gui controls (global state)