From 636d52b306ab5e6de49eb5eca6d700ce997a9bdb Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Thu, 12 Nov 2020 23:48:15 -0500 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=9CImport=20Entities=20(.json)=20fr?= =?UTF-8?q?om=20a=20URL=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The action “Import Entities (.json) from a URL” has been added to the “Create” Tab. (It was available only in the Edit menu.) --- scripts/system/create/qml/EditTabView.qml | 25 ++++++++++++++++--- .../system/create/qml/EditToolsTabView.qml | 25 ++++++++++++++++--- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/scripts/system/create/qml/EditTabView.qml b/scripts/system/create/qml/EditTabView.qml index 53f6068424..617cdd9e5a 100644 --- a/scripts/system/create/qml/EditTabView.qml +++ b/scripts/system/create/qml/EditTabView.qml @@ -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 } diff --git a/scripts/system/create/qml/EditToolsTabView.qml b/scripts/system/create/qml/EditToolsTabView.qml index 0ce8d8e8d4..8379b47259 100644 --- a/scripts/system/create/qml/EditToolsTabView.qml +++ b/scripts/system/create/qml/EditToolsTabView.qml @@ -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 }