fonta.romain Posted September 27, 2012 Posted September 27, 2012 Hello ! I would like to know if it's possible to make callbacks using UI files with the same capabilities as the scripted one. For instance, with the script we could use the following declaration which includes some data arguments that could help a lot : void setCallback(int callback,string function,variable data_0,variable data_1,variable data_2,variable data_3) (Source https://developer.un...riable_variable) On other hand, in UI files, this is the only declaration we have in the documentation : callback Sets a callback for the widget. Contains a name of the callback function. Parameters: type, widget, string, accel_key, accel_ctrl, accel_alt. (Source https://developer.un.../gui/ui_widgets) Thank you !
fonta.romain Posted September 27, 2012 Author Posted September 27, 2012 Hello again, i will ask something else if it's possible : could it be possible to add an engine.gui.saveUserInterface(UserInterface userInterface) method ? Doing it this way we could update some states of user interface really easily. Thanks !
manguste Posted September 28, 2012 Posted September 28, 2012 In UI you can use string to pass your custom data, plus you can use 1 variable for that. I'll add this info into docs. As for saving user interfaces, sorry, we do not plan to add this functionality. What is your use case for that?
fonta.romain Posted September 28, 2012 Author Posted September 28, 2012 The use case is to allow the user to save custom UI state directly in UI files. This avoid to use exports Widgets to Unigine script and make some code to restore state from a previously saved XML file. Will look into docs. Thanks.
Recommended Posts