mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 06:19:49 +02:00
Add "Finish" buttons for scale, clone, and delete tools
This commit is contained in:
parent
ca3eadb82f
commit
0064c51610
1 changed files with 73 additions and 0 deletions
|
@ -318,6 +318,50 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
},
|
||||
|
||||
OPTONS_PANELS = {
|
||||
scaleOptions: [
|
||||
{
|
||||
id: "scaleOptionsPanel",
|
||||
type: "panel",
|
||||
properties: {
|
||||
localPosition: { x: 0.055, y: 0.0, z: -0.005 }
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "scaleFinishButton",
|
||||
type: "button",
|
||||
properties: {
|
||||
dimensions: { x: 0.07, y: 0.03, z: 0.01 },
|
||||
localPosition: { x: 0, y: 0, z: -0.005 },
|
||||
color: { red: 200, green: 200, blue: 200 }
|
||||
},
|
||||
label: "FINISH",
|
||||
command: {
|
||||
method: "closeOptions"
|
||||
}
|
||||
}
|
||||
],
|
||||
cloneOptions: [
|
||||
{
|
||||
id: "cloneOptionsPanel",
|
||||
type: "panel",
|
||||
properties: {
|
||||
localPosition: { x: 0.055, y: 0.0, z: -0.005 }
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "cloneFinishButton",
|
||||
type: "button",
|
||||
properties: {
|
||||
dimensions: { x: 0.07, y: 0.03, z: 0.01 },
|
||||
localPosition: { x: 0, y: 0, z: -0.005 },
|
||||
color: { red: 200, green: 200, blue: 200 }
|
||||
},
|
||||
label: "FINISH",
|
||||
command: {
|
||||
method: "closeOptions"
|
||||
}
|
||||
}
|
||||
],
|
||||
groupOptions: [
|
||||
{
|
||||
id: "groupOptionsPanel",
|
||||
|
@ -750,6 +794,28 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
localPosition: { x: 0.045, y: 0.057, z: -0.0075 }
|
||||
}
|
||||
}
|
||||
],
|
||||
deleteOptions: [
|
||||
{
|
||||
id: "deleteOptionsPanel",
|
||||
type: "panel",
|
||||
properties: {
|
||||
localPosition: { x: 0.055, y: 0.0, z: -0.005 }
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "deleteFinishButton",
|
||||
type: "button",
|
||||
properties: {
|
||||
dimensions: { x: 0.07, y: 0.03, z: 0.01 },
|
||||
localPosition: { x: 0, y: 0, z: -0.005 },
|
||||
color: { red: 200, green: 200, blue: 200 }
|
||||
},
|
||||
label: "FINISH",
|
||||
command: {
|
||||
method: "closeOptions"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
@ -769,6 +835,7 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
color: { red: 0, green: 240, blue: 240 }
|
||||
},
|
||||
label: " SCALE",
|
||||
toolOptions: "scaleOptions",
|
||||
callback: {
|
||||
method: "scaleTool"
|
||||
}
|
||||
|
@ -781,6 +848,7 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
color: { red: 240, green: 240, blue: 0 }
|
||||
},
|
||||
label: " CLONE",
|
||||
toolOptions: "cloneOptions",
|
||||
callback: {
|
||||
method: "cloneTool"
|
||||
}
|
||||
|
@ -833,6 +901,7 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
color: { red: 240, green: 60, blue: 60 }
|
||||
},
|
||||
label: " DELETE",
|
||||
toolOptions: "deleteOptions",
|
||||
callback: {
|
||||
method: "deleteTool"
|
||||
}
|
||||
|
@ -1538,6 +1607,10 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
uiCommandCallback("setDensity", parameter);
|
||||
break;
|
||||
|
||||
case "closeOptions":
|
||||
closeOptions();
|
||||
break;
|
||||
|
||||
default:
|
||||
App.log(side, "ERROR: ToolMenu: Unexpected command! " + command);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue