From 8b1161b0b027a3a7bcca9dd3d8401c9a91eb1970 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 1 Feb 2017 12:32:30 -0800 Subject: [PATCH] Fix it --- interface/resources/qml/hifi/NameCard.qml | 4 ++++ interface/resources/qml/hifi/Pal.qml | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/interface/resources/qml/hifi/NameCard.qml b/interface/resources/qml/hifi/NameCard.qml index 7478ca9c2b..b55b9c517d 100644 --- a/interface/resources/qml/hifi/NameCard.qml +++ b/interface/resources/qml/hifi/NameCard.qml @@ -34,6 +34,7 @@ Item { property bool isMyCard: false property bool selected: false property bool isAdmin: false + property bool currentlyEditingDisplayName: false /* User image commented out for now - will probably be re-introduced later. Column { @@ -104,6 +105,7 @@ Item { focus = false myDisplayName.border.width = 0 color = hifi.colors.darkGray + currentlyEditingDisplayName = false } } MouseArea { @@ -115,10 +117,12 @@ Item { myDisplayNameText.focus ? myDisplayNameText.cursorPosition = myDisplayNameText.positionAt(mouseX, mouseY, TextInput.CursorOnCharacter) : myDisplayNameText.selectAll(); myDisplayNameText.focus = true myDisplayNameText.color = "black" + currentlyEditingDisplayName = true } onDoubleClicked: { myDisplayNameText.selectAll(); myDisplayNameText.focus = true; + currentlyEditingDisplayName = true } onEntered: myDisplayName.color = hifi.colors.lightGrayText onExited: myDisplayName.color = hifi.colors.textFieldLightBackground diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index f3554727dd..923b09b9ef 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -51,6 +51,7 @@ Rectangle { // This is the container for the PAL Rectangle { + property bool punctuationMode: false id: palContainer // Size width: pal.width - 50 @@ -421,6 +422,16 @@ Rectangle { onExited: adminHelpText.color = hifi.colors.redHighlight } } + HifiControls.Keyboard { + id: keyboard + raised: myCard.currentlyEditingDisplayName && HMD.active + numeric: parent.punctuationMode + anchors { + bottom: parent.bottom + left: parent.left + right: parent.right + } + } } // Timer used when selecting table rows that aren't yet present in the model // (i.e. when selecting avatars using edit.js or sphere overlays)