mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge branch 'emojiAppAdd' of github.com:MiladNazeri/hifi into emojiAppAdd
This commit is contained in:
commit
301dca6937
2 changed files with 36 additions and 15 deletions
|
@ -197,13 +197,6 @@ function endReactionWrapper(reaction) {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
MILAD NOTE:
|
||||
Right now you can do more than one reaction at a time so it has to be handled here.
|
||||
I might see about adding a small flag to the engine so that if a reaction is currently playing it will end it.
|
||||
This will cut down on a lot of boiler code below checking to see if another reaction is playing. Also because it doesn't
|
||||
make sense for more than one reaction to be playing.
|
||||
*/
|
||||
var EMOTE_APP_BAR_MESSAGE_SOURCE = "EmoteAppBar.qml";
|
||||
function onMessageFromEmoteAppBar(message) {
|
||||
console.log("MESSAGE From emote app bar: ", JSON.stringify(message));
|
||||
|
@ -213,9 +206,23 @@ function onMessageFromEmoteAppBar(message) {
|
|||
switch (message.method) {
|
||||
case "positive":
|
||||
triggerReactionWrapper("positive");
|
||||
emoteAppBarWindow.sendToQml({
|
||||
"source": "simplifiedEmote.js",
|
||||
"method": "updateEmoteIndicator",
|
||||
"data": {
|
||||
"icon": message.method
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "negative":
|
||||
triggerReactionWrapper("negative");
|
||||
emoteAppBarWindow.sendToQml({
|
||||
"source": "simplifiedEmote.js",
|
||||
"method": "updateEmoteIndicator",
|
||||
"data": {
|
||||
"icon": message.method
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "raiseHand":
|
||||
case "applaud":
|
||||
|
|
|
@ -84,6 +84,8 @@ Rectangle {
|
|||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Row {
|
||||
|
@ -98,12 +100,12 @@ Rectangle {
|
|||
id: emoteButtonsRepeater
|
||||
model: ListModel {
|
||||
id: buttonsModel
|
||||
ListElement { imageURL: "images/positive_Icon.svg"; method: "positive" }
|
||||
ListElement { imageURL: "images/negative_Icon.svg"; method: "negative" }
|
||||
ListElement { imageURL: "images/raiseHand_Icon.svg"; method: "raiseHand" }
|
||||
ListElement { imageURL: "images/applaud_Icon.svg"; method: "applaud" }
|
||||
ListElement { imageURL: "images/point_Icon.svg"; method: "point" }
|
||||
ListElement { imageURL: "images/emote_Icon.svg"; method: "toggleEmojiApp" }
|
||||
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/point_Icon.svg"; hotkey: "B"; method: "point" }
|
||||
ListElement { imageURL: "images/emote_Icon.svg"; hotkey: "N"; method: "toggleEmojiApp" }
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -137,6 +139,19 @@ Rectangle {
|
|||
onEntered: {
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
height: 1
|
||||
width: 20
|
||||
color: "transparent"
|
||||
|
||||
ToolTip {
|
||||
text: model.hotkey
|
||||
visible: emoteTrayMouseArea.containsMouse
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColorOverlay {
|
||||
|
@ -157,14 +172,13 @@ Rectangle {
|
|||
switch (message.method) {
|
||||
case "updateEmoteIndicator":
|
||||
if (message.data.icon) {
|
||||
print("CHANGING INDICATOR TO: ", message.data.icon);
|
||||
print("CHANGING INDICATOR TO: ", message.data.icon);
|
||||
var imageURL = "images/" + message.data.icon + "_Icon.svg";
|
||||
emoteIndicator.source = imageURL;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
print("MESSAGE TO THE EMOTE INDICATOR QML RECEIVED: ", JSON.stringify(message));
|
||||
console.log('SimplifiedEmoteIndicator.qml: Unrecognized message from JS');
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue