History

Merge pull request #15201 from SamGondelman/emit

Case 21756: Entities.emitScriptEvent works now

Sam Gondelman committed 7 years ago

Commit 40f5a022 parents 385970c d4e1ec98 files · +21 −12Browse files

Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all

Unified · Split

interface/src/Application.cpp+7−0
@@ -1985,6 +1985,13 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1984 unmodified lines
19851985 return nullptr;
19861986 });
19871987
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+
19881995 EntityTree::setTextSizeOperator([this](const QUuid& id, const QString& text) {
19891996 auto entities = getEntities();
19901997 if (auto entity = entities->renderableForEntityId(id)) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t