Showing the changes to interface/src/Application.cpp (1 of 9 files). Show all
Unified · Split
| @@ -1884,6 +1884,16 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1883 unmodified lines | |||
| 1884 | } | 1884 | } |
| 1885 | } | 1885 | } |
| 1886 | }); | 1886 | }); |
| 1887 | connect(&_overlays, &Overlays::mousePressOnOverlay, [this](const QUuid& id, const PointerEvent& event) { | ||
| 1888 | if (event.shouldFocus()) { | ||
| 1889 | if (getEntities()->wantsKeyboardFocus(id)) { | ||
| 1890 | setKeyboardFocusLocalEntity(id); | ||
| 1891 | setKeyboardFocusEntity(UNKNOWN_ENTITY_ID); | ||
| 1892 | } else { | ||
| 1893 | setKeyboardFocusLocalEntity(UNKNOWN_ENTITY_ID); | ||
| 1894 | } | ||
| 1895 | } | ||
| 1896 | }); | ||
| 1887 | 1897 | ||
| 1888 | connect(entityScriptingInterface.data(), &EntityScriptingInterface::deletingEntity, [this](const EntityItemID& entityItemID) { | 1898 | connect(entityScriptingInterface.data(), &EntityScriptingInterface::deletingEntity, [this](const EntityItemID& entityItemID) { |
| 1889 | if (entityItemID == _keyboardFocusedEntity.get()) { | 1899 | if (entityItemID == _keyboardFocusedEntity.get()) { |
| @@ -5729,7 +5739,7 @@ void Application::setKeyboardFocusHighlight(const glm::vec3& position, const glm · 3839 unmodified lines | |||
| 5729 | properties.getPulse().setMax(1.0f); | 5739 | properties.getPulse().setMax(1.0f); |
| 5730 | properties.getPulse().setColorMode(PulseMode::IN_PHASE); | 5740 | properties.getPulse().setColorMode(PulseMode::IN_PHASE); |
| 5731 | properties.setIgnorePickIntersection(true); | 5741 | properties.setIgnorePickIntersection(true); |
| 5732 | _keyboardFocusHighlightID = entityScriptingInterface->addEntity(properties, QString("local")); | 5742 | _keyboardFocusHighlightID = entityScriptingInterface->addEntityInternal(properties, entity::HostType::LOCAL); |
| 5733 | } | 5743 | } |
| 5734 | 5744 | ||
| 5735 | // Position focus | 5745 | // Position focus |
| @@ -8760,7 +8770,7 @@ void Application::createLoginDialog() { · 3024 unmodified lines | |||
| 8760 | properties.setVisible(true); | 8770 | properties.setVisible(true); |
| 8761 | 8771 | ||
| 8762 | auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>(); | 8772 | auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>(); |
| 8763 | _loginDialogID = entityScriptingInterface->addEntity(properties, QString("local")); | 8773 | _loginDialogID = entityScriptingInterface->addEntityInternal(properties, entity::HostType::LOCAL); |
| 8764 | 8774 | ||
| 8765 | auto keyboard = DependencyManager::get<Keyboard>().data(); | 8775 | auto keyboard = DependencyManager::get<Keyboard>().data(); |
| 8766 | if (!keyboard->getAnchorID().isNull() && !_loginDialogID.isNull()) { | 8776 | if (!keyboard->getAnchorID().isNull() && !_loginDialogID.isNull()) { |