mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 08:17:35 +02:00
simplify asset server button
This commit is contained in:
parent
42216b6986
commit
10ebb6efd7
1 changed files with 13 additions and 88 deletions
|
@ -158,97 +158,22 @@ StackView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
HifiControls.Button {
|
||||||
id: assetServerButton
|
id: assetServerButton
|
||||||
width: 370
|
text: "Open This Domain's Asset Server"
|
||||||
height: 38
|
color: hifi.buttons.black
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 55
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 55
|
||||||
anchors.top: createEntitiesFlow.bottom
|
anchors.top: createEntitiesFlow.bottom
|
||||||
anchors.topMargin: 35
|
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: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
method: "newEntityButtonClicked", params: { buttonName: "openAssetBrowserButton" }
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
|
@ -260,7 +185,7 @@ StackView {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 55
|
anchors.leftMargin: 55
|
||||||
anchors.top: assetServerButton.bottom
|
anchors.top: assetServerButton.bottom
|
||||||
anchors.topMargin: 35
|
anchors.topMargin: 20
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue