mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-28 12:23:25 +02:00
Merge pull request #15506 from SaracenOne/unify_primitives
Case 19510: Unify cube and sphere edit menu entries into one.
This commit is contained in:
commit
7440ef3cf3
4 changed files with 11 additions and 49 deletions
|
@ -85,23 +85,11 @@ TabBar {
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/21-cube-01.svg"
|
icon: "icons/create-icons/21-cube-01.svg"
|
||||||
text: "CUBE"
|
text: "SHAPE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
method: "newEntityButtonClicked",
|
method: "newEntityButtonClicked",
|
||||||
params: { buttonName: "newCubeButton" }
|
params: { buttonName: "newShapeButton" }
|
||||||
});
|
|
||||||
editTabView.currentIndex = 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NewEntityButton {
|
|
||||||
icon: "icons/create-icons/22-sphere-01.svg"
|
|
||||||
text: "SPHERE"
|
|
||||||
onClicked: {
|
|
||||||
editRoot.sendToScript({
|
|
||||||
method: "newEntityButtonClicked",
|
|
||||||
params: { buttonName: "newSphereButton" }
|
|
||||||
});
|
});
|
||||||
editTabView.currentIndex = 2
|
editTabView.currentIndex = 2
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,23 +91,11 @@ TabBar {
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/21-cube-01.svg"
|
icon: "icons/create-icons/21-cube-01.svg"
|
||||||
text: "CUBE"
|
text: "SHAPE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
method: "newEntityButtonClicked",
|
method: "newEntityButtonClicked",
|
||||||
params: { buttonName: "newCubeButton" }
|
params: { buttonName: "newShapeButton" }
|
||||||
});
|
|
||||||
editTabView.currentIndex = tabIndex.properties
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NewEntityButton {
|
|
||||||
icon: "icons/create-icons/22-sphere-01.svg"
|
|
||||||
text: "SPHERE"
|
|
||||||
onClicked: {
|
|
||||||
editRoot.sendToScript({
|
|
||||||
method: "newEntityButtonClicked",
|
|
||||||
params: { buttonName: "newSphereButton" }
|
|
||||||
});
|
});
|
||||||
editTabView.currentIndex = tabIndex.properties
|
editTabView.currentIndex = tabIndex.properties
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,7 @@ var toolBar = (function() {
|
||||||
toolBar,
|
toolBar,
|
||||||
activeButton,
|
activeButton,
|
||||||
newModelButton,
|
newModelButton,
|
||||||
newCubeButton,
|
newShapeButton,
|
||||||
newSphereButton,
|
|
||||||
newLightButton,
|
newLightButton,
|
||||||
newTextButton,
|
newTextButton,
|
||||||
newWebButton,
|
newWebButton,
|
||||||
|
@ -41,20 +40,13 @@ var toolBar = (function() {
|
||||||
visible: false
|
visible: false
|
||||||
});
|
});
|
||||||
|
|
||||||
newCubeButton = toolBar.addButton({
|
newShapeButton = toolBar.addButton({
|
||||||
objectName: "newCubeButton",
|
objectName: "newShapeButton",
|
||||||
imageURL: toolIconUrl + "cube-01.svg",
|
imageURL: toolIconUrl + "cube-01.svg",
|
||||||
alpha: 0.9,
|
alpha: 0.9,
|
||||||
visible: false
|
visible: false
|
||||||
});
|
});
|
||||||
|
|
||||||
newSphereButton = toolBar.addButton({
|
|
||||||
objectName: "newSphereButton",
|
|
||||||
imageURL: toolIconUrl + "sphere-01.svg",
|
|
||||||
alpha: 0.9,
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
|
|
||||||
newLightButton = toolBar.addButton({
|
newLightButton = toolBar.addButton({
|
||||||
objectName: "newLightButton",
|
objectName: "newLightButton",
|
||||||
imageURL: toolIconUrl + "light-01.svg",
|
imageURL: toolIconUrl + "light-01.svg",
|
||||||
|
@ -111,8 +103,7 @@ var toolBar = (function() {
|
||||||
// Sets visibility of tool buttons, excluding the power button
|
// Sets visibility of tool buttons, excluding the power button
|
||||||
that.showTools = function(doShow) {
|
that.showTools = function(doShow) {
|
||||||
newModelButton.writeProperty('visible', doShow);
|
newModelButton.writeProperty('visible', doShow);
|
||||||
newCubeButton.writeProperty('visible', doShow);
|
newShapeButton.writeProperty('visible', doShow);
|
||||||
newSphereButton.writeProperty('visible', doShow);
|
|
||||||
newLightButton.writeProperty('visible', doShow);
|
newLightButton.writeProperty('visible', doShow);
|
||||||
newTextButton.writeProperty('visible', doShow);
|
newTextButton.writeProperty('visible', doShow);
|
||||||
newWebButton.writeProperty('visible', doShow);
|
newWebButton.writeProperty('visible', doShow);
|
||||||
|
|
|
@ -860,15 +860,10 @@ var toolBar = (function () {
|
||||||
|
|
||||||
addButton("newModelButton", createNewEntityDialogButtonCallback("Model"));
|
addButton("newModelButton", createNewEntityDialogButtonCallback("Model"));
|
||||||
|
|
||||||
addButton("newCubeButton", function () {
|
addButton("newShapeButton", function () {
|
||||||
createNewEntity({
|
createNewEntity({
|
||||||
type: "Box",
|
type: "Shape",
|
||||||
});
|
shape: "Cube",
|
||||||
});
|
|
||||||
|
|
||||||
addButton("newSphereButton", function () {
|
|
||||||
createNewEntity({
|
|
||||||
type: "Sphere",
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue