mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 16:18:05 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into orange
This commit is contained in:
commit
37ce7a9b20
1 changed files with 48 additions and 11 deletions
|
@ -11,8 +11,11 @@
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
|
import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
import "../../controls-uit"
|
import "../../controls-uit"
|
||||||
|
import "../dialogs"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: newModelDialog
|
id: newModelDialog
|
||||||
|
@ -25,6 +28,15 @@ Rectangle {
|
||||||
property bool punctuationMode: false
|
property bool punctuationMode: false
|
||||||
property bool keyboardRasied: false
|
property bool keyboardRasied: false
|
||||||
|
|
||||||
|
function errorMessageBox(message) {
|
||||||
|
return desktop.messageBox({
|
||||||
|
icon: hifi.icons.warning,
|
||||||
|
defaultButton: OriginalDialogs.StandardButton.Ok,
|
||||||
|
title: "Error",
|
||||||
|
text: message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: column1
|
id: column1
|
||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
|
@ -98,7 +110,6 @@ Rectangle {
|
||||||
CheckBox {
|
CheckBox {
|
||||||
id: dynamic
|
id: dynamic
|
||||||
text: qsTr("Dynamic")
|
text: qsTr("Dynamic")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
@ -117,6 +128,7 @@ Rectangle {
|
||||||
Text {
|
Text {
|
||||||
id: text2
|
id: text2
|
||||||
width: 160
|
width: 160
|
||||||
|
x: dynamic.width / 2
|
||||||
color: "#ffffff"
|
color: "#ffffff"
|
||||||
text: qsTr("Models with automatic collisions set to 'Exact' cannot be dynamic, and should not be used as floors")
|
text: qsTr("Models with automatic collisions set to 'Exact' cannot be dynamic, and should not be used as floors")
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
|
@ -139,15 +151,40 @@ Rectangle {
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: collisionType
|
id: collisionType
|
||||||
|
|
||||||
|
property int priorIndex: 0
|
||||||
|
property string staticMeshCollisionText: "Exact - All polygons"
|
||||||
|
property var collisionArray: ["No Collision",
|
||||||
|
"Basic - Whole model",
|
||||||
|
"Good - Sub-meshes",
|
||||||
|
staticMeshCollisionText,
|
||||||
|
"Box",
|
||||||
|
"Sphere"]
|
||||||
|
|
||||||
width: 200
|
width: 200
|
||||||
z: 100
|
z: 100
|
||||||
transformOrigin: Item.Center
|
transformOrigin: Item.Center
|
||||||
model: ["No Collision",
|
model: collisionArray
|
||||||
"Basic - Whole model",
|
|
||||||
"Good - Sub-meshes",
|
onCurrentIndexChanged: {
|
||||||
"Exact - All polygons",
|
if (collisionArray[currentIndex] === staticMeshCollisionText) {
|
||||||
"Box",
|
|
||||||
"Sphere"]
|
if (dynamic.checked) {
|
||||||
|
currentIndex = priorIndex;
|
||||||
|
|
||||||
|
errorMessageBox("Models with Automatic Collisions set to \""
|
||||||
|
+ staticMeshCollisionText + "\" cannot be dynamic.");
|
||||||
|
//--EARLY EXIT--( Can't have a static mesh model that's dynamic )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
dynamic.enabled = false;
|
||||||
|
} else {
|
||||||
|
dynamic.enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
priorIndex = currentIndex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
@ -155,10 +192,10 @@ Rectangle {
|
||||||
width: 200
|
width: 200
|
||||||
height: 400
|
height: 400
|
||||||
spacing: 5
|
spacing: 5
|
||||||
|
|
||||||
anchors {
|
anchors.horizontalCenter: column3.horizontalCenter
|
||||||
rightMargin: 15
|
anchors.horizontalCenterOffset: -20
|
||||||
}
|
|
||||||
Button {
|
Button {
|
||||||
id: button1
|
id: button1
|
||||||
text: qsTr("Add")
|
text: qsTr("Add")
|
||||||
|
|
Loading…
Reference in a new issue