From 7f45a7b45c0218c5812b6ec3459d02b524f4a15c Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Tue, 20 Aug 2019 15:11:17 -0700 Subject: [PATCH] Show a not found message when the user searches for nonexistent emoji --- .../emojiApp/ui/qml/SimplifiedEmoji.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/simplifiedUI/simplifiedEmote/emojiApp/ui/qml/SimplifiedEmoji.qml b/scripts/simplifiedUI/simplifiedEmote/emojiApp/ui/qml/SimplifiedEmoji.qml index e48d0280e4..6d79245a5f 100644 --- a/scripts/simplifiedUI/simplifiedEmote/emojiApp/ui/qml/SimplifiedEmoji.qml +++ b/scripts/simplifiedUI/simplifiedEmote/emojiApp/ui/qml/SimplifiedEmoji.qml @@ -204,6 +204,22 @@ Rectangle { parent: grid anchors.rightMargin: -grid.anchors.rightMargin + 2 } + + HifiStylesUit.GraphikRegular { + readonly property var cantFindEmojiList: ["😣", "😭", "😖", "😢", "🤔"] + onVisibleChanged: { + if (visible) { + text = "We couldn't find that emoji " + cantFindEmojiList[Math.floor(Math.random() * cantFindEmojiList.length)] + } + } + visible: grid.model.count === 0 + anchors.fill: parent + wrapMode: Text.Wrap + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + color: simplifiedUI.colors.text.darkGrey + size: 22 + } }