From b6af46cac9ab316187eec143610dd333b4f43e7b Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 7 Jun 2016 11:30:07 +1200 Subject: [PATCH] Add "Load Defaults" button to Running Scripts dialog And rename "Stop All" to "Remove All". --- .../qml/hifi/dialogs/RunningScripts.qml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/interface/resources/qml/hifi/dialogs/RunningScripts.qml b/interface/resources/qml/hifi/dialogs/RunningScripts.qml index 31bb553809..cbbbec5bff 100644 --- a/interface/resources/qml/hifi/dialogs/RunningScripts.qml +++ b/interface/resources/qml/hifi/dialogs/RunningScripts.qml @@ -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 {}