Amerio.Stephane Posted May 19, 2020 Share Posted May 19, 2020 Hello, In the Widget API, what are exactly the arguments passed to these callbacks: https://developer.unigine.com/en/docs/2.11/api/library/gui/class.widget?rlang=cpp#addCallback_int_Callback3_void_ptr I couldn't figure out the second WidgetPtr and the int value passed. Bonus question: in a radio button group, is it possible to know which radio is checked, without having to explicitly look at each one? Thanks! Link to comment
moroz Posted May 19, 2020 Share Posted May 19, 2020 Hi! 4 hours ago, Amerio.Stephane said: I couldn't figure out the second WidgetPtr and the int value passed. pointer - is used for Drag&drop operations. For details see Widgets/spritre_03 in SDK UnigineScript samples. data - is used for getting of mouse or keyboard button state, when widget is pressed or clicked (callbacks names: Gui::CLICKED, Gui::PRESSED, Gui::KEY_PRESSED) 4 hours ago, Amerio.Stephane said: Bonus question: in a radio button group, is it possible to know which radio is checked, without having to explicitly look at each one? There aren't embedded ways to do it. But you can set one callback (from Gui::CHANGED) for all widgets in group. Link to comment
fox Posted May 19, 2020 Share Posted May 19, 2020 Hi Amerio, The Documentation is updated, sorry for the inconvenience caused and thanks for reporting! Link to comment
Recommended Posts