mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 12:15:13 +02:00
Add "group" bool button and icon
This commit is contained in:
parent
f2cf2cab6e
commit
12d911f290
3 changed files with 18 additions and 1 deletions
|
@ -17,10 +17,12 @@ ToolIcon = function (side) {
|
|||
|
||||
var SCALE_TOOL = 0,
|
||||
CLONE_TOOL = 1,
|
||||
GROUP_TOOL = 2,
|
||||
|
||||
ICON_COLORS = [
|
||||
{ red: 0, green: 240, blue: 240 },
|
||||
{ red: 240, green: 0, blue: 240 }
|
||||
{ red: 240, green: 0, blue: 240 },
|
||||
{ red: 240, green: 240, blue: 0 }
|
||||
],
|
||||
|
||||
LEFT_HAND = 0,
|
||||
|
@ -100,6 +102,7 @@ ToolIcon = function (side) {
|
|||
return {
|
||||
SCALE_TOOL: SCALE_TOOL,
|
||||
CLONE_TOOL: CLONE_TOOL,
|
||||
GROUP_TOOL: GROUP_TOOL,
|
||||
setHand: setHand,
|
||||
update: update,
|
||||
display: display,
|
||||
|
|
|
@ -86,6 +86,11 @@ ToolMenu = function (side, leftInputs, rightInputs, setToolCallback) {
|
|||
position: { x: 0.06, y: 0.02, z: 0.0 },
|
||||
color: { red: 240, green: 0, blue: 240 },
|
||||
callback: "clone"
|
||||
},
|
||||
{ // Group
|
||||
position: { x: 0.10, y: 0.02, z: 0.0 },
|
||||
color: { red: 240, green: 240, blue: 0 },
|
||||
callback: "group"
|
||||
}
|
||||
],
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
TOOL_NONE = 0,
|
||||
TOOL_SCALE = 1,
|
||||
TOOL_CLONE = 2,
|
||||
TOOL_GROUP = 3,
|
||||
toolSelected = TOOL_NONE,
|
||||
|
||||
// Primary objects
|
||||
|
@ -261,6 +262,7 @@
|
|||
clearToolIcon: clearToolIcon,
|
||||
SCALE_TOOL: toolIcon.SCALE_TOOL,
|
||||
CLONE_TOOL: toolIcon.CLONE_TOOL,
|
||||
GROUP_TOOL: toolIcon.GROUP_TOOL,
|
||||
display: display,
|
||||
update: update,
|
||||
clear: clear,
|
||||
|
@ -1062,6 +1064,10 @@
|
|||
toolSelected = TOOL_CLONE;
|
||||
ui.setToolIcon(ui.CLONE_TOOL);
|
||||
break;
|
||||
case "group":
|
||||
toolSelected = TOOL_GROUP;
|
||||
ui.setToolIcon(ui.GROUP_TOOL);
|
||||
break;
|
||||
default:
|
||||
debug("ERROR: Unexpected condition in setTool()!");
|
||||
}
|
||||
|
@ -1110,6 +1116,9 @@
|
|||
case TOOL_CLONE:
|
||||
ui.setToolIcon(ui.CLONE_TOOL);
|
||||
break;
|
||||
case TOOL_GROUP:
|
||||
ui.setToolIcon(ui.GROUP_TOOL);
|
||||
break;
|
||||
}
|
||||
|
||||
if (isAppActive) {
|
||||
|
|
Loading…
Reference in a new issue