mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 00:02:05 +02:00
Add a 'grabbable' option to the new-model dialog
This commit is contained in:
parent
388b31acf7
commit
f1258e4445
2 changed files with 17 additions and 8 deletions
|
@ -116,9 +116,14 @@ Rectangle {
|
|||
Column {
|
||||
id: column2
|
||||
width: 200
|
||||
height: 400
|
||||
height: 600
|
||||
spacing: 10
|
||||
|
||||
CheckBox {
|
||||
id: grabbable
|
||||
text: qsTr("Grabbable")
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: dynamic
|
||||
text: qsTr("Dynamic")
|
||||
|
@ -219,7 +224,8 @@ Rectangle {
|
|||
params: {
|
||||
textInput: modelURL.text,
|
||||
checkBox: dynamic.checked,
|
||||
comboBox: collisionType.currentIndex
|
||||
comboBox: collisionType.currentIndex,
|
||||
grabbable: grabbable.checked
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -348,12 +348,12 @@ var toolBar = (function () {
|
|||
|
||||
if (!properties.grab) {
|
||||
properties.grab = {};
|
||||
}
|
||||
if (Menu.isOptionChecked(MENU_CREATE_ENTITIES_GRABBABLE) &&
|
||||
!(properties.type === "Zone" || properties.type === "Light" || properties.type === "ParticleEffect")) {
|
||||
properties.grab.grabbable = true;
|
||||
} else {
|
||||
properties.grab.grabbable = false;
|
||||
if (Menu.isOptionChecked(MENU_CREATE_ENTITIES_GRABBABLE) &&
|
||||
!(properties.type === "Zone" || properties.type === "Light" || properties.type === "ParticleEffect")) {
|
||||
properties.grab.grabbable = true;
|
||||
} else {
|
||||
properties.grab.grabbable = false;
|
||||
}
|
||||
}
|
||||
|
||||
SelectionManager.saveProperties();
|
||||
|
@ -473,6 +473,9 @@ var toolBar = (function () {
|
|||
type: "Model",
|
||||
modelURL: url,
|
||||
shapeType: shapeType,
|
||||
grab: {
|
||||
grabbable: result.grabbable
|
||||
},
|
||||
dynamic: dynamic,
|
||||
gravity: dynamic ? { x: 0, y: -10, z: 0 } : { x: 0, y: 0, z: 0 }
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue