diff --git a/ScreenPlay/Resources.qrc b/ScreenPlay/Resources.qrc index b14f0361..ca8868fa 100644 --- a/ScreenPlay/Resources.qrc +++ b/ScreenPlay/Resources.qrc @@ -115,6 +115,8 @@ legal/OFL.txt legal/OpenSSL.txt legal/Qt LGPLv3.txt + qml/Wizard/Wizard.qml + assets/shader/movingcolorramp.fsh qml/Controls/Slider.qml diff --git a/ScreenPlay/assets/shader/movingcolorramp.fsh b/ScreenPlay/assets/shader/movingcolorramp.fsh new file mode 100644 index 00000000..cbd80a6d --- /dev/null +++ b/ScreenPlay/assets/shader/movingcolorramp.fsh @@ -0,0 +1,19 @@ +precision lowp float; + +uniform float time; +uniform vec2 resolution; + +void main( void ) { + + + vec2 position = ( gl_FragCoord.xy / resolution.xy ); + + vec3 color1 = vec3(1.0, 0.0, 0.0); + vec3 color2 = vec3(0.97, 0.24, 0.24); + float mixValue = distance(position,vec2(0,1)); + + vec3 color = mix( color1, color2,mixValue); + + gl_FragColor = vec4(color,mixValue); + +} diff --git a/ScreenPlay/qml/Create/Create.qml b/ScreenPlay/qml/Create/Create.qml index 7955079c..f561cd88 100644 --- a/ScreenPlay/qml/Create/Create.qml +++ b/ScreenPlay/qml/Create/Create.qml @@ -23,7 +23,7 @@ Rectangle { activeVideoFile = videoFile loader.setSource("CreateImport.qml", { - file: videoFile + "file": videoFile }) } onProjectFileSelected: { @@ -31,7 +31,7 @@ Rectangle { activeFolder = projectFile loader.setSource("CreateUpload.qml", { - projectFile: projectFile + "projectFile": projectFile }) } } @@ -55,54 +55,26 @@ Rectangle { } onUploadToSteamWorkshop: { loader.setSource("CreateUpload.qml", { - file: activeVideoFile + "file": activeVideoFile }) } } - LinearGradient { - id: gradient - anchors.fill: parent - cached: true - start: Qt.point(0, 0) - end: Qt.point(gradient.width, gradient.height) - gradient: Gradient { - GradientStop { - position: 0.0 - color: "#FF9700" - SequentialAnimation on color { - loops: Animation.Infinite - ColorAnimation { - from: "#FF9700" - to: "#F83C3C" - duration: 5000 - } - ColorAnimation { - from: "#F83C3C" - to: "#FF9700" - duration: 5000 - } - } - } - GradientStop { - position: 1.0 - color: "#F83C3C" - SequentialAnimation on color { - loops: Animation.Infinite + property var myDate: new Date() - ColorAnimation { - from: "#F83C3C" - to: "#FF9700" - duration: 100000 - } - ColorAnimation { - from: "#FF9700" - to: "#F83C3C" - duration: 100000 - } - } - } - } + Timer { + interval: 1 + running: true + repeat: true + onTriggered: colorShader.time = myDate.getMilliseconds() + } + + ShaderEffect { + id: colorShader + anchors.fill: parent + property real time: 45 + property vector2d resolution: Qt.vector2d(parent.width, parent.height) + fragmentShader: "qrc:/assets/shader/movingcolorramp.fsh" } Item { @@ -235,7 +207,11 @@ Rectangle { } onButtonPressed: { create.state = "new" - loader.setSource("CreateNew.qml", {project: type, projectTitle: title, icon: iconSource }) + loader.setSource("CreateNew.qml", { + "project": type, + "projectTitle": title, + "icon": iconSource + }) } } diff --git a/ScreenPlay/qml/Create/CreateNew.qml b/ScreenPlay/qml/Create/CreateNew.qml index daa518d2..ad001cd5 100644 --- a/ScreenPlay/qml/Create/CreateNew.qml +++ b/ScreenPlay/qml/Create/CreateNew.qml @@ -5,6 +5,8 @@ import QtQuick.Controls.Material 2.2 import Qt.labs.platform 1.0 import QtQuick.Layouts 1.3 +import "../Wizard" + Item { id: createNew anchors.fill: parent @@ -35,140 +37,46 @@ Item { Rectangle { id: wrapper + anchors { horizontalCenter: parent.horizontalCenter top: parent.top } - width: 510 + width: 910 radius: 4 height: 560 - ColumnLayout { - anchors { - top: parent.top - margins: 50 - bottom: parent.bottom - left: parent.left - right: parent.right + SwipeView { + id: view + clip: true + currentIndex: 0 + anchors.fill: parent + anchors.margins: 40 + + Rectangle { + id: firstPage + color: "orange" } - spacing: 50 - - Item { - - width: 300 - height: 180 - Layout.alignment: Qt.AlignCenter - - Image { - id: imgIcon - width: 120 - height: 120 - sourceSize: Qt.size(120, 120) - source: createNew.icon - anchors.centerIn: parent - } - ColorOverlay { - color: "gray" - source: imgIcon - anchors.fill: imgIcon - } - Text { - text: projectTitle - color: "#5D5D5D" - font.pixelSize: 16 - font.family: "Roboto" - renderType: Text.NativeRendering - verticalAlignment: Qt.AlignVCenter - horizontalAlignment: Qt.AlignHCenter - wrapMode: Text.WrapAnywhere - clip: true - height: 30 - - anchors { - left: parent.left - bottom: parent.bottom - right: parent.right - } - } + Rectangle { + id: secondPage + color: "grey" } - - TextField { - id: txtTitle - height: 60 - anchors { - right: parent.right - left: parent.left - } - - selectByMouse: true - text: qsTr("") - placeholderText: "Project Name" - onTextChanged: { - txtPath.text = folderDialog.currentFolder + "/" + txtTitle.text - } + Rectangle { + id: thirdPage + color: "steelblue" } - Item { - height: 60 - width: parent.width + } - Text { - id: txtPath - text: StandardPaths.standardLocations( - StandardPaths.HomeLocation)[0] - color: "#5D5D5D" - font.pixelSize: 16 - font.family: "Roboto" - renderType: Text.NativeRendering - verticalAlignment: Qt.AlignVCenter - wrapMode: Text.WrapAnywhere - clip: true - anchors { - top: parent.top - left: parent.left - bottom: parent.bottom - right: btnFolder.left - rightMargin: 30 - } - } - Button { - id: btnFolder - text: qsTr("Set Folder") - Material.background: Material.Orange - Material.foreground: "white" - anchors { - right: parent.right - bottom: parent.bottom - } + PageIndicator { + id: indicator - onClicked: { + count: view.count + currentIndex: view.currentIndex - folderDialog.open() - } - FolderDialog { - id: folderDialog - folder: StandardPaths.standardLocations( - StandardPaths.HomeLocation)[0] - onAccepted: { - txtPath.text = folderDialog.currentFolder + "/" + txtTitle.text - } - } - } - } - - Button { - text: qsTr("Create") - Material.background: Material.Orange - Material.foreground: "white" - icon.source: "qrc:/assets/icons/icon_plus.svg" - icon.color: "white" - icon.width: 16 - icon.height: 16 - Layout.alignment: Qt.AlignHCenter - onClicked: { - - } - } + anchors.bottom: parent.bottom + anchors.bottomMargin: 20 + anchors.horizontalCenter: parent.horizontalCenter } MouseArea { @@ -200,7 +108,7 @@ Item { color: "gray" } Timer { - id:timerBack + id: timerBack interval: 800 onTriggered: utility.setNavigation("Create") } diff --git a/ScreenPlay/qml/Wizard/Wizard.qml b/ScreenPlay/qml/Wizard/Wizard.qml new file mode 100644 index 00000000..9c36e13c --- /dev/null +++ b/ScreenPlay/qml/Wizard/Wizard.qml @@ -0,0 +1,5 @@ +import QtQuick 2.0 + +Item { + +}