mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-12 03:40:36 +02:00
Add group selection box buttons
This commit is contained in:
parent
906595e4fa
commit
a56a155cc3
3 changed files with 103 additions and 5 deletions
12
scripts/vr-edit/assets/tools/group/cancel-label.svg
Normal file
12
scripts/vr-edit/assets/tools/group/cancel-label.svg
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="380px" height="82px" viewBox="0 0 380 82" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>CANCEL</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Group-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group---Default---Locked-Buttons" transform="translate(-1573.000000, -2040.000000)" fill="#FFFFFF">
|
||||
<path d="M1607.78,2040.704 C1588.404,2040.704 1573.508,2055.04 1573.508,2081.136 C1573.508,2107.568 1587.62,2121.792 1608.228,2121.792 C1618.98,2121.792 1627.156,2117.088 1632.084,2112.048 L1624.468,2102.304 C1619.988,2105.776 1615.508,2108.8 1609.012,2108.8 C1598.372,2108.8 1590.868,2100.624 1590.868,2081.136 C1590.868,2060.976 1598.484,2053.136 1608.788,2053.136 C1614.164,2053.136 1618.644,2055.04 1622.9,2058.736 L1631.188,2049.104 C1624.804,2043.728 1618.084,2040.704 1607.78,2040.704 Z M1678.004,2102.64 L1653.7,2102.64 L1649.332,2120 L1632.196,2120 L1656.052,2042.496 L1676.1,2042.496 L1699.844,2120 L1682.372,2120 L1678.004,2102.64 Z M1674.868,2090.432 L1665.796,2054.704 L1656.836,2090.432 L1674.868,2090.432 Z M1765.476,2120 L1765.476,2042.496 L1750.58,2042.496 L1750.58,2076.544 C1750.58,2088.08 1752.036,2098.832 1752.82,2104.096 L1727.732,2042.496 L1707.012,2042.496 L1707.012,2120 L1721.908,2120 L1721.908,2089.872 C1721.908,2075.536 1720.564,2065.456 1719.668,2058.512 L1744.308,2120 L1765.476,2120 Z M1812.18,2040.704 C1792.804,2040.704 1777.908,2055.04 1777.908,2081.136 C1777.908,2107.568 1792.02,2121.792 1812.628,2121.792 C1823.38,2121.792 1831.556,2117.088 1836.484,2112.048 L1828.868,2102.304 C1824.388,2105.776 1819.908,2108.8 1813.412,2108.8 C1802.772,2108.8 1795.268,2100.624 1795.268,2081.136 C1795.268,2060.976 1802.884,2053.136 1813.188,2053.136 C1818.564,2053.136 1823.044,2055.04 1827.3,2058.736 L1835.588,2049.104 C1829.204,2043.728 1822.484,2040.704 1812.18,2040.704 Z M1890.244,2054.48 L1892.036,2042.496 L1845.78,2042.496 L1845.78,2120 L1892.26,2120 L1892.26,2107.904 L1862.244,2107.904 L1862.244,2086.512 L1886.66,2086.512 L1886.66,2074.64 L1862.244,2074.64 L1862.244,2054.48 L1890.244,2054.48 Z M1921.38,2106.784 L1921.38,2042.496 L1904.916,2042.496 L1904.916,2120 L1950.276,2120 L1952.068,2106.784 L1921.38,2106.784 Z" id="CANCEL"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
33
scripts/vr-edit/assets/tools/group/selection-box-label.svg
Normal file
33
scripts/vr-edit/assets/tools/group/selection-box-label.svg
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="161px" height="114px" viewBox="0 0 161 114" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 45.2 (43514) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>group-icon</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Group-Tool" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group---Default---Locked-Buttons" transform="translate(-2121.000000, -183.000000)" fill-rule="nonzero" fill="#E3E3E3">
|
||||
<g id="group-icon" transform="translate(2121.000000, 183.000000)">
|
||||
<path d="M4.75,19 C7.3739,19 9.5,16.8739 9.5,14.25 L9.5,9.5 L14.25,9.5 C16.8739,9.5 19,7.3739 19,4.75 C19,2.1261 16.8739,0 14.25,0 L4.75,0 C2.1261,0 0,2.1261 0,4.75 L0,14.25 C0,16.8739 2.1261,19 4.75,19 Z" id="Shape"></path>
|
||||
<path d="M27.75,10 L37.25,10 C39.8739,10 42,7.762 42,5 C42,2.238 39.8739,0 37.25,0 L27.75,0 C25.1261,0 23,2.238 23,5 C23,7.762 25.1261,10 27.75,10 Z" id="Shape"></path>
|
||||
<path d="M51.75,10 L61.25,10 C63.8739,10 66,7.762 66,5 C66,2.238 63.8739,0 61.25,0 L51.75,0 C49.1261,0 47,2.238 47,5 C47,7.762 49.1261,10 51.75,10 Z" id="Shape"></path>
|
||||
<path d="M98.75,10 L108.25,10 C110.8739,10 113,7.762 113,5 C113,2.238 110.8739,0 108.25,0 L98.75,0 C96.1261,0 94,2.238 94,5 C94,7.762 96.1261,10 98.75,10 Z" id="Shape"></path>
|
||||
<path d="M121.75,10 L131.25,10 C133.8739,10 136,7.762 136,5 C136,2.238 133.8739,0 131.25,0 L121.75,0 C119.1261,0 117,2.238 117,5 C117,7.762 119.1261,10 121.75,10 Z" id="Shape"></path>
|
||||
<path d="M74.75,10 L84.25,10 C86.8739,10 89,7.762 89,5 C89,2.238 86.8739,0 84.25,0 L74.75,0 C72.1261,0 70,2.238 70,5 C70,7.762 72.1261,10 74.75,10 Z" id="Shape"></path>
|
||||
<path d="M160,4.75 C160,2.1261 157.8739,0 155.25,0 L145.75,0 C143.1261,0 141,2.1261 141,4.75 C141,7.3739 143.1261,9.5 145.75,9.5 L150.5,9.5 L150.5,14.25 C150.5,16.8739 152.6261,19 155.25,19 C157.8739,19 160,16.8739 160,14.25 L160,4.75 Z" id="Shape"></path>
|
||||
<path d="M161,27.75 C161,25.1261 158.762,23 156,23 C153.238,23 151,25.1261 151,27.75 L151,37.25 C151,39.8739 153.238,42 156,42 C158.762,42 161,39.8739 161,37.25 L161,27.75 Z" id="Shape"></path>
|
||||
<path d="M161,51.75 C161,49.1261 158.762,47 156,47 C153.238,47 151,49.1261 151,51.75 L151,61.25 C151,63.8739 153.238,66 156,66 C158.762,66 161,63.8739 161,61.25 L161,51.75 Z" id="Shape"></path>
|
||||
<path d="M156,71 C153.238,71 151,73.1261 151,75.75 L151,85.25 C151,87.8739 153.238,90 156,90 C158.762,90 161,87.8739 161,85.25 L161,75.75 C161,73.1261 158.762,71 156,71 Z" id="Shape"></path>
|
||||
<path d="M145.75,113 L155.25,113 C157.8739,113 160,110.8739 160,108.25 L160,98.75 C160,96.1261 157.8739,94 155.25,94 C152.6261,94 150.5,96.1261 150.5,98.75 L150.5,103.5 L145.75,103.5 C143.1261,103.5 141,105.6261 141,108.25 C141,110.8739 143.1261,113 145.75,113 Z" id="Shape"></path>
|
||||
<path d="M121.75,114 L131.25,114 C133.8739,114 136,111.762 136,109 C136,106.238 133.8739,104 131.25,104 L121.75,104 C119.1261,104 117,106.238 117,109 C117,111.762 119.1261,114 121.75,114 Z" id="Shape"></path>
|
||||
<path d="M98.75,114 L108.25,114 C110.8739,114 113,111.762 113,109 C113,106.238 110.8739,104 108.25,104 L98.75,104 C96.1261,104 94,106.238 94,109 C94,111.762 96.1261,114 98.75,114 Z" id="Shape"></path>
|
||||
<path d="M51.75,114 L61.25,114 C63.8739,114 66,111.762 66,109 C66,106.238 63.8739,104 61.25,104 L51.75,104 C49.1261,104 47,106.238 47,109 C47,111.762 49.1261,114 51.75,114 Z" id="Shape"></path>
|
||||
<path d="M27.75,114 L37.25,114 C39.8739,114 42,111.762 42,109 C42,106.238 39.8739,104 37.25,104 L27.75,104 C25.1261,104 23,106.238 23,109 C23,111.762 25.1261,114 27.75,114 Z" id="Shape"></path>
|
||||
<path d="M74.75,114 L84.25,114 C86.8739,114 89,111.762 89,109 C89,106.238 86.8739,104 84.25,104 L74.75,104 C72.1261,104 70,106.238 70,109 C70,111.762 72.1261,114 74.75,114 Z" id="Shape"></path>
|
||||
<path d="M0,108.25 C0,110.8739 2.1261,113 4.75,113 L14.25,113 C16.8739,113 19,110.8739 19,108.25 C19,105.6261 16.8739,103.5 14.25,103.5 L9.5,103.5 L9.5,98.75 C9.5,96.1261 7.3739,94 4.75,94 C2.1261,94 0,96.1261 0,98.75 L0,108.25 Z" id="Shape"></path>
|
||||
<path d="M0,85.25 C0,87.8739 2.238,90 5,90 C7.762,90 10,87.8739 10,85.25 L10,75.75 C10,73.1261 7.762,71 5,71 C2.238,71 0,73.1261 0,75.75 L0,85.25 Z" id="Shape"></path>
|
||||
<path d="M0,61.25 C0,63.8739 2.238,66 5,66 C7.762,66 10,63.8739 10,61.25 L10,51.75 C10,49.1261 7.762,47 5,47 C2.238,47 0,49.1261 0,51.75 L0,61.25 Z" id="Shape"></path>
|
||||
<path d="M0,37.25 C0,39.8739 2.238,42 5,42 C7.762,42 10,39.8739 10,37.25 L10,27.75 C10,25.1261 7.762,23 5,23 C2.238,23 0,25.1261 0,27.75 L0,37.25 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
|
@ -990,12 +990,12 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
properties: {
|
||||
dimensions: {
|
||||
x: UIT.dimensions.buttonDimensions.x,
|
||||
y: 0.0680,
|
||||
y: 0.0400,
|
||||
z: UIT.dimensions.buttonDimensions.z
|
||||
},
|
||||
localPosition: {
|
||||
x: 0,
|
||||
y: UIT.dimensions.panel.y / 2 - 0.0280 - 0.0680 / 2,
|
||||
y: UIT.dimensions.panel.y / 2 - 0.0280 - 0.0400 / 2,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2
|
||||
},
|
||||
color: UIT.colors.baseGrayShadow
|
||||
|
@ -1018,16 +1018,15 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
properties: {
|
||||
dimensions: {
|
||||
x: UIT.dimensions.buttonDimensions.x,
|
||||
y: 0.0680,
|
||||
y: 0.0400,
|
||||
z: UIT.dimensions.buttonDimensions.z
|
||||
},
|
||||
localPosition: {
|
||||
x: 0,
|
||||
y: -UIT.dimensions.panel.y / 2 + 0.0120 + 0.0680 / 2,
|
||||
y: UIT.dimensions.panel.y / 2 - 0.0280 - 0.0400 - 0.0040 - 0.0400 / 2,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2
|
||||
},
|
||||
color: UIT.colors.baseGrayShadow
|
||||
|
||||
},
|
||||
enabledColor: UIT.colors.redHighlight,
|
||||
highlightColor: UIT.colors.redAccent,
|
||||
|
@ -1040,6 +1039,60 @@ ToolsMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
|
|||
callback: {
|
||||
method: "ungroupButton"
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "groupRule2",
|
||||
type: "horizontalRule",
|
||||
properties: {
|
||||
localPosition: {
|
||||
x: 0,
|
||||
y: -UIT.dimensions.panel.y / 2 + 0.0603,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.imageOverlayOffset
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "groupSelectionBoxButton",
|
||||
type: "toggleButton",
|
||||
properties: {
|
||||
dimensions: { x: 0.1042, y: 0.0400, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: {
|
||||
x: -0.0040 - 0.1042 / 2,
|
||||
y: -0.0900 + 0.0120 + 0.0400 / 2,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2
|
||||
}
|
||||
},
|
||||
label: {
|
||||
url: "../assets/tools/group/selection-box-label.svg",
|
||||
scale: 0.0161
|
||||
},
|
||||
command: {
|
||||
method: "toggleGroupSelectionBox"
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "groupsSelectionBoxCancelButton",
|
||||
type: "button",
|
||||
properties: {
|
||||
dimensions: { x: 0.1042, y: 0.0400, z: UIT.dimensions.buttonDimensions.z },
|
||||
localPosition: {
|
||||
x: 0.0040 + 0.1042 / 2,
|
||||
y: -0.0900 + 0.0120 + 0.0400 / 2,
|
||||
z: UIT.dimensions.panel.z / 2 + UIT.dimensions.buttonDimensions.z / 2
|
||||
},
|
||||
color: UIT.colors.baseGrayShadow
|
||||
},
|
||||
enabledColor: UIT.colors.greenHighlight,
|
||||
highlightColor: UIT.colors.greenShadow,
|
||||
label: {
|
||||
url: "../assets/tools/group/cancel-label.svg",
|
||||
scale: 0.0380,
|
||||
color: UIT.colors.baseGray
|
||||
},
|
||||
labelEnabledColor: UIT.colors.white,
|
||||
command: {
|
||||
method: "cancelGroupSelectionBox"
|
||||
}
|
||||
}
|
||||
],
|
||||
physicsOptions: [
|
||||
|
|
Loading…
Reference in a new issue