mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 12:12:39 +02:00
adding new UI screens
This commit is contained in:
parent
59f490c97e
commit
97460c27cf
9 changed files with 349 additions and 16 deletions
68
launchers/qt/resources/qml/DownloadFinished.qml
Normal file
68
launchers/qt/resources/qml/DownloadFinished.qml
Normal file
|
@ -0,0 +1,68 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick.Controls 2.1
|
||||
import "HFControls"
|
||||
|
||||
Item {
|
||||
id: root
|
||||
anchors.centerIn: parent
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
mirror: true
|
||||
source: "qrc:/images/hifi_window@2x.png"
|
||||
transformOrigin: Item.Center
|
||||
rotation: 0
|
||||
}
|
||||
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
width: 132
|
||||
height: 134
|
||||
source: "qrc:/images/HiFi_Voxel.png"
|
||||
|
||||
anchors {
|
||||
top: root.top
|
||||
topMargin: 84
|
||||
horizontalCenter: root.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: header
|
||||
width: 87
|
||||
height: 31
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.family: "Graphik"
|
||||
font.bold: true
|
||||
font.pixelSize: 28
|
||||
color: "#FFFFFF"
|
||||
text: "You're all set!"
|
||||
anchors {
|
||||
top: logo.bottom
|
||||
topMargin: 26
|
||||
horizontalCenter: logo.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: description
|
||||
width: 100
|
||||
height: 40
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 14
|
||||
color: "#FFFFFF"
|
||||
text: "We will see you in world."
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors {
|
||||
top: header.bottom
|
||||
topMargin: 8
|
||||
horizontalCenter: header.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
}
|
159
launchers/qt/resources/qml/HFBase/CreateAccountBase.qml
Normal file
159
launchers/qt/resources/qml/HFBase/CreateAccountBase.qml
Normal file
|
@ -0,0 +1,159 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick 2.1
|
||||
import "../HFControls"
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
anchors.centerIn: parent
|
||||
property string titleText: "Create your account"
|
||||
property string usernamePlaceholder: "User name"
|
||||
property string passwordPlaceholder: "Set a password"
|
||||
property int marginLeft: root.width * 0.15
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
mirror: true
|
||||
source: "qrc:/images/hifi_window@2x.png"
|
||||
transformOrigin: Item.Center
|
||||
rotation: 180
|
||||
}
|
||||
|
||||
Text {
|
||||
id: title
|
||||
width: 325
|
||||
height: 26
|
||||
font.family: "Graphik"
|
||||
font.bold: true
|
||||
font.pixelSize: 24
|
||||
color: "#FFFFFF"
|
||||
text: root.titleText
|
||||
anchors {
|
||||
top: root.top
|
||||
topMargin: 29
|
||||
left: root.left
|
||||
leftMargin: root.marginLeft
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: instruction
|
||||
width: 425
|
||||
height: 22
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 10
|
||||
color: "#C4C4C4"
|
||||
text: "Use the email address that you regisetered with."
|
||||
anchors {
|
||||
left: root.left
|
||||
leftMargin: root.marginLeft
|
||||
top: title.bottom
|
||||
topMargin: 9
|
||||
}
|
||||
}
|
||||
|
||||
HFTextField {
|
||||
id: organization
|
||||
width: 353
|
||||
height: 40
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 18
|
||||
placeholderText: "Organization name"
|
||||
color: "#808080"
|
||||
seperatorColor: Qt.rgba(1, 1, 1, 0.3)
|
||||
anchors {
|
||||
top: instruction.bottom
|
||||
left: root.left
|
||||
leftMargin: root.marginLeft
|
||||
topMargin: 4
|
||||
}
|
||||
}
|
||||
|
||||
HFTextField {
|
||||
id: username
|
||||
width: 353
|
||||
height: 40
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 18
|
||||
placeholderText: root.usernamePlaceholder
|
||||
color: "#808080"
|
||||
seperatorColor: Qt.rgba(1, 1, 1, 0.3)
|
||||
anchors {
|
||||
top: organization.bottom
|
||||
left: root.left
|
||||
leftMargin: root.marginLeft
|
||||
topMargin: 10
|
||||
}
|
||||
}
|
||||
|
||||
HFTextField {
|
||||
id: passwordField
|
||||
width: 353
|
||||
height: 40
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 18
|
||||
placeholderText: root.passwordPlaceholder
|
||||
color: "#808080"
|
||||
seperatorColor: Qt.rgba(1, 1, 1, 0.3)
|
||||
echoMode: TextInput.Password
|
||||
anchors {
|
||||
top: username.bottom
|
||||
left: root.left
|
||||
leftMargin: root.marginLeft
|
||||
topMargin: 10
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Text {
|
||||
id: displayNameText
|
||||
text: "This is the display name other people see in world. It can be changed at \nanytime, from your profile"
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 10
|
||||
color: "#FFFFFF"
|
||||
anchors {
|
||||
top: passwordField.bottom
|
||||
left: root.left
|
||||
leftMargin: root.marginLeft
|
||||
topMargin: 15
|
||||
}
|
||||
}
|
||||
|
||||
HFTextField {
|
||||
id: displayName
|
||||
width: 353
|
||||
height: 40
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 18
|
||||
placeholderText: "Password"
|
||||
color: "#C4C4C4"
|
||||
seperatorColor: Qt.rgba(1, 1, 1, 0.3)
|
||||
anchors {
|
||||
top: displayNameText.bottom
|
||||
left: root.left
|
||||
leftMargin: root.marginLeft
|
||||
topMargin: 8
|
||||
}
|
||||
}
|
||||
|
||||
HFButton {
|
||||
id: button
|
||||
width: 122
|
||||
height: 36
|
||||
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 18
|
||||
text: "NEXT"
|
||||
|
||||
anchors {
|
||||
top: displayName.bottom
|
||||
left: root.left
|
||||
leftMargin: root.marginLeft
|
||||
topMargin: 15
|
||||
}
|
||||
|
||||
onClicked: LauncherState.login(username.text, password.text)
|
||||
}
|
||||
}
|
105
launchers/qt/resources/qml/HFBase/Error.qml
Normal file
105
launchers/qt/resources/qml/HFBase/Error.qml
Normal file
|
@ -0,0 +1,105 @@
|
|||
import QtQuick 2.3
|
||||
import QtQuick 2.1
|
||||
import "../HFControls"
|
||||
|
||||
|
||||
Item {
|
||||
id: root
|
||||
anchors.centerIn: parent
|
||||
|
||||
Image {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
mirror: false
|
||||
source: "qrc:/images/hifi_window@2x.png"
|
||||
//fillMode: Image.PreserveAspectFit
|
||||
transformOrigin: Item.Center
|
||||
//rotation: 90
|
||||
}
|
||||
|
||||
Image {
|
||||
id: logo
|
||||
width: 132
|
||||
height: 134
|
||||
source: "qrc:/images/HiFi_Voxel.png"
|
||||
|
||||
anchors {
|
||||
top: root.top
|
||||
topMargin: 84
|
||||
horizontalCenter: root.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: header
|
||||
width: 87
|
||||
height: 31
|
||||
font.family: "Graphik"
|
||||
font.bold: true
|
||||
font.pixelSize: 28
|
||||
color: "#FFFFFF"
|
||||
text: "Uh oh."
|
||||
anchors {
|
||||
top: logo.bottom
|
||||
topMargin: 26
|
||||
horizontalCenter: logo.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
id: description
|
||||
width: 100
|
||||
height: 40
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 14
|
||||
color: "#FFFFFF"
|
||||
text: "We seem to have a problem.\n Please restart HQ Launcher"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors {
|
||||
top: header.bottom
|
||||
topMargin: 8
|
||||
horizontalCenter: header.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
HFButton {
|
||||
id: button
|
||||
width: 166
|
||||
height: 35
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 18
|
||||
text: "Restart"
|
||||
|
||||
anchors {
|
||||
top: description.bottom
|
||||
topMargin: 15
|
||||
horizontalCenter: description.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Text {
|
||||
id: hifilogo
|
||||
width: 100
|
||||
height: 18
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.family: "Graphik"
|
||||
font.pixelSize: 18
|
||||
font.bold: true
|
||||
color: "#FFFFFF"
|
||||
|
||||
text: "High Fidelity"
|
||||
anchors {
|
||||
right: root.right
|
||||
rightMargin: 17
|
||||
bottom: root.bottom
|
||||
bottomMargin: 17
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.1
|
|||
|
||||
TextField {
|
||||
id: control
|
||||
color: "#FFFFFF"
|
||||
//color: "#000000"
|
||||
font.family: "Graphik Medium"
|
||||
font.pixelSize: 22
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
|
@ -13,14 +13,8 @@ TextField {
|
|||
background: Item {
|
||||
anchors.fill: parent
|
||||
Rectangle {
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
leftMargin: 7
|
||||
right: parent.right
|
||||
}
|
||||
height: 1
|
||||
color: control.seperatorColor
|
||||
color: "#FFFFFF"
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,11 @@ import QtQuick 2.3
|
|||
import QtQuick.Controls 2.1
|
||||
import HQLauncher 1.0
|
||||
import "HFControls"
|
||||
Image {
|
||||
Item {
|
||||
id: root
|
||||
width: 515
|
||||
height: 450
|
||||
source: "../images/hifi_window@2x.png"
|
||||
height: 390
|
||||
//source: "../images/hifi_window@2x.png"
|
||||
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -11,7 +11,7 @@ Launcher::Launcher(int& argc, char**argv) : QGuiApplication(argc, argv) {
|
|||
QString resourceBinaryLocation = QGuiApplication::applicationDirPath() + "/resources.rcc";
|
||||
QResource::registerResource(resourceBinaryLocation);
|
||||
_launcherState = std::make_shared<LauncherState>();
|
||||
_launcherState->setUIState(LauncherState::SPLASH_SCREEN);
|
||||
_launcherState->setUIState(LauncherState::DOWNLOAD_FINSISHED);
|
||||
_launcherWindow = std::make_unique<LauncherWindow>();
|
||||
_launcherWindow->rootContext()->setContextProperty("LauncherState", _launcherState.get());
|
||||
_launcherWindow->setFlags(Qt::FramelessWindowHint);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#pragma once
|
||||
#include <memory>
|
||||
|
||||
#include <QGuiApplication>
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
#include <QQmlEngine>
|
||||
|
||||
static const std::array<QString, LauncherState::UIState::UI_STATE_NUM> QML_FILE_FOR_UI_STATE =
|
||||
{ { "qrc:/qml/SplashScreen.qml", "qrc:/qml/Login.qml", "qrc:/qml/DisplayName.qml",
|
||||
"qrc:/qml/Download.qml", "qrc:/qml/DownloadFinshed.qml", "qrc:/qml/Error.qml" } };
|
||||
{ { "qrc:/qml/SplashScreen.qml", "qrc:/qml/HFBase/CreateAccountBase.qml", "qrc:/qml/DisplayName.qml",
|
||||
"qrc:/qml/Download.qml", "qrc:/qml/DownloadFinished.qml", "qrc:/qml/HFBase/Error.qml" } };
|
||||
|
||||
LauncherState::LauncherState() {
|
||||
// TODO Show splash screen until this request is complete
|
||||
|
@ -61,7 +61,7 @@ LauncherState::LauncherState() {
|
|||
}
|
||||
}
|
||||
}
|
||||
setUIState(LauncherState::LOGIN_SCREEN);
|
||||
//setUIState(LauncherState::LOGIN_SCREEN);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
6
launchers/qt/src/PathUtils.h
Normal file
6
launchers/qt/src/PathUtils.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
class PathUtils {
|
||||
public:
|
||||
static resourcePath();
|
||||
};
|
Loading…
Reference in a new issue