mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 23:30:31 +02:00
show project page
This commit is contained in:
parent
c0bd9121fb
commit
96673bb5b9
3 changed files with 70 additions and 64 deletions
|
@ -22,10 +22,15 @@ Windows.ScrollingWindow {
|
|||
minSize: Qt.vector2d(200, 300)
|
||||
|
||||
//HifiConstants { id: hifi }
|
||||
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
AvatarProject {
|
||||
id: avatarProject
|
||||
colorScheme: root.colorScheme
|
||||
visible: false
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -84,15 +89,17 @@ Windows.ScrollingWindow {
|
|||
browser.selectedFile.connect(function(fileUrl) {
|
||||
console.log("FOUND PATH " + fileUrl);
|
||||
let fstFilePath = fileDialogHelper.urlToPath(fileUrl);
|
||||
let avatarProject = AvatarPackagerCore.openAvatarProject(fstFilePath);
|
||||
if (avatarProject) {
|
||||
let currentAvatarProject = AvatarPackagerCore.openAvatarProject(fstFilePath);
|
||||
if (currentAvatarProject) {
|
||||
console.log("LOAD COMPLETE");
|
||||
console.log("file dir = " + AvatarPackagerCore.currentAvatarProject.projectFolderPath);
|
||||
avatarProject.visible = true;
|
||||
|
||||
avatarPackagerMain.visible = false;
|
||||
avatarProject.visible = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,15 +7,13 @@ import "../../controlsUit" 1.0 as HifiControls
|
|||
import "../../stylesUit" 1.0
|
||||
|
||||
Rectangle {
|
||||
id: avatarProject
|
||||
id: root
|
||||
|
||||
HifiConstants { id: hifi }
|
||||
|
||||
|
||||
z: 3
|
||||
property int colorScheme;
|
||||
|
||||
visible: false
|
||||
visible: true
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -37,7 +35,7 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
anchors.top: avatarProjectLabel.bottom
|
||||
text: qsTr("Open Project Folder")
|
||||
colorScheme: avatarProject.colorScheme
|
||||
colorScheme: root.colorScheme
|
||||
height: 30
|
||||
onClicked: function() {
|
||||
fileDialogHelper.openDirectory(AvatarPackagerCore.currentAvatarProject.projectFolderPath);
|
||||
|
@ -50,7 +48,7 @@ Rectangle {
|
|||
anchors.top: openFolderButton.bottom
|
||||
text: qsTr("Upload")
|
||||
color: hifi.buttons.blue
|
||||
colorScheme: avatarProject.colorScheme
|
||||
colorScheme: root.colorScheme
|
||||
height: 30
|
||||
onClicked: function() {
|
||||
|
||||
|
|
|
@ -28,7 +28,8 @@ bool AvatarPackager::open() {
|
|||
|
||||
QObject* AvatarPackager::openAvatarProject(QString avatarProjectFSTPath) {
|
||||
if (_currentAvatarProject) {
|
||||
_currentAvatarProject->deleteLater();
|
||||
//_currentAvatarProject->deleteLater();
|
||||
//_currentAvatarProject = nullptr;
|
||||
}
|
||||
_currentAvatarProject = AvatarProject::openAvatarProject(avatarProjectFSTPath);
|
||||
return _currentAvatarProject;
|
||||
|
|
Loading…
Reference in a new issue