diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 090cdd52b6..4b62e1d221 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3562,6 +3562,7 @@ void Application::setupQmlSurface(QQmlContext* surfaceContext, bool setAdditiona surfaceContext->setContextProperty("WalletScriptingInterface", DependencyManager::get().data()); surfaceContext->setContextProperty("ResourceRequestObserver", DependencyManager::get().data()); surfaceContext->setContextProperty("PlatformInfo", PlatformInfoScriptingInterface::getInstance()); + surfaceContext->setContextProperty("module", ""); } } diff --git a/interface/src/ui/InteractiveWindow.cpp b/interface/src/ui/InteractiveWindow.cpp index e1f89ef558..9145b12d30 100644 --- a/interface/src/ui/InteractiveWindow.cpp +++ b/interface/src/ui/InteractiveWindow.cpp @@ -225,6 +225,7 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap QObject::connect(_dockWidget.get(), SIGNAL(onResizeEvent()), this, SLOT(emitMainWindowResizeEvent())); _dockWidget->setSource(QUrl(sourceUrl)); + _dockWidget->setObjectName("DockedWidget"); mainWindow->addDockWidget(dockArea, _dockWidget.get()); } else { auto offscreenUi = DependencyManager::get(); @@ -283,6 +284,7 @@ InteractiveWindow::InteractiveWindow(const QString& sourceUrl, const QVariantMap if (!KNOWN_SCHEMES.contains(sourceURL.scheme(), Qt::CaseInsensitive)) { sourceURL = QUrl::fromLocalFile(sourceURL.toString()).toString(); } + object->setObjectName("InteractiveWindow"); object->setProperty(SOURCE_PROPERTY, sourceURL); }); } diff --git a/scripts/simplifiedUI/simplifiedEmote/emojiApp/resources/modules/customEmojiList.js b/scripts/simplifiedUI/simplifiedEmote/emojiApp/resources/modules/customEmojiList.js index 1f58dd608f..c1857bbafa 100644 --- a/scripts/simplifiedUI/simplifiedEmote/emojiApp/resources/modules/customEmojiList.js +++ b/scripts/simplifiedUI/simplifiedEmote/emojiApp/resources/modules/customEmojiList.js @@ -8,10 +8,7 @@ var customEmojiList = [ ] } ] -try { - if (module) { - module.exports = customEmojiList; - } -} catch (e) { - console.log("error exporting:\n", e); + +if (module.exports) { + module.exports = customEmojiList; } \ No newline at end of file diff --git a/scripts/simplifiedUI/simplifiedEmote/emojiApp/resources/modules/emojiList.js b/scripts/simplifiedUI/simplifiedEmote/emojiApp/resources/modules/emojiList.js index fd7fd6f7ff..163082ca5d 100644 --- a/scripts/simplifiedUI/simplifiedEmote/emojiApp/resources/modules/emojiList.js +++ b/scripts/simplifiedUI/simplifiedEmote/emojiApp/resources/modules/emojiList.js @@ -38734,10 +38734,7 @@ var emojiList = [ } } ] -try { - if (module) { - module.exports = emojiList; - } -} catch (e) { - console.log("error exporting:\n", e); + +if (module.exports) { + module.exports = emojiList; } \ No newline at end of file diff --git a/scripts/simplifiedUI/simplifiedEmote/emojiApp/simplifiedEmoji.js b/scripts/simplifiedUI/simplifiedEmote/emojiApp/simplifiedEmoji.js index 0f901ef829..5b17f311a3 100644 --- a/scripts/simplifiedUI/simplifiedEmote/emojiApp/simplifiedEmoji.js +++ b/scripts/simplifiedUI/simplifiedEmote/emojiApp/simplifiedEmoji.js @@ -102,7 +102,6 @@ function startTimeoutDelete() { // The QML has a property called archEnd on the pie chart that controls how much pie is showing -var COUNT_DOWN_INTERVAL_MS = 100; function beginCountDownTimer() { _this._avimojiQMLWindow.sendToQml({ "source": "simplifiedEmoji.js", @@ -128,9 +127,9 @@ function resetEmojis() { clearCountDownTimerHandler(); if (currentEmoji) { Entities.deleteEntity(currentEmoji); - currentEmoji = false; - selectedEmojiFilename = null; } + currentEmoji = false; + selectedEmojiFilename = null; } @@ -360,11 +359,11 @@ function playPopAnimation() { Entities.editEntity(currentEmoji, {"dimensions": dimensions}); } } else { - // make sure there is a currentEmoji entity before trying to delete + pruneOldAvimojis(); if (currentEmoji) { Entities.deleteEntity(currentEmoji); - currentEmoji = false; } + currentEmoji = false; finalInPopScale = null; selectedEmojiFilename = null; clearCountDownTimerHandler(); diff --git a/scripts/simplifiedUI/simplifiedEmote/emojiApp/ui/qml/SimplifiedEmoji.qml b/scripts/simplifiedUI/simplifiedEmote/emojiApp/ui/qml/SimplifiedEmoji.qml index c27c3392ab..dd78b8fe09 100644 --- a/scripts/simplifiedUI/simplifiedEmote/emojiApp/ui/qml/SimplifiedEmoji.qml +++ b/scripts/simplifiedUI/simplifiedEmote/emojiApp/ui/qml/SimplifiedEmoji.qml @@ -31,6 +31,9 @@ Rectangle { // if this is true, then hovering doesn't allow showing other icons property bool isSelected: false + KeyNavigation.backtab: emojiSearchTextField + KeyNavigation.tab: emojiSearchTextField + // Update the selected emoji image whenever the code property is changed. onCurrentCodeChanged: { mainEmojiImage.source = emojiBaseURL + currentCode; @@ -209,6 +212,18 @@ Rectangle { } } } + + // If this MouseArea is hit, the user is clicking on an area not handled + // by any other MouseArea + MouseArea { + anchors.fill: parent + onClicked: { + // The grid will forward keypresses to the main Interface window + grid.forceActiveFocus(); + // Necessary to get keyboard keyPress/keyRelease forwarding to work. See `Application::hasFocus()`; + Window.setFocus(); + } + } Rectangle { id: emojiIndicatorContainer @@ -302,6 +317,7 @@ Rectangle { MouseArea { hoverEnabled: enabled anchors.fill: parent + propagateComposedEvents: false onEntered: { grid.currentIndex = index // don't allow a hover image change of the main emoji image @@ -313,6 +329,10 @@ Rectangle { } onClicked: { root.selectEmoji(model.code.utf); + // The grid will forward keypresses to the main Interface window + grid.forceActiveFocus(); + // Necessary to get keyboard keyPress/keyRelease forwarding to work. See `Application::hasFocus()`; + Window.setFocus(); } } } @@ -330,6 +350,10 @@ Rectangle { if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { root.selectEmoji(grid.model.get(grid.currentIndex).code.utf); } + root.keyPressEvent(event.key, event.modifiers); + } + Keys.onReleased: { + root.keyReleaseEvent(event.key, event.modifiers); } } @@ -429,6 +453,7 @@ Rectangle { id: attributionMouseArea hoverEnabled: enabled anchors.fill: parent + propagateComposedEvents: false onClicked: { popupContainer.visible = true; } @@ -458,8 +483,15 @@ Rectangle { } } - - signal sendToScript(var message); + signal sendToScript(var message) + signal keyPressEvent(int key, int modifiers) + signal keyReleaseEvent(int key, int modifiers) + Keys.onPressed: { + root.keyPressEvent(event.key, event.modifiers); + } + Keys.onReleased: { + root.keyReleaseEvent(event.key, event.modifiers); + } function fromScript(message) { if (message.source !== "simplifiedEmoji.js") { diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/01.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/01.wav index d1d587c6c9..b4baa2888a 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/01.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/01.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/02.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/02.wav index b649b32949..21cbf3fa4a 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/02.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/02.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/03.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/03.wav index 86b9ca6934..bc5d35760d 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/03.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/03.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/04.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/04.wav index 771a2aea94..cacaf44b6e 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/04.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/04.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/05.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/05.wav index 9e3af9e7a0..ffb688b5b2 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/05.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/05.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/06.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/06.wav index 4be2c1bd3c..81716f26be 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/06.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/06.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/07.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/07.wav index cc10e2277e..4c20ceba2c 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/07.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/07.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/08.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/08.wav index 33dae0ece1..c39e4b1dfc 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/08.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/08.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/09.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/09.wav index 15e1876839..791433c024 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/09.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/09.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/10.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/10.wav index c22e1035f7..b359475b51 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/10.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/10.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/11.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/11.wav index 5a975c23eb..40b8415725 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/11.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/11.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/12.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/12.wav index eff5edbf81..68656f7c21 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/12.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/12.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/13.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/13.wav index 091090ff68..e6a716ccdd 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/13.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/13.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/14.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/14.wav index 8b1f842c75..a5e8b5ad49 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/14.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/14.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/15.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/15.wav index 45e4410e2d..7f3072e3e0 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/15.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/15.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/16.wav b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/16.wav index 2e5bf8a6ba..f76bee0429 100644 Binary files a/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/16.wav and b/scripts/simplifiedUI/simplifiedEmote/resources/sounds/claps/16.wav differ diff --git a/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js b/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js index 2b7681d28e..d4044218fc 100644 --- a/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js +++ b/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js @@ -127,14 +127,51 @@ function getSounds() { } +// Returns the first valid joint position from the list of supplied test joint positions. +// If none are valid, returns MyAvatar.position. +function getValidJointPosition(jointsToTest) { + var currentJointIndex; + + for (var i = 0; i < jointsToTest.length; i++) { + currentJointIndex = MyAvatar.getJointIndex(jointsToTest[i]); + + if (currentJointIndex > -1) { + return MyAvatar.getJointPosition(jointsToTest[i]); + } + } + + return Vec3.sum(MyAvatar.position, Vec3.multiply(0.25, Quat.getForward(MyAvatar.orientation))); +} + + +// Returns the world position halfway between the user's hands +var HALF = 0.5; +function getClapPosition() { + var validLeftJoints = ["LeftHandMiddle2", "LeftHand", "LeftArm"]; + var leftPosition = getValidJointPosition(validLeftJoints); + + var validRightJoints = ["RightHandMiddle2", "RightHand", "RightArm"];; + var rightPosition = getValidJointPosition(validRightJoints); + + var centerPosition = Vec3.sum(leftPosition, rightPosition); + centerPosition = Vec3.multiply(centerPosition, HALF); + + return centerPosition; +} + + var clapSoundInterval = false; -var CLAP_SOUND_INTERVAL_MS = 260; // Must match the clap animation interval +var CLAP_SOUND_INTERVAL_MS_FLOOR = 260; +var CLAP_SOUND_INTERVAL_MS_CEIL = 320; function startClappingSounds() { maybeClearClapSoundInterval(); + // Compute a random clap sound interval to avoid strange echos between many people clapping simultaneously + var clapSoundIntervalMS = Math.floor(randomFloat(CLAP_SOUND_INTERVAL_MS_FLOOR, CLAP_SOUND_INTERVAL_MS_CEIL)); + clapSoundInterval = Script.setInterval(function() { - playSound(clapSounds[Math.floor(Math.random() * clapSounds.length)], MyAvatar.position, true); - }, CLAP_SOUND_INTERVAL_MS); + playSound(clapSounds[Math.floor(Math.random() * clapSounds.length)], getClapPosition(), true); + }, clapSoundIntervalMS); } @@ -151,10 +188,8 @@ function toggleReaction(reaction) { if (reactionEnding) { endReactionWrapper(reaction); - updateEmoteIndicatorIcon("images/emote_Icon.svg"); } else { beginReactionWrapper(reaction); - updateEmoteIndicatorIcon("images/" + reaction + "_Icon.svg"); } } @@ -169,6 +204,8 @@ function beginReactionWrapper(reaction) { if (MyAvatar.beginReaction(reaction)) { reactionsBegun.push(reaction); } + + updateEmoteIndicatorIcon("images/" + reaction + "_Icon.svg"); // Insert reaction-specific logic here: switch (reaction) { @@ -235,10 +272,10 @@ function mouseMoveEvent(event) { Entities.editEntity(pointReticle, { position: reticlePosition }); } else if (reticlePosition) { pointReticle = Entities.addEntity({ - type: "Sphere", + type: "Box", name: "Point Reticle", position: reticlePosition, - dimensions: { x: 0.1, y: 0.1, z: 0.1 }, + dimensions: { x: 0.075, y: 0.075, z: 0.075 }, color: { red: 255, green: 0, blue: 0 }, collisionless: true, ignorePickIntersection: true, @@ -275,6 +312,8 @@ function endReactionWrapper(reaction) { reactionsBegun.splice(reactionsBegunIndex, 1); } } + + updateEmoteIndicatorIcon("images/emote_Icon.svg"); // Insert reaction-specific logic here: switch (reaction) { @@ -301,19 +340,35 @@ function onMessageFromEmoteAppBar(message) { } switch (message.method) { case "positive": + if (!message.data.isPressingAndHolding) { + return; + } triggerReactionWrapper("positive"); - updateEmoteIndicatorIcon("images/" + message.method + "_Icon.svg"); break; case "negative": + if (!message.data.isPressingAndHolding) { + return; + } triggerReactionWrapper("negative"); - updateEmoteIndicatorIcon("images/" + message.method + "_Icon.svg"); break; - case "raiseHand": case "applaud": + if (message.data.isPressingAndHolding) { + beginReactionWrapper(message.method); + } else { + endReactionWrapper(message.method); + } + break; case "point": + case "raiseHand": + if (!message.data.isPressingAndHolding) { + return; + } toggleReaction(message.method); break; case "toggleEmojiApp": + if (!message.data.isPressingAndHolding) { + return; + } toggleEmojiApp(); break; default: @@ -363,8 +418,8 @@ function onWindowMinimizedChanged(isMinimized) { // for the tooltips to match the actual keys. var POSITIVE_KEY = "z"; var NEGATIVE_KEY = "x"; -var RAISE_HAND_KEY = "c"; -var APPLAUD_KEY = "v"; +var APPLAUD_KEY = "c"; +var RAISE_HAND_KEY = "v"; var POINT_KEY = "b"; var EMOTE_WINDOW = "f"; function keyPressHandler(event) { @@ -383,7 +438,7 @@ function keyPressHandler(event) { toggleReaction("applaud"); } else if (event.text === POINT_KEY) { toggleReaction("point"); - } else if (event.text === EMOTE_WINDOW) { + } else if (event.text === EMOTE_WINDOW && !(Settings.getValue("io.highfidelity.isEditing", false))) { toggleEmojiApp(); } } @@ -392,18 +447,10 @@ function keyPressHandler(event) { function keyReleaseHandler(event) { if (!event.isAutoRepeat) { - if (event.text === RAISE_HAND_KEY) { - if (reactionsBegun.indexOf("raiseHand") > -1) { - toggleReaction("raiseHand"); - } - } else if (event.text === APPLAUD_KEY) { + if (event.text === APPLAUD_KEY) { if (reactionsBegun.indexOf("applaud") > -1) { toggleReaction("applaud"); } - } else if (event.text === POINT_KEY) { - if (reactionsBegun.indexOf("point") > -1) { - toggleReaction("point"); - } } } } @@ -657,7 +704,6 @@ var EMOJI_APP_WINDOW_FLAGS = 0x00000001 | // Qt::Window 0x00008000 | // Qt::WindowMaximizeButtonHint 0x00004000; // Qt::WindowMinimizeButtonHint var emojiAppWindow = false; -var POPOUT_SAFE_MARGIN_X = 30; var POPOUT_SAFE_MARGIN_Y = 30; var emojiAppWindowSignalsConnected = false; function toggleEmojiApp() { @@ -678,7 +724,7 @@ function toggleEmojiApp() { y: EMOJI_APP_HEIGHT_PX }, position: { - x: Math.max(Window.x + POPOUT_SAFE_MARGIN_X, Window.x + Window.innerWidth / 2 - EMOJI_APP_WIDTH_PX / 2), + x: Window.x + EMOTE_APP_BAR_LEFT_MARGIN, y: Math.max(Window.y + POPOUT_SAFE_MARGIN_Y, Window.y + Window.innerHeight / 2 - EMOJI_APP_HEIGHT_PX / 2) }, overrideFlags: EMOJI_APP_WINDOW_FLAGS diff --git a/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml b/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml index 58b4efe444..9d0cb3a222 100644 --- a/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml +++ b/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml @@ -171,8 +171,8 @@ Rectangle { id: buttonsModel ListElement { imageURL: "images/positive_Icon.svg"; hotkey: "Z"; method: "positive" } ListElement { imageURL: "images/negative_Icon.svg"; hotkey: "X"; method: "negative" } - ListElement { imageURL: "images/raiseHand_Icon.svg"; hotkey: "C"; method: "raiseHand" } - ListElement { imageURL: "images/applaud_Icon.svg"; hotkey: "V"; method: "applaud" } + ListElement { imageURL: "images/applaud_Icon.svg"; hotkey: "C"; method: "applaud" } + ListElement { imageURL: "images/raiseHand_Icon.svg"; hotkey: "V"; method: "raiseHand" } ListElement { imageURL: "images/point_Icon.svg"; hotkey: "B"; method: "point" } ListElement { imageURL: "images/emote_Icon.svg"; hotkey: "F"; method: "toggleEmojiApp" } } @@ -211,7 +211,7 @@ Rectangle { opacity: 0.8 radius: 4 - HifiStylesUit.GraphikRegular { + HifiStylesUit.GraphikSemiBold { id: toolTipText anchors.left: parent.left anchors.leftMargin: 2 @@ -222,7 +222,7 @@ Rectangle { verticalAlignment: TextInput.AlignBottom horizontalAlignment: TextInput.AlignLeft color: simplifiedUI.colors.text.white - size: 22 + size: 20 } } @@ -230,17 +230,37 @@ Rectangle { id: emoteTrayMouseArea anchors.fill: parent hoverEnabled: true - onClicked: { - Tablet.playSound(TabletEnums.ButtonClick); - sendToScript({ - "source": "EmoteAppBar.qml", - "method": model.method - }); - } onEntered: { Tablet.playSound(TabletEnums.ButtonHover); } + + onPressed: { + Tablet.playSound(TabletEnums.ButtonClick); + sendToScript({ + "source": "EmoteAppBar.qml", + "method": model.method, + "data": { "isPressingAndHolding": true } + }); + } + + onReleased: { + sendToScript({ + "source": "EmoteAppBar.qml", + "method": model.method, + "data": { "isPressingAndHolding": false } + }); + } + + onExited: { + if (pressed) { + sendToScript({ + "source": "EmoteAppBar.qml", + "method": model.method, + "data": { "isPressingAndHolding": false } + }); + } + } } } }