Search the Community
Showing results for tags 'event'.
-
widgetbutton В 2.18 версии отсутствует метод addCallback в WidgetButton, устаревшая документация
Nehuhry posted a topic in Documentation
Добрый вечер! В документации на WidgetButton устаревшая информация. Вызов привязки обработчика события клика на кнопку теперь выглядит таким образом: Было: m_btn->addCallback(Gui::CLICKED, MakeCallback(onButtonClicked)); Стало: m_btn->getEventClicked().connect(this, &BaseHUD::onButtonClicked); -
Hi, when multiple ObjectGui Objects are visible in my viewport the click event will not be executed anymore or very sporadic when I click on a widget which has a callback function. When only one ObjectGui is visible it works fine. Is this a bug or did I miss something. Thank you for your help. Sebastian
-
Hi Forum Not sure where to start on this one. I am building a new toolbar to aid productivity in building worlds, one of the processes is a quick 'Add Node' that will repeatedly add a particular node, with particular scale and rotation parameters, at the location on the terrain that the user clicks on. I cant seem to find where to begin on this? I was expecting to be able to add a click event to the terrain node, but that may not be how it works Any pointers, once again, appreciated. Paul
-
Hi all, I want to create a screen keyboard for desktop touch devices. Because I want it to be multiplatform (Win, Linux and OSX) and skinable my first intention it's to make it completely in UnigineScript. The idea is, every time a key sprite is pressed, inject the corrensponding key event. the problem is engine.app.setKeyState doesn't accept other keys but APP_KEY_*. There is any other way to inject key events to the application? Thanks in advance.
-
Sorry for the stupid question, please give me some advice. I need to simulate the situation of dropping items from inventory to the game environment. By what event can we define this action? thanks in advance
-
A bug with the order of events on the stack for GUI ... Gui gui = engine.getGui(); WidgetButton btn1 = new WidgetButton(gui, "Button 1"); btn1.setCallback( GUI_ENTER, "onEnter", 1 ); btn1.setCallback( GUI_LEAVE, "onLeave", 1 ); gui.addChild(btn1); WidgetButton btn2 = new WidgetButton(gui, "Button 2"); btn2.setCallback( GUI_ENTER, "onEnter", 2 ); btn2.setCallback( GUI_LEAVE, "onLeave", 2 ); gui.addChild(btn2); ... void onEnter( int id ) { log.message("onEnter( 'Button %d' )\n", id); } void onLeave( int id ) { log.message("onLeave( 'Button %d' )\n", id); } Please see the result in the attached picture. OrderEvent.rar
-
[SOLVED] How to make sure not to miss the event Widget-children?
vita_de posted a topic in UI Systems
Привет, об этом вопросе я уже писал https://developer.unigine.com/forum/topic/1692-error-or-not-event-button-higher-than-the-window/, но решение я так и не нашел. Подскажите, кто сталкивался и смог решить эту проблему. Как сделать так, чтобы не пролетали события у Widget-детей? Как добиться нормального работы WidgetVBox+WidgetSprite, схожей по работе с WidgetWindow? Спасибо. ===================== translation from google ===================== Hi, The question has long been https://developer.unigine.com/forum/topic/1692-error-or-not-event-button-higher-than-the-window/. But the decision, I did not find one. Help. How to make sure not to miss the event Widget-children? How to ensure the normal operation WidgetVBox + WidgetSprite, like WidgetWindow? Thank you.