Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 6 files). Show all
Unified · Split
| @@ -58,7 +58,7 @@ EntityScriptingInterface::EntityScriptingInterface(bool bidOnSimulationOwnership · 57 unmodified lines | |||
| 58 | connect(nodeList.data(), &NodeList::canWriteAssetsChanged, this, &EntityScriptingInterface::canWriteAssetsChanged); | 58 | connect(nodeList.data(), &NodeList::canWriteAssetsChanged, this, &EntityScriptingInterface::canWriteAssetsChanged); |
| 59 | 59 | ||
| 60 | // If the user clicks somewhere where there is no entity at all, we will release focus | 60 | // If the user clicks somewhere where there is no entity at all, we will release focus |
| 61 | connect(this, &EntityScriptingInterface::mousePressOffEntity, [=]() { | 61 | connect(this, &EntityScriptingInterface::mousePressOffEntity, [this]() { |
| 62 | setKeyboardFocusEntity(UNKNOWN_ENTITY_ID); | 62 | setKeyboardFocusEntity(UNKNOWN_ENTITY_ID); |
| 63 | }); | 63 | }); |
| 64 | 64 | ||
| @@ -2160,18 +2160,8 @@ QUuid EntityScriptingInterface::getKeyboardFocusEntity() const { · 2095 unmodified lines | |||
| 2160 | return result; | 2160 | return result; |
| 2161 | } | 2161 | } |
| 2162 | 2162 | ||
| 2163 | void EntityScriptingInterface::setKeyboardFocusEntity(const EntityItemID& id) { | 2163 | void EntityScriptingInterface::setKeyboardFocusEntity(const QUuid& id) { |
| 2164 | QMetaObject::invokeMethod(qApp, "setKeyboardFocusEntity", Qt::DirectConnection, Q_ARG(EntityItemID, id)); | 2164 | QMetaObject::invokeMethod(qApp, "setKeyboardFocusEntity", Qt::DirectConnection, Q_ARG(const QUuid&, id)); |
| 2165 | } | ||
| 2166 | |||
| 2167 | QUuid EntityScriptingInterface::getKeyboardFocusLocalEntity() const { | ||
| 2168 | QUuid result; | ||
| 2169 | QMetaObject::invokeMethod(qApp, "getKeyboardFocusLocalEntity", Qt::DirectConnection, Q_RETURN_ARG(QUuid, result)); | ||
| 2170 | return result; | ||
| 2171 | } | ||
| 2172 | |||
| 2173 | void EntityScriptingInterface::setKeyboardFocusLocalEntity(const EntityItemID& id) { | ||
| 2174 | QMetaObject::invokeMethod(qApp, "setKeyboardFocusLocalEntity", Qt::DirectConnection, Q_ARG(EntityItemID, id)); | ||
| 2175 | } | 2165 | } |
| 2176 | 2166 | ||
| 2177 | void EntityScriptingInterface::sendMousePressOnEntity(const EntityItemID& id, const PointerEvent& event) { | 2167 | void EntityScriptingInterface::sendMousePressOnEntity(const EntityItemID& id, const PointerEvent& event) { |