The problem surfaces when attempting to make a text box editable. This would also show up if making the V version of the Raygui controls test suite example. The present function won't allow a user to directly change the text in the text box control. It would remain as whatever was the default string assigned.
pub fn gui_text_box(bounds Rectangle, text string, text_size int, edit_mode bool) int
One possible solution is for the V version of the function to have 2 parameters, where one is &u8 and the other is string. If you don't want the gui_text_box content to be editable, then use type string and this is given to the C function as text.str. If you want to allow users to change the content, then maybe use type &u8 and cast to &char. The difference can be distinguished by an if statement in the body of the new function. Just a suggestion, as there can be different ways to get the same result.
pub fn gui_text_box(bounds Rectangle, edit &u8, text string, text_size int, edit_mode bool) int
The problem surfaces when attempting to make a text box editable. This would also show up if making the V version of the Raygui controls test suite example. The present function won't allow a user to directly change the text in the text box control. It would remain as whatever was the default string assigned.
pub fn gui_text_box(bounds Rectangle, text string, text_size int, edit_mode bool) intOne possible solution is for the V version of the function to have 2 parameters, where one is
&u8and the other isstring. If you don't want thegui_text_boxcontent to be editable, then use typestringand this is given to the C function astext.str. If you want to allow users to change the content, then maybe use type&u8and cast to&char. The difference can be distinguished by an if statement in the body of the new function. Just a suggestion, as there can be different ways to get the same result.pub fn gui_text_box(bounds Rectangle, edit &u8, text string, text_size int, edit_mode bool) int