Add “Import Entities (.json) from a URL”

The action “Import Entities (.json) from a URL” has been added to the “Create” Tab. (It was available only in the Edit menu.)
This commit is contained in:
Alezia Kurdis 2020-11-12 23:48:15 -05:00 committed by GitHub
parent 7bec7cbaa1
commit 636d52b306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 6 deletions

View file

@ -201,11 +201,11 @@ TabBar {
HifiControls.Button {
id: importButton
text: "Import Entities (.json)"
text: "Import Entities (.json) from a File"
color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark
anchors.right: parent.right
anchors.rightMargin: 30
anchors.right: parent.horizontalCenter
anchors.rightMargin: 10
anchors.left: parent.left
anchors.leftMargin: 30
anchors.top: assetServerButton.bottom
@ -217,6 +217,25 @@ TabBar {
});
}
}
HifiControls.Button {
id: importButtonFromUrl
text: "Import Entities (.json) from a URL"
color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark
anchors.right: parent.right
anchors.rightMargin: 30
anchors.left: parent.horizontalCenter
anchors.leftMargin: 10
anchors.top: assetServerButton.bottom
anchors.topMargin: 20
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "importEntitiesFromUrlButton" }
});
}
}
}
} // Flickable
}

View file

@ -207,11 +207,11 @@ TabBar {
HifiControls.Button {
id: importButton
text: "Import Entities (.json)"
text: "Import Entities (.json) from a File"
color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark
anchors.right: parent.right
anchors.rightMargin: 55
anchors.right: parent.horizontalCenter
anchors.rightMargin: 10
anchors.left: parent.left
anchors.leftMargin: 55
anchors.top: assetServerButton.bottom
@ -223,6 +223,25 @@ TabBar {
});
}
}
HifiControls.Button {
id: importButtonFromUrl
text: "Import Entities (.json) from a URL"
color: hifi.buttons.black
colorScheme: hifi.colorSchemes.dark
anchors.right: parent.right
anchors.rightMargin: 55
anchors.left: parent.horizontalCenter
anchors.leftMargin: 10
anchors.top: assetServerButton.bottom
anchors.topMargin: 20
onClicked: {
editRoot.sendToScript({
method: "newEntityButtonClicked",
params: { buttonName: "importEntitiesFromUrlButton" }
});
}
}
}
} // Flickable
}