helmut.bressler Posted February 7, 2018 Share Posted February 7, 2018 (edited) Hello, I have a Widgets::EditLine inside a Widgets::Window window. When running Editor2, the Widget Widgets::EditLine receives keyboard input only if the mouse pointer is outside of the underlying window. Everything works as expected when I run the "launch_release" batch file. Reproduction of that issue is quite easy. Create an empty Unigine Script Project with Editor2 and add the following modifications to the .cpp file: #include <core/systems/widgets/widget.h> #include <core/systems/widgets/widget_window.h> #include <core/systems/widgets/widget_editline.h> Unigine::Widgets::EditLine textBox; int init() { // Write here code to be called on world initialization: initialize resources for your world scene during the world start. using Unigine::Widgets; Window window = new Window("Unigine::Widgets::Window"); window.setWidth(500); window.setHeight(500); window.setSizeable(1); textBox = new EditLine("Unigine::Widgets::EditLine"); window.addChild(textBox, ALIGN_EXPAND); window.arrange(); addChild(window,ALIGN_OVERLAP | ALIGN_CENTER); // here comes everything else, like creating the camera... I believe all the other nice Editor scripts from Editor1 (which are using Unigine::Widgets) are also affected by that issue (we are using the tracker_editor). It would be great if that can be fixed. Cheers Helmut Edit: I have forgotten to mention that I'm using Unigine 2.6.1.1. Edit2: Added missing include file to source code. Edited February 12, 2018 by helmut.bressler Link to comment
sebastianbah Posted February 12, 2018 Share Posted February 12, 2018 Hi Helmut, We've received you sample and invetigated it. Could you please clarify the problem? The problem is: - WidgetEditLine receive keyboard input, only while cursor is outside the WidgetWindow or - keyboard input is working only if the cursor is inside the Engine viewport. I'm afraid, we can't reproduce the first problem on attached sample, but it may be caused by modifications we've added to run the sample (original one contains several errors and do not run as a unigine script sample). .cpp file from our sample is attached. Thanks! Link to comment
helmut.bressler Posted February 12, 2018 Author Share Posted February 12, 2018 Hello, thank you for looking at this issue. And sorry, indeed the line #include <core/systems/widgets/widget_editline.h> was missing. Quote - WidgetEditLine receive keyboard input, only while cursor is outside the WidgetWindow Thats exactly the issue. The code you have attached works also fine for me, but the key difference to my code is, that i'm using the widgest from the Unigine::Widgets namespace. The nice thing about the widgets from Unigine::Widgets is, that they are running in a separate window when the Editor is loaded ( even without including the Interfaces plugin). I guess this is also the source of the problem, because when running in release mode, where all UI elements are rendered into a single window, everything works fine (for both, Unigine::Widgets::EditLine and WidgetEditLine). I have attached now a complete .cpp file, which should reproduce that issue. Btw. I'm using Windows. It could be, that this problem only shows up under Windows. Thank you and cheers Helmut TestText_Editor2.cpp Link to comment
morbid Posted February 15, 2018 Share Posted February 15, 2018 Hello, Helmut! Thank you for feedback! We've reported this problem in our internal tracker. Of course bugfix requiers some time. Is this issue blocking you from further development right now? 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
helmut.bressler Posted February 15, 2018 Author Share Posted February 15, 2018 Hello morbid, No, its not blocking our development. We came accross of that issue because we are using the TrackerEditor class from the Editor (core/systems/tracker/editor/tracker_editor.h), otherwise we are not affected. Thank you and cheers Helmut Link to comment
Recommended Posts