mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 22:42:42 +02:00
Add undo and redo buttons to Tools menu
This commit is contained in:
parent
be049009c8
commit
afb47dcfb2
5 changed files with 138 additions and 11 deletions
7
scripts/vr-edit/assets/tools/redo-icon.svg
Normal file
7
scripts/vr-edit/assets/tools/redo-icon.svg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="180" height="186" viewBox="0 0 180.00 186.00" enable-background="new 0 0 180.00 186.00" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path fill="#AFAFAF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 37.7352,146.571C 43.834,141.827 44.3355,136.23 39.2396,129.779C 28.7497,117.229 23.9249,102.741 24.7652,86.3146C 25.6054,69.8885 31.9617,55.7393 43.834,43.867C 56.3569,31.3442 71.4277,25.0828 89.0464,25.0828C 106.665,25.0828 121.749,31.3577 134.299,43.9077C 148.177,57.7858 154.954,73.0192 154.629,89.6079C 154.276,104.868 146.998,120.63 132.795,136.894L 132.266,121.159C 132.266,113.678 128.201,109.612 120.069,108.961C 117.033,109.287 114.322,110.642 111.937,113.027C 109.227,115.738 108.034,118.611 108.359,121.647L 108.888,165.843C 108.888,167.198 109.227,168.892 109.904,170.925C 111.937,175.669 115.664,178.04 121.085,178.04L 165.81,178.04C 168.52,178.04 171.061,176.854 173.433,174.483C 175.805,172.111 177.153,169.407 177.479,166.371C 177.479,158.24 173.413,154.174 165.281,154.174L 150.075,154.174C 168.696,133.492 178.17,112.146 178.495,90.1365C 179.525,66.7713 170.716,45.7644 152.067,27.1157C 134.801,9.84937 113.97,1.21619 89.5749,1.21619C 65.1798,1.21619 44.349,9.84935 27.0827,27.1157C 10.8193,43.3791 2.17256,62.6919 1.14254,85.0541C 0.112521,107.416 6.72631,127.407 20.9839,145.026C 22.9897,147.736 25.6935,149.261 29.0953,149.6C 32.4971,149.938 35.377,148.929 37.7352,146.571 Z "/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
10
scripts/vr-edit/assets/tools/redo-label.svg
Normal file
10
scripts/vr-edit/assets/tools/redo-label.svg
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="192" height="59" viewBox="0 0 192.00 59.00" enable-background="new 0 0 192.00 59.00" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 19.9033,35.58L 13.9533,35.58L 13.9533,57.3843L 2.28885,57.3843L 2.28885,1.72698L 19.4323,1.72698C 26.7789,1.72698 32.3033,3.10498 36.0055,5.86099C 39.7077,8.61699 41.5589,12.7799 41.5589,18.3498C 41.5589,22.0438 40.687,25.0704 38.9433,27.4297C 37.1996,29.7891 34.4767,31.7703 30.7745,33.3735L 44.8933,57.3843L 31.6422,57.3843L 19.9033,35.58 Z M 13.9533,27.1136L 20.0645,27.1136C 23.18,27.1136 25.531,26.4091 27.1177,25.0002C 28.7044,23.5912 29.4977,21.3702 29.4977,18.3374C 29.4977,15.5112 28.6651,13.4472 26.9999,12.1457C 25.3348,10.8441 22.7296,10.1933 19.1844,10.1933L 13.9533,10.1933L 13.9533,27.1136 Z "/>
|
||||||
|
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 82.18,10.1933L 62.3467,10.1933L 62.3467,24.7336L 79.6388,24.7336L 79.6388,33.2L 62.3467,33.2L 62.3467,48.5336L 83.6055,48.5336L 83.6055,57L 50.6822,57L 50.6822,1.72698L 83.4444,1.72698L 82.18,10.1933 Z "/>
|
||||||
|
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 107.096,1.72698C 115.657,1.72698 122.516,3.68346 127.673,7.59641C 132.829,11.5094 135.408,18.6845 135.408,29.1218C 135.408,39.3442 132.883,46.5462 127.834,50.7277C 122.785,54.9092 116.318,57 108.434,57L 92.7289,57L 92.7289,1.72698L 107.096,1.72698 Z M 104.393,10.1933L 104.393,48.5336L 109.153,48.5336C 113.649,48.5336 117.126,47.1247 119.584,44.3067C 122.043,41.4887 123.272,36.427 123.272,29.1218C 123.272,24.0725 122.65,20.1513 121.407,17.3581C 120.163,14.5649 118.51,12.6725 116.448,11.6808C 114.386,10.6892 111.876,10.1933 108.918,10.1933L 104.393,10.1933 Z "/>
|
||||||
|
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 165.951,0.933643C 170.975,0.933643 175.314,2.06166 178.967,4.31771C 182.619,6.57375 185.423,9.85245 187.377,14.1538C 189.332,18.4552 190.309,23.6552 190.309,29.754C 190.309,35.7535 189.332,40.9185 187.377,45.2487C 185.423,49.579 182.619,52.8846 178.967,55.1654C 175.314,57.4463 170.975,58.5867 165.951,58.5867C 160.927,58.5867 156.578,57.4586 152.904,55.2026C 149.231,52.9466 146.415,49.6555 144.457,45.3293C 142.498,41.0032 141.519,35.8114 141.519,29.754C 141.519,23.8122 142.511,18.6783 144.494,14.3521C 146.477,10.026 149.308,6.70804 152.985,4.39828C 156.662,2.08852 160.984,0.933643 165.951,0.933643 Z M 165.951,9.4C 161.935,9.4 158.908,11.0156 156.871,14.2468C 154.834,17.478 153.816,22.647 153.816,29.754C 153.816,36.8692 154.846,42.0424 156.908,45.2735C 158.97,48.5047 161.984,50.1203 165.951,50.1203C 169.976,50.1203 172.992,48.5171 175,45.3107C 177.008,42.1043 178.012,36.9188 178.012,29.754C 178.012,22.5974 177.008,17.416 175,14.2096C 172.992,11.0032 169.976,9.4 165.951,9.4 Z "/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
7
scripts/vr-edit/assets/tools/undo-icon.svg
Normal file
7
scripts/vr-edit/assets/tools/undo-icon.svg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="180" height="186" viewBox="0 0 180.00 186.00" enable-background="new 0 0 180.00 186.00" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path fill="#AFAFAF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 142.265,146.571C 136.166,141.827 135.664,136.23 140.76,129.779C 151.25,117.229 156.075,102.741 155.235,86.3146C 154.395,69.8885 148.038,55.7393 136.166,43.867C 123.643,31.3442 108.572,25.0827 90.9536,25.0827C 73.3349,25.0827 58.2506,31.3577 45.7006,43.9077C 31.8225,57.7858 25.0461,73.0192 25.3713,89.6079C 25.7237,104.868 33.0016,120.63 47.205,136.894L 47.7335,121.159C 47.7335,113.678 51.7994,109.612 59.9311,108.961C 62.9669,109.287 65.6775,110.642 68.0628,113.027C 70.7734,115.738 71.966,118.611 71.6408,121.647L 71.1122,165.843C 71.1122,167.198 70.7734,168.892 70.0958,170.925C 68.0628,175.669 64.3358,178.04 58.9147,178.04L 14.1902,178.04C 11.4797,178.04 8.93849,176.854 6.56674,174.483C 4.19499,172.111 2.84649,169.407 2.52122,166.371C 2.52121,158.24 6.58708,154.174 14.7188,154.174L 29.9251,154.174C 11.3035,133.492 1.83001,112.146 1.50475,90.1365C 0.47474,66.7713 9.28409,45.7644 27.9328,27.1157C 45.1992,9.84935 66.0299,1.21617 90.425,1.21617C 114.82,1.21617 135.651,9.84935 152.917,27.1157C 169.181,43.3791 177.827,62.6919 178.857,85.0541C 179.887,107.416 173.274,127.407 159.016,145.026C 157.01,147.736 154.306,149.261 150.905,149.6C 147.503,149.938 144.623,148.929 142.265,146.571 Z "/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
10
scripts/vr-edit/assets/tools/undo-label.svg
Normal file
10
scripts/vr-edit/assets/tools/undo-label.svg
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="205" height="59" viewBox="0 0 205.00 59.00" enable-background="new 0 0 205.00 59.00" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path fill="#FFFFFF" fill-opacity="1" stroke-linejoin="round" d="M 43.3067,39.0384C 43.3067,42.8316 42.5133,46.197 40.9267,49.1348C 39.34,52.0727 36.9724,54.3824 33.8239,56.0641C 30.6753,57.7458 26.8533,58.5867 22.3577,58.5867C 15.5896,58.5867 10.4205,56.8099 6.85052,53.2565C 3.28052,49.703 1.49552,44.9636 1.49552,39.0384L 1.49552,1.86334L 13.16,1.86334L 13.16,38.8649C 13.16,42.6415 13.8996,45.4615 15.3789,47.3251C 16.8581,49.1886 19.1844,50.1203 22.3577,50.1203C 25.531,50.1203 27.8718,49.1886 29.3799,47.3251C 30.8881,45.4615 31.6422,42.6415 31.6422,38.8649L 31.6422,1.86334L 43.3067,1.86334L 43.3067,39.0384 Z "/>
|
||||||
|
<path fill="#FFFFFF" fill-opacity="1" stroke-linejoin="round" d="M 95.27,57L 80.271,57L 62.8177,13.1188C 63.297,16.9036 63.6813,20.4612 63.9705,23.7916C 64.2598,27.1219 64.4044,31.0225 64.4044,35.4932L 64.4044,57L 53.8555,57L 53.8555,1.46667L 68.5322,1.46667L 86.3078,45.6578C 85.25,38.4765 84.7212,31.886 84.7212,25.8865L 84.7212,1.46667L 95.27,1.46667L 95.27,57 Z "/>
|
||||||
|
<path fill="#FFFFFF" fill-opacity="1" stroke-linejoin="round" d="M 121.376,1.72699C 129.937,1.72699 136.796,3.68346 141.953,7.59641C 147.109,11.5094 149.688,18.6845 149.688,29.1218C 149.688,39.3442 147.163,46.5462 142.114,50.7277C 137.065,54.9092 130.598,57 122.714,57L 107.009,57L 107.009,1.72699L 121.376,1.72699 Z M 118.673,10.1933L 118.673,48.5336L 123.433,48.5336C 127.929,48.5336 131.406,47.1247 133.864,44.3067C 136.323,41.4887 137.552,36.427 137.552,29.1218C 137.552,24.0725 136.93,20.1513 135.687,17.3581C 134.443,14.5649 132.79,12.6725 130.728,11.6808C 128.666,10.6892 126.156,10.1933 123.198,10.1933L 118.673,10.1933 Z "/>
|
||||||
|
<path fill="#FFFFFF" fill-opacity="1" stroke-linejoin="round" d="M 180.231,0.933651C 185.255,0.933651 189.594,2.06167 193.247,4.31771C 196.899,6.57376 199.703,9.85245 201.657,14.1538C 203.612,18.4552 204.589,23.6552 204.589,29.754C 204.589,35.7535 203.612,40.9185 201.657,45.2488C 199.703,49.579 196.899,52.8846 193.247,55.1654C 189.594,57.4463 185.255,58.5867 180.231,58.5867C 175.207,58.5867 170.858,57.4586 167.184,55.2026C 163.511,52.9466 160.695,49.6555 158.737,45.3293C 156.778,41.0032 155.799,35.8114 155.799,29.754C 155.799,23.8122 156.79,18.6783 158.774,14.3521C 160.757,10.026 163.588,6.70804 167.265,4.39828C 170.942,2.08853 175.264,0.933651 180.231,0.933651 Z M 180.231,9.40001C 176.215,9.40001 173.188,11.0156 171.151,14.2468C 169.114,17.478 168.095,22.647 168.095,29.754C 168.095,36.8692 169.126,42.0424 171.188,45.2735C 173.25,48.5047 176.264,50.1203 180.231,50.1203C 184.256,50.1203 187.272,48.5171 189.28,45.3107C 191.288,42.1043 192.292,36.9188 192.292,29.754C 192.292,22.5974 191.288,17.416 189.28,14.2096C 187.272,11.0032 184.256,9.40001 180.231,9.40001 Z "/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
|
@ -252,8 +252,6 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
// Relative to menuButton.
|
// Relative to menuButton.
|
||||||
type: "image",
|
type: "image",
|
||||||
properties: {
|
properties: {
|
||||||
url: "../assets/tools/tool-label.svg",
|
|
||||||
scale: 0.0152,
|
|
||||||
localPosition: {
|
localPosition: {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: UIT.dimensions.menuButtonSublabelYOffset,
|
y: UIT.dimensions.menuButtonSublabelYOffset,
|
||||||
|
@ -1660,6 +1658,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
scale: 0.0241
|
scale: 0.0241
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sublabel: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/tool-label.svg",
|
||||||
|
scale: 0.0152
|
||||||
|
}
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
url: "../assets/tools/color-tool-heading.svg",
|
url: "../assets/tools/color-tool-heading.svg",
|
||||||
scale: 0.0631
|
scale: 0.0631
|
||||||
|
@ -1693,6 +1697,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
scale: 0.0311
|
scale: 0.0311
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sublabel: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/tool-label.svg",
|
||||||
|
scale: 0.0152
|
||||||
|
}
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
url: "../assets/tools/stretch-tool-heading.svg",
|
url: "../assets/tools/stretch-tool-heading.svg",
|
||||||
scale: 0.0737
|
scale: 0.0737
|
||||||
|
@ -1725,6 +1735,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
scale: 0.0231
|
scale: 0.0231
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sublabel: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/tool-label.svg",
|
||||||
|
scale: 0.0152
|
||||||
|
}
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
url: "../assets/tools/clone-tool-heading.svg",
|
url: "../assets/tools/clone-tool-heading.svg",
|
||||||
scale: 0.0621
|
scale: 0.0621
|
||||||
|
@ -1757,6 +1773,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
scale: 0.0250
|
scale: 0.0250
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sublabel: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/tool-label.svg",
|
||||||
|
scale: 0.0152
|
||||||
|
}
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
url: "../assets/tools/group-tool-heading.svg",
|
url: "../assets/tools/group-tool-heading.svg",
|
||||||
scale: 0.0647
|
scale: 0.0647
|
||||||
|
@ -1789,6 +1811,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
scale: 0.0297
|
scale: 0.0297
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sublabel: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/tool-label.svg",
|
||||||
|
scale: 0.0152
|
||||||
|
}
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
url: "../assets/tools/physics-tool-heading.svg",
|
url: "../assets/tools/physics-tool-heading.svg",
|
||||||
scale: 0.0712
|
scale: 0.0712
|
||||||
|
@ -1821,6 +1849,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
scale: 0.0254
|
scale: 0.0254
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sublabel: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/tool-label.svg",
|
||||||
|
scale: 0.0152
|
||||||
|
}
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
url: "../assets/tools/delete-tool-heading.svg",
|
url: "../assets/tools/delete-tool-heading.svg",
|
||||||
scale: 0.0653
|
scale: 0.0653
|
||||||
|
@ -1829,6 +1863,58 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
callback: {
|
callback: {
|
||||||
method: "deleteTool"
|
method: "deleteTool"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "undoButton",
|
||||||
|
type: "menuButton",
|
||||||
|
properties: {
|
||||||
|
localPosition: {
|
||||||
|
x: MENU_ITEM_XS[2],
|
||||||
|
y: MENU_ITEM_YS[2],
|
||||||
|
z: UIT.dimensions.panel.z / 2 + UI_ELEMENTS.menuButton.properties.dimensions.z / 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/undo-icon.svg",
|
||||||
|
dimensions: { x: 0.0180, y: 0.0186 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/undo-label.svg",
|
||||||
|
scale: 0.0205
|
||||||
|
}
|
||||||
|
},
|
||||||
|
callback: {
|
||||||
|
method: "undoAction"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "redoButton",
|
||||||
|
type: "menuButton",
|
||||||
|
properties: {
|
||||||
|
localPosition: {
|
||||||
|
x: MENU_ITEM_XS[3],
|
||||||
|
y: MENU_ITEM_YS[2],
|
||||||
|
z: UIT.dimensions.panel.z / 2 + UI_ELEMENTS.menuButton.properties.dimensions.z / 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/redo-icon.svg",
|
||||||
|
dimensions: { x: 0.0180, y: 0.0186 }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
properties: {
|
||||||
|
url: "../assets/tools/redo-label.svg",
|
||||||
|
scale: 0.0192
|
||||||
|
}
|
||||||
|
},
|
||||||
|
callback: {
|
||||||
|
method: "redoAction"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
COLOR_TOOL = 0, // Indexes of corresponding MENU_ITEMS item.
|
COLOR_TOOL = 0, // Indexes of corresponding MENU_ITEMS item.
|
||||||
|
@ -1917,10 +2003,14 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
|
|
||||||
function getIconInfo(tool) {
|
function getIconInfo(tool) {
|
||||||
// Provides details of tool icon, label, and sublabel images for the specified tool.
|
// Provides details of tool icon, label, and sublabel images for the specified tool.
|
||||||
|
var sublabelProperties;
|
||||||
|
|
||||||
|
sublabelProperties = Object.clone(UI_ELEMENTS.menuButton.sublabel);
|
||||||
|
sublabelProperties = Object.merge(sublabelProperties, MENU_ITEMS[tool].sublabel);
|
||||||
return {
|
return {
|
||||||
icon: MENU_ITEMS[tool].icon,
|
icon: MENU_ITEMS[tool].icon,
|
||||||
label: MENU_ITEMS[tool].label,
|
label: MENU_ITEMS[tool].label,
|
||||||
sublabel: UI_ELEMENTS.menuButton.sublabel
|
sublabel: sublabelProperties
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1977,13 +2067,16 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
menuLabelOverlays.push(overlayID);
|
menuLabelOverlays.push(overlayID);
|
||||||
|
|
||||||
// Sublabel.
|
// Sublabel.
|
||||||
properties = Object.clone(UI_ELEMENTS[UI_ELEMENTS.menuButton.sublabel.type].properties);
|
if (MENU_ITEMS[i].sublabel) {
|
||||||
properties = Object.merge(properties, UI_ELEMENTS.menuButton.sublabel.properties);
|
properties = Object.clone(UI_ELEMENTS[UI_ELEMENTS.menuButton.sublabel.type].properties);
|
||||||
properties.url = Script.resolvePath(properties.url);
|
properties = Object.merge(properties, UI_ELEMENTS.menuButton.sublabel.properties);
|
||||||
properties.visible = isVisible;
|
properties = Object.merge(properties, MENU_ITEMS[i].sublabel.properties);
|
||||||
properties.parentID = itemID;
|
properties.url = Script.resolvePath(properties.url);
|
||||||
overlayID = Overlays.addOverlay(UI_ELEMENTS[UI_ELEMENTS.menuButton.sublabel.type].overlay, properties);
|
properties.visible = isVisible;
|
||||||
menuLabelOverlays.push(overlayID);
|
properties.parentID = itemID;
|
||||||
|
overlayID = Overlays.addOverlay(UI_ELEMENTS[UI_ELEMENTS.menuButton.sublabel.type].overlay, properties);
|
||||||
|
menuLabelOverlays.push(overlayID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3086,7 +3179,7 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Button press actions.
|
// Button press actions.
|
||||||
if (intersectionOverlays === menuOverlays) {
|
if (intersectionOverlays === menuOverlays && intersectionItems[intersectedItem].toolOptions) {
|
||||||
openOptions(intersectionItems[intersectedItem]);
|
openOptions(intersectionItems[intersectedItem]);
|
||||||
}
|
}
|
||||||
if (intersectionItems[intersectedItem].command) {
|
if (intersectionItems[intersectedItem].command) {
|
||||||
|
|
Loading…
Reference in a new issue