mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 02:24:51 +02:00
UI change
This commit is contained in:
parent
87d5958eb8
commit
254e04c4b7
1 changed files with 40 additions and 30 deletions
|
@ -43,29 +43,36 @@ Window {
|
||||||
property alias directory: root.currentDirectory
|
property alias directory: root.currentDirectory
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function reload() {
|
function reload() {
|
||||||
print("reload");
|
print("reload");
|
||||||
}
|
}
|
||||||
|
function addToWorld() {
|
||||||
function goBack() {
|
print("addToWorld");
|
||||||
print("goBack");
|
|
||||||
}
|
}
|
||||||
|
function renameFile() {
|
||||||
function uploadFile(fileUrl, addToScene) {
|
print("renameFile");
|
||||||
print("uploadFile: " + fileUrl + " " + addToScene);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteFile() {
|
function deleteFile() {
|
||||||
print("deleteFile");
|
print("deleteFile");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function uploadFile(fileUrl, addToScene) {
|
||||||
|
var object = desktop.inputDialog({
|
||||||
|
label: "Enter asset path",
|
||||||
|
//placeholderText: "atp:/myFolder/myFile.ext"
|
||||||
|
});
|
||||||
|
object.selected.connect(function(value) {
|
||||||
|
print(value);
|
||||||
|
});
|
||||||
|
print("uploadFile: " + fileUrl + " " + addToScene);
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: pane.contentWidth
|
width: pane.contentWidth
|
||||||
|
|
||||||
HifiControls.ContentSection {
|
HifiControls.ContentSection {
|
||||||
|
id: assetDirectory
|
||||||
name: "Asset Directory"
|
name: "Asset Directory"
|
||||||
spacing: hifi.dimensions.contentSpacing.y
|
spacing: hifi.dimensions.contentSpacing.y
|
||||||
isFirst: true
|
isFirst: true
|
||||||
|
@ -76,16 +83,6 @@ Window {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: hifi.dimensions.contentSpacing.x
|
spacing: hifi.dimensions.contentSpacing.x
|
||||||
|
|
||||||
HifiControls.GlyphButton {
|
|
||||||
glyph: hifi.glyphs.back
|
|
||||||
color: hifi.buttons.white
|
|
||||||
colorScheme: root.colorScheme
|
|
||||||
height: 26
|
|
||||||
width: 26
|
|
||||||
|
|
||||||
onClicked: root.goBack()
|
|
||||||
}
|
|
||||||
|
|
||||||
HifiControls.GlyphButton {
|
HifiControls.GlyphButton {
|
||||||
glyph: hifi.glyphs.reload
|
glyph: hifi.glyphs.reload
|
||||||
color: hifi.buttons.white
|
color: hifi.buttons.white
|
||||||
|
@ -95,23 +92,35 @@ Window {
|
||||||
|
|
||||||
onClicked: root.reload()
|
onClicked: root.reload()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
HifiControls.Button {
|
||||||
// Take the deleteButotn out of the column flow.
|
text: "ADD TO WORLD"
|
||||||
id: deleteButtonContainer
|
color: hifi.buttons.white
|
||||||
anchors.top: buttonRow.top
|
colorScheme: root.colorScheme
|
||||||
anchors.right: parent.right
|
height: 26
|
||||||
|
width: 120
|
||||||
|
|
||||||
|
onClicked: root.addToWorld()
|
||||||
|
}
|
||||||
|
|
||||||
|
HifiControls.Button {
|
||||||
|
text: "RENAME"
|
||||||
|
color: hifi.buttons.white
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
height: 26
|
||||||
|
width: 80
|
||||||
|
|
||||||
|
onClicked: root.renameFile()
|
||||||
|
}
|
||||||
|
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
id: deleteButton
|
id: deleteButton
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
text: "DELETE SELECTION"
|
text: "DELETE"
|
||||||
color: hifi.buttons.red
|
color: hifi.buttons.red
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
height: 26
|
height: 26
|
||||||
width: 130
|
width: 80
|
||||||
|
|
||||||
onClicked: root.deleteFile()
|
onClicked: root.deleteFile()
|
||||||
}
|
}
|
||||||
|
@ -119,7 +128,7 @@ Window {
|
||||||
|
|
||||||
HifiControls.Tree {
|
HifiControls.Tree {
|
||||||
id: treeView
|
id: treeView
|
||||||
height: 250
|
height: 400
|
||||||
treeModel: scriptsModel
|
treeModel: scriptsModel
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -128,6 +137,7 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.ContentSection {
|
HifiControls.ContentSection {
|
||||||
|
id: uploadSection
|
||||||
name: ""
|
name: ""
|
||||||
spacing: hifi.dimensions.contentSpacing.y
|
spacing: hifi.dimensions.contentSpacing.y
|
||||||
|
|
||||||
|
@ -166,7 +176,7 @@ Window {
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var browser = fileBrowserBuilder.createObject(desktop, {
|
var browser = fileBrowserBuilder.createObject(desktop, {
|
||||||
selectDirectory: true,
|
selectDirectory: false,
|
||||||
folder: fileDialogHelper.pathToUrl(currentDirectory)
|
folder: fileDialogHelper.pathToUrl(currentDirectory)
|
||||||
});
|
});
|
||||||
browser.selectedFile.connect(function(url){
|
browser.selectedFile.connect(function(url){
|
||||||
|
|
Loading…
Reference in a new issue