Amerio.Stephane Posted January 17, 2023 Share Posted January 17, 2023 (edited) Hi With the new window manager, you can stack/group multiple windows together. That is great! But when grouping two windows with the mouse, the newly created group window has the default Unigine icon and the title "UNIGINE Window". Is there a callback or a setting we can use to set the title and icon of dynamically created group window? Thanks! Edited January 17, 2023 by Amerio.Stephane 1 Link to comment
karpych11 Posted January 17, 2023 Share Posted January 17, 2023 Hello, You can use CALLBACKS_WINDOWS_STACKED from the window manager. Two grouped windows will be passed to this callback. Here is a small example: void on_stack(EngineWindowPtr w0, EngineWindowPtr w1) { EngineWindowPtr group = w0->getParentGroup(); group->setTitle(String::format("Group: %s and %s", w0->getTitle(), w1->getTitle())); // and set icon: group->setIcon(new_icon); } int AppSystemLogic::init() { EngineWindow::create("Window 0", 512, 256, EngineWindow::FLAGS_SHOWN); EngineWindow::create("Window 1", 512, 256, EngineWindow::FLAGS_SHOWN); WindowManager::addCallback(WindowManager::CALLBACKS_WINDOWS_STACKED, MakeCallback(on_stack)); return 1; } 3 Link to comment
Recommended Posts