mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:36:38 +02:00
asset server button
This commit is contained in:
parent
3850bc35a9
commit
d4ea0c116d
1 changed files with 91 additions and 11 deletions
|
@ -6,6 +6,7 @@ import QtQuick.Controls.Styles 1.4
|
||||||
import "../../controls"
|
import "../../controls"
|
||||||
import "../toolbars"
|
import "../toolbars"
|
||||||
import HFWebEngineProfile 1.0
|
import HFWebEngineProfile 1.0
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: editRoot
|
id: editRoot
|
||||||
|
@ -60,20 +61,9 @@ StackView {
|
||||||
anchors.rightMargin: 55
|
anchors.rightMargin: 55
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 55
|
anchors.leftMargin: 55
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.bottomMargin: 30
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 70
|
anchors.topMargin: 70
|
||||||
|
|
||||||
NewEntityButton {
|
|
||||||
icon: "icons/assets-01.svg"
|
|
||||||
text: "ASSETS"
|
|
||||||
onClicked: {
|
|
||||||
editRoot.sendToScript({
|
|
||||||
method: "newEntityButtonClicked", params: { buttonName: "openAssetBrowserButton" }
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/94-model-01.svg"
|
icon: "icons/create-icons/94-model-01.svg"
|
||||||
|
@ -156,8 +146,98 @@ StackView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: assetServerButton
|
||||||
|
width: 370
|
||||||
|
height: 38
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.top: createEntitiesFlow.bottom
|
||||||
|
anchors.topMargin: 35
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: assetServerButtonBg
|
||||||
|
color: "black"
|
||||||
|
opacity: 1
|
||||||
|
radius: 6
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 0
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 0
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: assetServerButtonGradient
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop {
|
||||||
|
position: 0
|
||||||
|
color: "#383838"
|
||||||
|
}
|
||||||
|
|
||||||
|
GradientStop {
|
||||||
|
position: 1
|
||||||
|
color: "black"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
opacity: 1
|
||||||
|
radius: 6
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 0
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 0
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
color: "#ffffff"
|
||||||
|
text: "OPEN THIS DOMAIN'S ASSET SERVER"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 14
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
enabled: true
|
||||||
|
onClicked: {
|
||||||
|
editRoot.sendToScript({
|
||||||
|
method: "newEntityButtonClicked", params: { buttonName: "openAssetBrowserButton" }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
onEntered: {
|
||||||
|
assetServerButton.state = "hover state";
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
assetServerButton.state = "base state";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "hover state"
|
||||||
|
|
||||||
|
PropertyChanges {
|
||||||
|
target: assetServerButtonGradient
|
||||||
|
opacity: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "base state"
|
||||||
|
|
||||||
|
PropertyChanges {
|
||||||
|
target: assetServerButtonGradient
|
||||||
|
opacity: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue