mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-05 22:32:38 +02:00
Controls screen done
This commit is contained in:
parent
643dd21f86
commit
a23bee19e8
4 changed files with 325 additions and 294 deletions
|
@ -128,6 +128,10 @@ Rectangle {
|
||||||
// If we have never auto-selected and the user is still using a default avatar or if the current avatar is not valid (fst), or if
|
// If we have never auto-selected and the user is still using a default avatar or if the current avatar is not valid (fst), or if
|
||||||
// the current avatar is the old default (Woody), use top avatar from inventory or one of the new defaults.
|
// the current avatar is the old default (Woody), use top avatar from inventory or one of the new defaults.
|
||||||
|
|
||||||
|
// ZRF REMOVE ME!
|
||||||
|
currentAvatarURLContainsDefaultAvatar = true;
|
||||||
|
userHasValidAvatarInInventory = false;
|
||||||
|
|
||||||
// If the current avatar URL is invalid, OR the user is using the "default avatar" (Woody)...
|
// If the current avatar URL is invalid, OR the user is using the "default avatar" (Woody)...
|
||||||
if (!currentAvatarURLContainsFST || currentAvatarURLContainsDefaultAvatar) {
|
if (!currentAvatarURLContainsFST || currentAvatarURLContainsDefaultAvatar) {
|
||||||
// If the user has a valid avatar in their inventory...
|
// If the user has a valid avatar in their inventory...
|
||||||
|
|
|
@ -34,37 +34,26 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Item {
|
||||||
id: topLeftAccentImage
|
id: tempAvatarPageContainer
|
||||||
width: 400
|
anchors.fill: parent
|
||||||
height: 180
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
source: "images/defaultTopLeft.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
Image {
|
|
||||||
id: bottomRightAccentImage
|
|
||||||
width: 80
|
|
||||||
height: 250
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
source: "images/defaultBottomRight.png"
|
|
||||||
}
|
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
id: tempAvatarPageContainer
|
id: tempAvatarPageFlickable
|
||||||
visible: true
|
anchors.top: parent.top
|
||||||
anchors.fill: parent
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 16
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 16
|
||||||
|
anchors.bottom: continueLink.top
|
||||||
clip: true
|
clip: true
|
||||||
contentWidth: parent.width
|
contentWidth: parent.width
|
||||||
contentHeight: tempAvatarPageGrid.height
|
contentHeight: tempAvatarPageGrid.heights
|
||||||
|
interactive: contentHeight > height
|
||||||
|
|
||||||
GridLayout {
|
RowLayout {
|
||||||
id: tempAvatarPageGrid
|
id: tempAvatarPageGrid
|
||||||
width: parent.width
|
width: parent.width
|
||||||
columns: 2
|
|
||||||
rows: 1
|
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
Layout.preferredWidth: 428
|
Layout.preferredWidth: 428
|
||||||
|
@ -145,19 +134,25 @@ Rectangle {
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HifiStylesUit.RalewayBold {
|
HifiStylesUit.RalewayBold {
|
||||||
anchors.top: qrAndInstructionsContainer.bottom
|
id: continueLink
|
||||||
anchors.topMargin: 50
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 16
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
horizontalAlignment: Text.AlignLeft
|
anchors.rightMargin: 16
|
||||||
|
height: 96
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
text: "Continue >"
|
text: "Continue >"
|
||||||
color: simplifiedUI.colors.text.lightBlue
|
color: simplifiedUI.colors.text.lightBlue
|
||||||
opacity: continueMouseArea.containsMouse ? 1.0 : 0.7
|
opacity: continueMouseArea.containsMouse ? 1.0 : 0.7
|
||||||
size: 36
|
size: 36
|
||||||
height: paintedHeight
|
|
||||||
z: 1
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: continueMouseArea
|
id: continueMouseArea
|
||||||
|
@ -172,86 +167,106 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
SimplifiedControls.VerticalScrollBar {
|
||||||
|
parent: tempAvatarPageFlickable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Flickable {
|
Item {
|
||||||
id: controlsContainer
|
id: controlsContainer
|
||||||
visible: false
|
visible: false
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
clip: true
|
|
||||||
contentWidth: parent.width
|
|
||||||
contentHeight: contentItem.childrenRect.height
|
|
||||||
|
|
||||||
HifiStylesUit.RalewayRegular {
|
HifiStylesUit.RalewayRegular {
|
||||||
id: controlsDescriptionText
|
id: controlsDescriptionText
|
||||||
text: "These are your avatar controls to <b>interact with and move around in your new HQ.</b>"
|
text: "Use these avatar controls to <b>interact with and move around in your new HQ.</b>"
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 100
|
anchors.topMargin: 48
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 32
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 32
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
height: paintedHeight
|
height: paintedHeight
|
||||||
width: 850
|
|
||||||
color: simplifiedUI.colors.text.black
|
color: simplifiedUI.colors.text.black
|
||||||
size: 36
|
size: 36
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
Item {
|
||||||
id: controlsPageGrid
|
|
||||||
anchors.top: controlsDescriptionText.bottom
|
anchors.top: controlsDescriptionText.bottom
|
||||||
anchors.topMargin: 60
|
anchors.topMargin: 16
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.left: parent.left
|
||||||
width: controlsDescriptionText.width
|
anchors.right: parent.right
|
||||||
columnSpacing: 50
|
anchors.bottom: bottomBarContainer.top
|
||||||
rowSpacing: 40
|
|
||||||
columns: 2
|
|
||||||
rows: 2
|
|
||||||
|
|
||||||
|
GridView {
|
||||||
|
id: controlsGrid
|
||||||
|
property int maxColumns: 2
|
||||||
|
property int idealCellWidth: 361
|
||||||
|
anchors.fill: parent
|
||||||
|
clip: true
|
||||||
|
cellWidth: width / Math.min(Math.floor(width / idealCellWidth), maxColumns)
|
||||||
|
cellHeight: 225
|
||||||
|
model: ListModel {
|
||||||
|
ListElement {
|
||||||
|
imageHeight: 198
|
||||||
|
imageSource: "images/walkingControls.png"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
imageHeight: 193
|
||||||
|
imageSource: "images/mouseControls.png"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
imageHeight: 146
|
||||||
|
imageSource: "images/runJumpControls.png"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
imageHeight: 96
|
||||||
|
imageSource: "images/cameraControls.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delegate: Rectangle {
|
||||||
|
height: GridView.view.cellHeight
|
||||||
|
width: GridView.view.cellWidth
|
||||||
Image {
|
Image {
|
||||||
Layout.preferredWidth: 360
|
anchors.centerIn: parent
|
||||||
Layout.preferredHeight: 225
|
width: parent.GridView.view.idealCellWidth
|
||||||
id: walkingControls
|
height: model.imageHeight
|
||||||
source: "images/walkingControls.png"
|
source: model.imageSource
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
SimplifiedControls.VerticalScrollBar {
|
||||||
Layout.preferredWidth: 360
|
parent: controlsGrid
|
||||||
Layout.preferredHeight: 200
|
anchors.topMargin: 96
|
||||||
id: mouseControls
|
anchors.bottomMargin: anchors.topMargin
|
||||||
source: "images/mouseControls.png"
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Item {
|
||||||
Layout.preferredWidth: 240
|
id: bottomBarContainer
|
||||||
Layout.preferredHeight: 160
|
anchors.left: parent.left
|
||||||
Layout.alignment: Qt.AlignHCenter
|
anchors.leftMargin: 32
|
||||||
id: runJumpControls
|
anchors.right: parent.right
|
||||||
source: "images/runJumpControls.png"
|
anchors.rightMargin: 32
|
||||||
}
|
anchors.bottom: parent.bottom
|
||||||
|
height: iHaveAGoodGrip.height + learnMoreLink.height + 48
|
||||||
Image {
|
|
||||||
Layout.preferredWidth: 160
|
|
||||||
Layout.preferredHeight: 100
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
id: cameraControls
|
|
||||||
source: "images/cameraControls.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HifiStylesUit.RalewayBold {
|
HifiStylesUit.RalewayBold {
|
||||||
id: iHaveAGoodGrip
|
id: iHaveAGoodGrip
|
||||||
anchors.top: controlsPageGrid.bottom
|
anchors.centerIn: parent
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
anchors.topMargin: 50
|
|
||||||
text: "I've got a good grip on the controls."
|
text: "I've got a good grip on the controls."
|
||||||
width: 650
|
width: parent.width
|
||||||
height: paintedHeight
|
height: paintedHeight
|
||||||
color: simplifiedUI.colors.text.lightBlue
|
color: simplifiedUI.colors.text.lightBlue
|
||||||
opacity: goodGripMouseArea.containsMouse ? 1.0 : 0.7
|
opacity: goodGripMouseArea.containsMouse ? 1.0 : 0.7
|
||||||
size: 36
|
size: 36
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: goodGripMouseArea
|
id: goodGripMouseArea
|
||||||
|
@ -269,12 +284,13 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiStylesUit.RalewayBold {
|
HifiStylesUit.RalewayBold {
|
||||||
anchors.top: iHaveAGoodGrip.bottom
|
id: learnMoreLink
|
||||||
anchors.topMargin: 50
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 50
|
anchors.leftMargin: 16
|
||||||
|
anchors.top: iHaveAGoodGrip.bottom
|
||||||
|
anchors.topMargin: 8
|
||||||
text: "Learn more about our controls."
|
text: "Learn more about our controls."
|
||||||
width: 200
|
width: paintedWidth
|
||||||
height: paintedHeight
|
height: paintedHeight
|
||||||
color: simplifiedUI.colors.text.lightBlue
|
color: simplifiedUI.colors.text.lightBlue
|
||||||
opacity: learnMoreAboutControlsMouseArea.containsMouse ? 1.0 : 0.7
|
opacity: learnMoreAboutControlsMouseArea.containsMouse ? 1.0 : 0.7
|
||||||
|
@ -293,10 +309,24 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SimplifiedControls.VerticalScrollBar {
|
Image {
|
||||||
parent: controlsContainer.visible ? controlsContainer : tempAvatarPageContainer
|
id: topLeftAccentImage
|
||||||
z: 2
|
width: 400
|
||||||
|
height: 180
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
source: "images/defaultTopLeft.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: bottomRightAccentImage
|
||||||
|
width: 80
|
||||||
|
height: 250
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
source: "images/defaultBottomRight.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
|
|
@ -47,8 +47,10 @@ Rectangle {
|
||||||
|
|
||||||
Flickable {
|
Flickable {
|
||||||
id: tempAvatarPageContainer
|
id: tempAvatarPageContainer
|
||||||
visible: true
|
anchors.top: parent.top
|
||||||
anchors.fill: parent
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: continueLink.top
|
||||||
clip: true
|
clip: true
|
||||||
contentWidth: parent.width
|
contentWidth: parent.width
|
||||||
contentHeight: tempAvatarPageGrid.height
|
contentHeight: tempAvatarPageGrid.height
|
||||||
|
@ -133,18 +135,25 @@ Rectangle {
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SimplifiedControls.VerticalScrollBar {
|
||||||
|
parent: tempAvatarPageContainer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HifiStylesUit.RalewayBold {
|
HifiStylesUit.RalewayBold {
|
||||||
anchors.top: qrAndInstructionsContainer.bottom
|
id: continueLink
|
||||||
anchors.topMargin: 150
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
height: paintedHeight + 24
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
text: "Continue >"
|
text: "Continue >"
|
||||||
color: simplifiedUI.colors.text.lightBlue
|
color: simplifiedUI.colors.text.lightBlue
|
||||||
opacity: continueMouseArea.containsMouse ? 1.0 : 0.7
|
opacity: continueMouseArea.containsMouse ? 1.0 : 0.7
|
||||||
size: 36
|
size: 36
|
||||||
height: paintedHeight
|
|
||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -161,14 +170,6 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SimplifiedControls.VerticalScrollBar {
|
|
||||||
parent: tempAvatarPageContainer
|
|
||||||
z: 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -362,8 +362,6 @@ var TOP_BAR_HEIGHT_PX = 48;
|
||||||
var INITIAL_LAUNCH_QML_PATH = Script.resolvePath("./simplifiedFTUE/InitialLaunchWindow.qml");
|
var INITIAL_LAUNCH_QML_PATH = Script.resolvePath("./simplifiedFTUE/InitialLaunchWindow.qml");
|
||||||
var INITIAL_LAUNCH_WINDOW_TITLE = "Initial Launch";
|
var INITIAL_LAUNCH_WINDOW_TITLE = "Initial Launch";
|
||||||
var INITIAL_LAUNCH_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
|
var INITIAL_LAUNCH_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
|
||||||
var INITIAL_LAUNCH_WIDTH_PX = Window.innerWidth;
|
|
||||||
var INITIAL_LAUNCH_HEIGHT_PX = Window.innerHeight - TOP_BAR_HEIGHT_PX;
|
|
||||||
var INITIAL_WINDOW_FLAGS = 0x00000001 | // Qt::Window
|
var INITIAL_WINDOW_FLAGS = 0x00000001 | // Qt::Window
|
||||||
0x00000800 | // Qt::FramelessWindowHint
|
0x00000800 | // Qt::FramelessWindowHint
|
||||||
0x40000000; // Qt::NoDropShadowWindowHint
|
0x40000000; // Qt::NoDropShadowWindowHint
|
||||||
|
@ -377,12 +375,12 @@ function displayInitialLaunchWindow() {
|
||||||
title: INITIAL_LAUNCH_WINDOW_TITLE,
|
title: INITIAL_LAUNCH_WINDOW_TITLE,
|
||||||
presentationMode: INITIAL_LAUNCH_PRESENTATION_MODE,
|
presentationMode: INITIAL_LAUNCH_PRESENTATION_MODE,
|
||||||
size: {
|
size: {
|
||||||
x: INITIAL_LAUNCH_WIDTH_PX,
|
x: Window.innerWidth,
|
||||||
y: INITIAL_LAUNCH_HEIGHT_PX
|
y: Window.innerHeight + TOP_BAR_HEIGHT_PX
|
||||||
},
|
},
|
||||||
position: {
|
position: {
|
||||||
x: Window.x,
|
x: Window.x,
|
||||||
y: Window.y + TOP_BAR_HEIGHT_PX
|
y: Window.y
|
||||||
},
|
},
|
||||||
overrideFlags: INITIAL_WINDOW_FLAGS
|
overrideFlags: INITIAL_WINDOW_FLAGS
|
||||||
});
|
});
|
||||||
|
@ -395,8 +393,6 @@ function displayInitialLaunchWindow() {
|
||||||
var SECOND_LAUNCH_QML_PATH = Script.resolvePath("simplifiedFTUE/SecondLaunchWindow.qml");
|
var SECOND_LAUNCH_QML_PATH = Script.resolvePath("simplifiedFTUE/SecondLaunchWindow.qml");
|
||||||
var SECOND_LAUNCH_WINDOW_TITLE = "Second Launch";
|
var SECOND_LAUNCH_WINDOW_TITLE = "Second Launch";
|
||||||
var SECOND_LAUNCH_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
|
var SECOND_LAUNCH_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
|
||||||
var SECOND_LAUNCH_WIDTH_PX = Window.innerWidth;
|
|
||||||
var SECOND_LAUNCH_HEIGHT_PX = Window.innerHeight - TOP_BAR_HEIGHT_PX;
|
|
||||||
var SECOND_WINDOW_FLAGS = 0x00000001 | // Qt::Window
|
var SECOND_WINDOW_FLAGS = 0x00000001 | // Qt::Window
|
||||||
0x00000800 | // Qt::FramelessWindowHint
|
0x00000800 | // Qt::FramelessWindowHint
|
||||||
0x40000000; // Qt::NoDropShadowWindowHint
|
0x40000000; // Qt::NoDropShadowWindowHint
|
||||||
|
@ -410,12 +406,12 @@ function displaySecondLaunchWindow() {
|
||||||
title: SECOND_LAUNCH_WINDOW_TITLE,
|
title: SECOND_LAUNCH_WINDOW_TITLE,
|
||||||
presentationMode: SECOND_LAUNCH_PRESENTATION_MODE,
|
presentationMode: SECOND_LAUNCH_PRESENTATION_MODE,
|
||||||
size: {
|
size: {
|
||||||
x: SECOND_LAUNCH_WIDTH_PX,
|
x: Window.innerWidth,
|
||||||
y: SECOND_LAUNCH_HEIGHT_PX
|
y: Window.innerHeight + TOP_BAR_HEIGHT_PX
|
||||||
},
|
},
|
||||||
position: {
|
position: {
|
||||||
x: Window.x,
|
x: Window.x,
|
||||||
y: Window.y + TOP_BAR_HEIGHT_PX
|
y: Window.y
|
||||||
},
|
},
|
||||||
overrideFlags: SECOND_WINDOW_FLAGS
|
overrideFlags: SECOND_WINDOW_FLAGS
|
||||||
});
|
});
|
||||||
|
@ -659,22 +655,22 @@ function onGeometryChanged(rect) {
|
||||||
}
|
}
|
||||||
if (initialLaunchWindow) {
|
if (initialLaunchWindow) {
|
||||||
initialLaunchWindow.size = {
|
initialLaunchWindow.size = {
|
||||||
"x": rect.width,
|
"x": Window.innerWidth,
|
||||||
"y": rect.height
|
"y": Window.innerHeight + TOP_BAR_HEIGHT_PX
|
||||||
};
|
};
|
||||||
initialLaunchWindow.position = {
|
initialLaunchWindow.position = {
|
||||||
"x": rect.x,
|
"x": rect.x,
|
||||||
"y": rect.y + TOP_BAR_HEIGHT_PX
|
"y": rect.y
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (secondLaunchWindow) {
|
if (secondLaunchWindow) {
|
||||||
secondLaunchWindow.size = {
|
secondLaunchWindow.size = {
|
||||||
"x": rect.width,
|
"x": Window.innerWidth,
|
||||||
"y": rect.height
|
"y": Window.innerHeight + TOP_BAR_HEIGHT_PX
|
||||||
};
|
};
|
||||||
secondLaunchWindow.position = {
|
secondLaunchWindow.position = {
|
||||||
"x": rect.x,
|
"x": rect.x,
|
||||||
"y": rect.y + TOP_BAR_HEIGHT_PX
|
"y": rect.y
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue