Case 21756: Entities.emitScriptEvent works now
Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all
Unified · Split
| @@ -1985,6 +1985,13 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1984 unmodified lines | |||
| 1985 | return nullptr; | 1985 | return nullptr; |
| 1986 | }); | 1986 | }); |
| 1987 | 1987 | ||
| 1988 | EntityTree::setEmitScriptEventOperator([this](const QUuid& id, const QVariant& message) { | ||
| 1989 | auto entities = getEntities(); | ||
| 1990 | if (auto entity = entities->renderableForEntityId(id)) { | ||
| 1991 | entity->emitScriptEvent(message); | ||
| 1992 | } | ||
| 1993 | }); | ||
| 1994 | |||
| 1988 | EntityTree::setTextSizeOperator([this](const QUuid& id, const QString& text) { | 1995 | EntityTree::setTextSizeOperator([this](const QUuid& id, const QString& text) { |
| 1989 | auto entities = getEntities(); | 1996 | auto entities = getEntities(); |
| 1990 | if (auto entity = entities->renderableForEntityId(id)) { | 1997 | if (auto entity = entities->renderableForEntityId(id)) { |