Skip to content

Commit

Permalink
Merge pull request overte-org#1094 from AleziaKurdis/createApp_Paste_…
Browse files Browse the repository at this point in the history
…Url_In_Create_ui

Create App: Revolutionary "Paste" Url buttons for the "Create Model", "Create Material" and "Create Voxels" UI
  • Loading branch information
ksuprynowicz authored Aug 18, 2024
2 parents fb81ad6 + a93e159 commit a97b892
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 15 deletions.
22 changes: 19 additions & 3 deletions scripts/system/create/qml/NewMaterialDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// NewMaterialDialog.qml
// qml/hifi
//
// Created by Sam Gondelman on 1/17/18
// Created by Sam Gondelman on January 17th, 2018
// Copyright 2018 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors
// Copyright 2024 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand Down Expand Up @@ -55,17 +56,32 @@ Rectangle {

Text {
id: text1
text: qsTr("Material URL <i>(Optional)</i>")
text: qsTr("Material URL <i>(Optional)</i>&nbsp;&nbsp;&nbsp;")
color: "#ffffff"
font.pixelSize: 12
}

Button {
id: pasteBtn
text: "Paste"
font.pixelSize: 11
height: 16
width: 40
radius: 4
anchors.top: text1.top
anchors.left: text1.right
anchors.bottom: text1.bottom
onClicked: {
materialURL.paste()
}
}

TextInput {
id: materialURL
height: 20
text: qsTr("")
color: "white"
anchors.top: text1.bottom
anchors.top: pasteBtn.bottom
anchors.topMargin: 5
anchors.left: parent.left
anchors.leftMargin: 0
Expand Down
22 changes: 18 additions & 4 deletions scripts/system/create/qml/NewModelDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// NewModelDialog.qml
// qml/hifi
//
// Created by Seth Alves on 2017-2-10
// Created by Seth Alves on February 10th, 2017
// Copyright 2017 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors
// Copyright 2024 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand Down Expand Up @@ -55,17 +56,30 @@ Rectangle {

Text {
id: text1
text: qsTr("Model URL <i>(.fbx, .fst, .glb, .gltf, .obj, .gz)</i>")
text: qsTr("Model URL <i>(.fbx, .fst, .glb, .gltf, .obj, .gz)</i>&nbsp;&nbsp;&nbsp;")
color: "#ffffff"
font.pixelSize: 12
}

Button {
id: pasteBtn
text: "Paste"
font.pixelSize: 11
height: 16
width: 40
radius: 4
anchors.top: text1.top + 10
anchors.left: text1.right
anchors.bottom: text1.bottom
onClicked: {
modelURL.paste()
}
}
TextInput {
id: modelURL
height: 20
text: qsTr("")
color: "white"
anchors.top: text1.bottom
anchors.top: pasteBtn.bottom
anchors.topMargin: 5
anchors.left: parent.left
anchors.leftMargin: 0
Expand Down
59 changes: 51 additions & 8 deletions scripts/system/create/qml/NewPolyVoxDialog.qml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//
// NewPolyVoxDialog.qml
// Created by dr Karol Suprynowicz on 2022.05.17.
// Created by dr Karol Suprynowicz on May 17th, 2022
// based on NewModelDialog.qml
// qml/hifi
//
// Copyright 2017 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors
// Copyright 2022 Overte e.V.
// Copyright 2022-2024 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand Down Expand Up @@ -117,17 +117,32 @@ Rectangle {
id: text1
anchors.top: texturePreset.bottom
anchors.topMargin: 5
text: qsTr("X Texture URL")
text: qsTr("X Texture URL <i>&nbsp;&nbsp;&nbsp;</i>")
color: "#ffffff"
font.pixelSize: 12
}

Button {
id: pasteBtn1
text: "Paste"
font.pixelSize: 11
height: 16
width: 40
radius: 4
anchors.top: text1.top
anchors.left: text1.right
anchors.bottom: text1.bottom
onClicked: {
xTextureURL.paste()
}
}

TextInput {
id: xTextureURL
height: 20
text: qsTr("")
color: "white"
anchors.top: text1.bottom
anchors.top: pasteBtn1.bottom
anchors.topMargin: 5
anchors.left: parent.left
anchors.leftMargin: 0
Expand Down Expand Up @@ -167,19 +182,33 @@ Rectangle {

Text {
id: text2
text: qsTr("Y Texture URL")
text: qsTr("Y Texture URL <i>&nbsp;&nbsp;&nbsp;</i>")
color: "#ffffff"
font.pixelSize: 12
anchors.top: textInputBox1.bottom
anchors.topMargin: 5
}
Button {
id: pasteBtn2
text: "Paste"
font.pixelSize: 11
height: 16
width: 40
radius: 4
anchors.top: text2.top
anchors.left: text2.right
anchors.bottom: text2.bottom
onClicked: {
yTextureURL.paste()
}
}

TextInput {
id: yTextureURL
height: 20
text: qsTr("")
color: "white"
anchors.top: text2.bottom
anchors.top: pasteBtn2.bottom
anchors.topMargin: 5
anchors.left: parent.left
anchors.leftMargin: 0
Expand Down Expand Up @@ -219,19 +248,33 @@ Rectangle {

Text {
id: text3
text: qsTr("Z Texture URL")
text: qsTr("Z Texture URL <i>&nbsp;&nbsp;&nbsp;</i>")
color: "#ffffff"
font.pixelSize: 12
anchors.top: textInputBox2.bottom
anchors.topMargin: 5
}
Button {
id: pasteBtn3
text: "Paste"
font.pixelSize: 11
height: 16
width: 40
radius: 4
anchors.top: text3.top
anchors.left: text3.right
anchors.bottom: text3.bottom
onClicked: {
zTextureURL.paste()
}
}

TextInput {
id: zTextureURL
height: 20
text: qsTr("")
color: "white"
anchors.top: text3.bottom
anchors.top: pasteBtn3.bottom
anchors.topMargin: 5
anchors.left: parent.left
anchors.leftMargin: 0
Expand Down

0 comments on commit a97b892

Please sign in to comment.