mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 18:21:16 +02:00
Merge pull request #9580 from zfox23/PAL_VirtualKeyboard
PAL: Raise virtual keyboard when editing DisplayName in HMD
This commit is contained in:
commit
82efb97654
2 changed files with 15 additions and 0 deletions
|
@ -34,6 +34,7 @@ Item {
|
||||||
property bool isMyCard: false
|
property bool isMyCard: false
|
||||||
property bool selected: false
|
property bool selected: false
|
||||||
property bool isAdmin: false
|
property bool isAdmin: false
|
||||||
|
property bool currentlyEditingDisplayName: false
|
||||||
|
|
||||||
/* User image commented out for now - will probably be re-introduced later.
|
/* User image commented out for now - will probably be re-introduced later.
|
||||||
Column {
|
Column {
|
||||||
|
@ -104,6 +105,7 @@ Item {
|
||||||
focus = false
|
focus = false
|
||||||
myDisplayName.border.width = 0
|
myDisplayName.border.width = 0
|
||||||
color = hifi.colors.darkGray
|
color = hifi.colors.darkGray
|
||||||
|
currentlyEditingDisplayName = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -115,10 +117,12 @@ Item {
|
||||||
myDisplayNameText.focus ? myDisplayNameText.cursorPosition = myDisplayNameText.positionAt(mouseX, mouseY, TextInput.CursorOnCharacter) : myDisplayNameText.selectAll();
|
myDisplayNameText.focus ? myDisplayNameText.cursorPosition = myDisplayNameText.positionAt(mouseX, mouseY, TextInput.CursorOnCharacter) : myDisplayNameText.selectAll();
|
||||||
myDisplayNameText.focus = true
|
myDisplayNameText.focus = true
|
||||||
myDisplayNameText.color = "black"
|
myDisplayNameText.color = "black"
|
||||||
|
currentlyEditingDisplayName = true
|
||||||
}
|
}
|
||||||
onDoubleClicked: {
|
onDoubleClicked: {
|
||||||
myDisplayNameText.selectAll();
|
myDisplayNameText.selectAll();
|
||||||
myDisplayNameText.focus = true;
|
myDisplayNameText.focus = true;
|
||||||
|
currentlyEditingDisplayName = true
|
||||||
}
|
}
|
||||||
onEntered: myDisplayName.color = hifi.colors.lightGrayText
|
onEntered: myDisplayName.color = hifi.colors.lightGrayText
|
||||||
onExited: myDisplayName.color = hifi.colors.textFieldLightBackground
|
onExited: myDisplayName.color = hifi.colors.textFieldLightBackground
|
||||||
|
|
|
@ -51,6 +51,7 @@ Rectangle {
|
||||||
|
|
||||||
// This is the container for the PAL
|
// This is the container for the PAL
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
property bool punctuationMode: false
|
||||||
id: palContainer
|
id: palContainer
|
||||||
// Size
|
// Size
|
||||||
width: pal.width - 50
|
width: pal.width - 50
|
||||||
|
@ -421,6 +422,16 @@ Rectangle {
|
||||||
onExited: adminHelpText.color = hifi.colors.redHighlight
|
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
|
// 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)
|
// (i.e. when selecting avatars using edit.js or sphere overlays)
|
||||||
|
|
Loading…
Reference in a new issue