From cf7b050680e4be7161bc761f1ae322de042e5776 Mon Sep 17 00:00:00 2001 From: vladest Date: Sat, 21 Oct 2017 20:47:56 +0200 Subject: [PATCH] Sound cues for GoTo interface --- interface/resources/qml/hifi/Card.qml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/hifi/Card.qml b/interface/resources/qml/hifi/Card.qml index 678245910b..fc7b8c6200 100644 --- a/interface/resources/qml/hifi/Card.qml +++ b/interface/resources/qml/hifi/Card.qml @@ -14,6 +14,8 @@ import Hifi 1.0 import QtQuick 2.5 import QtGraphicalEffects 1.0 +import TabletScriptingInterface 1.0 + import "toolbars" import "../styles-uit" @@ -243,9 +245,15 @@ Item { MouseArea { anchors.fill: parent; acceptedButtons: Qt.LeftButton; - onClicked: goFunction("hifi://" + hifiUrl); + onClicked: { + tabletInterface.playSound(TabletEnums.ButtonClick); + goFunction("hifi://" + hifiUrl); + } hoverEnabled: true; - onEntered: hoverThunk(); + onEntered: { + tabletInterface.playSound(TabletEnums.ButtonHover); + hoverThunk(); + } onExited: unhoverThunk(); } StateImage { @@ -261,6 +269,7 @@ Item { } } function go() { + tabletInterface.playSound(TabletEnums.ButtonClick); goFunction(drillDownToPlace ? ("/places/" + placeName) : ("/user_stories/" + storyId)); } MouseArea {