Klimczak.Jan Posted January 16, 2018 Share Posted January 16, 2018 Hi, A I see there is support for WindowsTouch API in 3D scene. But there is not for internal GUI elements like Buttons etc. It could be useful to have it in GUI too. Kind regards, Jan Link to comment
silent Posted January 17, 2018 Share Posted January 17, 2018 Hi Jan, Actually it should work, but due to bug in the engine it will not register proper UI touch events. We will see what we can do to fix this behavior. Btw, can you give us at least a screenshot of your UI configuration? Thanks! 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Klimczak.Jan Posted January 17, 2018 Author Share Posted January 17, 2018 2 hours ago, silent said: Hi Jan, Actually it should work, but due to bug in the engine it will not register proper UI touch events. We will see what we can do to fix this behavior. Btw, can you give us at least a screenshot of your UI configuration? Thanks! I do tests with widgets_00 sample from US (Interface section). Tommorow I will provide my UI configuration. Link to comment
Klimczak.Jan Posted January 18, 2018 Author Share Posted January 18, 2018 On 17.01.2018 at 8:21 AM, Klimczak.Jan said: I do tests with widgets_00 sample from US (Interface section). Tommorow I will provide my UI configuration. As I see in SDK 2.6.1.1 there is progress and may it works correctly. I need to do more tests to check it. I will try to do it next week. Here is my code to test WindowsTouch SDK APLI for button: WidgetLabel label = NULL; int switch_text = 0; void init() { Gui gui = engine.getGui(); WidgetWindow window = new WidgetWindow(gui, "Touch tests"); window.setWidth(800); window.setHeight(600); window.setSizeable(1); WidgetVBox box = new WidgetVBox(gui); WidgetButton buttonGUI_CHANGED = new WidgetButton(gui, "GUI_CHANGED"); WidgetButton buttonGUI_CLICKED = new WidgetButton(gui, "GUI_CLICKED"); WidgetButton buttonGUI_DOUBLE_CLICKED = new WidgetButton(gui, "GUI_DOUBLE_CLICKED"); WidgetButton buttonGUI_DRAG_DROP = new WidgetButton(gui, "GUI_DRAG_DROP"); WidgetButton buttonGUI_DRAG_MOVE = new WidgetButton(gui, "GUI_DRAG_MOVE"); WidgetButton buttonGUI_ENTER = new WidgetButton(gui, "GUI_ENTER"); WidgetButton buttonGUI_FOCUS_IN = new WidgetButton(gui, "GUI_FOCUS_IN"); WidgetButton buttonGUI_FOCUS_OUT = new WidgetButton(gui, "GUI_FOCUS_OUT"); WidgetButton buttonGUI_KEY_PRESSED = new WidgetButton(gui, "GUI_KEY_PRESSED"); WidgetButton buttonGUI_LEAVE = new WidgetButton(gui, "GUI_LEAVE"); WidgetButton buttonGUI_PRESSED = new WidgetButton(gui, "GUI_PRESSED"); WidgetButton buttonGUI_RELEASED = new WidgetButton(gui, "GUI_RELEASED"); buttonGUI_CHANGED.setCallback(GUI_CHANGED,"button_clicked","GUI_CHANGED"); buttonGUI_CLICKED.setCallback(GUI_CLICKED,"button_clicked","GUI_CLICKED"); buttonGUI_DOUBLE_CLICKED.setCallback(GUI_DOUBLE_CLICKED,"button_clicked","GUI_DOUBLE_CLICKED"); buttonGUI_DRAG_DROP.setCallback(GUI_DRAG_DROP,"button_clicked","GUI_DRAG_DROP"); buttonGUI_DRAG_MOVE.setCallback(GUI_DRAG_MOVE,"button_clicked","GUI_DRAG_MOVE"); buttonGUI_ENTER.setCallback(GUI_ENTER,"button_clicked","GUI_ENTER"); buttonGUI_FOCUS_IN.setCallback(GUI_FOCUS_IN,"button_clicked","GUI_FOCUS_IN"); buttonGUI_FOCUS_OUT.setCallback(GUI_FOCUS_OUT,"button_clicked","GUI_FOCUS_OUT"); buttonGUI_KEY_PRESSED.setCallback(GUI_KEY_PRESSED,"button_clicked","GUI_KEY_PRESSED"); buttonGUI_LEAVE.setCallback(GUI_LEAVE,"button_clicked","GUI_LEAVE"); buttonGUI_PRESSED.setCallback(GUI_PRESSED,"button_clicked","GUI_PRESSED"); buttonGUI_RELEASED.setCallback(GUI_RELEASED,"button_clicked","GUI_RELEASED"); label = new WidgetLabel(gui, "Label"); box.addChild(buttonGUI_CHANGED); box.addChild(buttonGUI_CLICKED); box.addChild(buttonGUI_DOUBLE_CLICKED); box.addChild(buttonGUI_DRAG_DROP); box.addChild(buttonGUI_DRAG_MOVE); box.addChild(buttonGUI_ENTER); box.addChild(buttonGUI_FOCUS_IN); box.addChild(buttonGUI_FOCUS_OUT); box.addChild(buttonGUI_KEY_PRESSED); box.addChild(buttonGUI_LEAVE); box.addChild(buttonGUI_PRESSED); box.addChild(buttonGUI_RELEASED); box.addChild(label); window.addChild(box); window.arrange(); gui.addChild(window, ALIGN_OVERLAP | ALIGN_CENTER); } void button_clicked(string text) { log.message("Action: %s \n", text); if (switch_text) { label.setText("O: " + text); switch_text = 0; } else { label.setText("P: " + text); switch_text = 1; } } Link to comment
Recommended Posts