mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-26 00:55:10 +02:00
Another checkpoint
This commit is contained in:
parent
6e4a4da92a
commit
2f176f50fa
5 changed files with 23 additions and 7 deletions
Binary file not shown.
|
@ -65,6 +65,8 @@ Item {
|
||||||
anchors.leftMargin: -10
|
anchors.leftMargin: -10
|
||||||
width: parent.width + 70
|
width: parent.width + 70
|
||||||
height: 35
|
height: 35
|
||||||
|
border.color: hifi.colors.blueHighlight
|
||||||
|
border.width: 0
|
||||||
TextInput {
|
TextInput {
|
||||||
id: myDisplayNameText
|
id: myDisplayNameText
|
||||||
// Properties
|
// Properties
|
||||||
|
@ -86,6 +88,8 @@ Item {
|
||||||
// Signals
|
// Signals
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
pal.sendToScript({method: 'displayNameUpdate', params: text})
|
pal.sendToScript({method: 'displayNameUpdate', params: text})
|
||||||
|
focus = false
|
||||||
|
myDisplayName.border.width = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -93,8 +97,9 @@ Item {
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
myDisplayName.border.width = 3
|
||||||
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
|
||||||
}
|
}
|
||||||
onDoubleClicked: {
|
onDoubleClicked: {
|
||||||
myDisplayNameText.selectAll();
|
myDisplayNameText.selectAll();
|
||||||
|
@ -106,12 +111,12 @@ Item {
|
||||||
// Edit pencil glyph
|
// Edit pencil glyph
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: editGlyph
|
id: editGlyph
|
||||||
text: hifi.glyphs.edit
|
text: hifi.glyphs.editPencil
|
||||||
// Size
|
// Size
|
||||||
size: thisNameCard.displayTextHeight
|
size: thisNameCard.displayTextHeight*1.5
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: size/2
|
anchors.rightMargin: 5
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
// Style
|
// Style
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
|
@ -35,6 +35,17 @@ Rectangle {
|
||||||
// Keep a local list of per-avatar gainSliderValueDBs. Far faster than fetching this data from the server.
|
// Keep a local list of per-avatar gainSliderValueDBs. Far faster than fetching this data from the server.
|
||||||
// NOTE: if another script modifies the per-avatar gain, this value won't be accurate!
|
// NOTE: if another script modifies the per-avatar gain, this value won't be accurate!
|
||||||
property var gainSliderValueDB: ({});
|
property var gainSliderValueDB: ({});
|
||||||
|
|
||||||
|
// The letterbox used for popup messages
|
||||||
|
LetterboxMessage {
|
||||||
|
id: letterboxMessage
|
||||||
|
z: 999 // Force the popup on top of everything else
|
||||||
|
}
|
||||||
|
function letterbox(message) {
|
||||||
|
letterboxMessage.text = message
|
||||||
|
letterboxMessage.visible = true
|
||||||
|
letterboxMessage.popupRadius = 0
|
||||||
|
}
|
||||||
|
|
||||||
// This is the container for the PAL
|
// This is the container for the PAL
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -176,8 +187,6 @@ Rectangle {
|
||||||
TableViewColumn {
|
TableViewColumn {
|
||||||
visible: iAmAdmin
|
visible: iAmAdmin
|
||||||
role: "kick"
|
role: "kick"
|
||||||
// The hacky spaces used to center text over the button, since I don't know how to apply a margin
|
|
||||||
// to column header text.
|
|
||||||
title: "BAN"
|
title: "BAN"
|
||||||
width: actionButtonWidth
|
width: actionButtonWidth
|
||||||
movable: false
|
movable: false
|
||||||
|
|
|
@ -312,10 +312,11 @@ Item {
|
||||||
readonly property string error: "="
|
readonly property string error: "="
|
||||||
readonly property string settings: "@"
|
readonly property string settings: "@"
|
||||||
readonly property string trash: "{"
|
readonly property string trash: "{"
|
||||||
readonly property string objectGroup: ""
|
readonly property string objectGroup: "\ue000"
|
||||||
readonly property string cm: "}"
|
readonly property string cm: "}"
|
||||||
readonly property string msvg79: "~"
|
readonly property string msvg79: "~"
|
||||||
readonly property string deg: "\\"
|
readonly property string deg: "\\"
|
||||||
readonly property string px: "|"
|
readonly property string px: "|"
|
||||||
|
readonly property string editPencil: "\ue00d"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1094,6 +1094,7 @@ void AvatarData::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
||||||
|
|
||||||
void AvatarData::setDisplayName(const QString& displayName) {
|
void AvatarData::setDisplayName(const QString& displayName) {
|
||||||
_displayName = displayName;
|
_displayName = displayName;
|
||||||
|
DependencyManager::get<NodeList>()->killNodeWithUUID(getSessionUUID());
|
||||||
|
|
||||||
qCDebug(avatars) << "Changing display name for avatar to" << displayName;
|
qCDebug(avatars) << "Changing display name for avatar to" << displayName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue