mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
hook up qml button to edit.js
This commit is contained in:
parent
10ebb6efd7
commit
6531efffbc
2 changed files with 20 additions and 1 deletions
|
@ -186,6 +186,11 @@ StackView {
|
|||
anchors.leftMargin: 55
|
||||
anchors.top: assetServerButton.bottom
|
||||
anchors.topMargin: 20
|
||||
onClicked: {
|
||||
editRoot.sendToScript({
|
||||
method: "newEntityButtonClicked", params: { buttonName: "importEntitiesButton" }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -294,7 +294,21 @@ var toolBar = (function () {
|
|||
that.toggle();
|
||||
});
|
||||
|
||||
addButton("openAssetBrowserButton", "assets-01.svg", function(){
|
||||
addButton("importEntitiesButton", "assets-01.svg", function() {
|
||||
var importURL = null;
|
||||
var fullPath = Window.browse("Select Model to Import", "", "*.json");
|
||||
if (fullPath) {
|
||||
importURL = "file:///" + fullPath;
|
||||
}
|
||||
if (importURL) {
|
||||
if (!isActive && (Entities.canRez() && Entities.canRezTmp())) {
|
||||
toolBar.toggle();
|
||||
}
|
||||
importSVO(importURL);
|
||||
}
|
||||
});
|
||||
|
||||
addButton("openAssetBrowserButton", "assets-01.svg", function() {
|
||||
Window.showAssetServer();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue