Merge pull request #8028 from ctrlaltdavid/20949

add "Load Defaults" button to Running Scripts dialog
This commit is contained in:
Brad Hefta-Gaub 2016-06-07 17:09:29 -07:00
commit 9a0076d4f1

View file

@ -23,9 +23,9 @@ Window {
title: "Running Scripts"
resizable: true
destroyOnInvisible: true
implicitWidth: 400
implicitWidth: 424
implicitHeight: isHMD ? 695 : 728
minSize: Qt.vector2d(200, 300)
minSize: Qt.vector2d(424, 300)
HifiConstants { id: hifi }
@ -83,6 +83,11 @@ Window {
scripts.reloadAllScripts();
}
function loadDefaults() {
console.log("Load default scripts");
scripts.loadOneScript(scripts.defaultScriptsPath + "/defaultScripts.js");
}
function stopAll() {
console.log("Stop all scripts");
scripts.stopAllScripts();
@ -101,13 +106,13 @@ Window {
spacing: hifi.dimensions.contentSpacing.x
HifiControls.Button {
text: "Reload all"
text: "Reload All"
color: hifi.buttons.black
onClicked: reloadAll()
}
HifiControls.Button {
text: "Stop all"
text: "Remove All"
color: hifi.buttons.red
onClicked: stopAll()
}
@ -215,7 +220,6 @@ Window {
Row {
spacing: hifi.dimensions.contentSpacing.x
anchors.right: parent.right
HifiControls.Button {
text: "from URL"
@ -253,6 +257,12 @@ Window {
onTriggered: ApplicationInterface.loadDialog();
}
}
HifiControls.Button {
text: "Load Defaults"
color: hifi.buttons.black
onClicked: loadDefaults()
}
}
HifiControls.VerticalSpacer {}