muslaev.ilya Posted March 14, 2019 Share Posted March 14, 2019 Hello, I'm using AppWall and MOUSE_SOFT. I have two gui pointers gui_prim and gui_sec. I trying to create a dialog in runtime. For simplifying problem, i use WidgetWindow in example. I have three different types of behavior. 1 - I create window in primary gui and then attach window to it: WidgetWindowPtr wnd = WidgetWindow::create(gui_prim, "test window"); gui_prim->addChild(wnd->getWidget(), Gui::ALIGN_OVERLAP | Gui::ALIGN_CENTER); wnd->release(); Everything works correct. Widget is created in the center of left screen, and overlaps any element. 2 - Create in prim or sec (same bahavior), attach to sec Window appears in the center of a right screen, but if i click at any widget, i can interact with (edittext, scrollbox, etc), window moves under it. 3 - Create in sec, add in prim If i move window over edittext, editline etc - ok, but if i move window over scrollbox and click on it (on window), it stopes to interact with mouse, but stil renders over scrollbox. wnd->setPermanentFocus(); doesn't help Thank you. Link to comment
morbid Posted March 15, 2019 Share Posted March 15, 2019 Hello Ilya, we checked these cases and everything seemed to work fine. Maybe we missed some point? May I ask you to send us a test scene? Thanks. 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
muslaev.ilya Posted March 27, 2019 Author Share Posted March 27, 2019 (edited) Hello, I made a simple example with this error. When I create wdt_edittext in gui_sec - everything works correct, but if i create it in gui_prim - wdt_edittext overlaps dialog. I have to create it in gui_prim, because in my actual programm i use UI-file. Command arguments are -data_path ../ -engine_config "../data/Test_gui/unigine.cfg" -console_command "" -width 2 -height 1 -extern_plugin "AppWall" -extern_define MOUSE_SOFT PS: i have modified version of AppWall.cpp see AppSystemLogic.cpp AppSystemLogic.h Edited March 27, 2019 by muslaev.ilya Link to comment
morbid Posted March 27, 2019 Share Posted March 27, 2019 Hi, thanks for the sample. All issues are caused by unusual usage of widgets and gui. If you'll create a widget in the same gui it'll work as expected. This code works fine: wdt_edittext = WidgetEditText::create(gui_sec); wdt_edittext->setHeight(400); wdt_edittext->setWidth(500); gui_sec->addChild(wdt_edittext->getWidget(), Gui::ALIGN_CENTER | Gui::ALIGN_OVERLAP); This one isn't: wdt_edittext = WidgetEditText::create(gui_prim); wdt_edittext->setHeight(400); wdt_edittext->setWidth(500); gui_sec->addChild(wdt_edittext->getWidget(), Gui::ALIGN_CENTER | Gui::ALIGN_OVERLAP); Could this be a typo or you're doing this on purpose? Thanks. 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
muslaev.ilya Posted March 28, 2019 Author Share Posted March 28, 2019 I'm doing this on purpose, because in my program i using UI file. So i create UserInterfacePtr in gui_prim, but attach widgets in different monitors (gui). ui_file = UserInterface::create(gui_prim, "Interface.ui"); wdt_hbox_prim = WidgetHBox::cast(ui_file->getWidget(ui_file->findWidget("hbox_prim"))); gui_prim->addChild(wdt_hbox_prim->getWidget(), Gui::ALIGN_OVERLAP); wdt_vbox_sec = WidgetVBox::cast(ui_file->getWidget(ui_file->findWidget("vbox_sec"))); gui_sec->addChild(wdt_vbox_sec->getWidget()); Is the only way is to create a different ui file for each monitor? Link to comment
morbid Posted March 29, 2019 Share Posted March 29, 2019 21 hours ago, muslaev.ilya said: Is the only way is to create a different ui file for each monitor? Yes, it wouldn't work otherwise. Widget created in gui_prime is added to the main v_box and can't be transferred to the gui_sec v_box. Thanks. 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
muslaev.ilya Posted April 1, 2019 Author Share Posted April 1, 2019 Thank you. It works. Link to comment
Recommended Posts