mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Merge pull request #4058 from huffman/entity-tool-updates
Entity tool updates
This commit is contained in:
commit
ddea2c4a68
5 changed files with 24 additions and 9 deletions
|
@ -42,7 +42,15 @@ gridTool = GridTool({ horizontalGrid: grid });
|
|||
Script.include("libraries/entityList.js");
|
||||
var entityListTool = EntityListTool();
|
||||
|
||||
selectionManager.addEventListener(selectionDisplay.updateHandles);
|
||||
var hasShownPropertiesTool = false;
|
||||
|
||||
selectionManager.addEventListener(function() {
|
||||
selectionDisplay.updateHandles();
|
||||
if (selectionManager.hasSelection() && !hasShownPropertiesTool) {
|
||||
propertiesTool.setVisible(true);
|
||||
hasShownPropertiesTool = true;
|
||||
}
|
||||
});
|
||||
|
||||
var windowDimensions = Controller.getViewportDimensions();
|
||||
var toolIconUrl = HIFI_PUBLIC_BUCKET + "images/tools/";
|
||||
|
@ -223,10 +231,9 @@ var toolBar = (function () {
|
|||
selectionManager.clearSelections();
|
||||
cameraManager.disable();
|
||||
} else {
|
||||
hasShownPropertiesTool = false;
|
||||
cameraManager.enable();
|
||||
entityListTool.setVisible(true);
|
||||
gridTool.setVisible(true);
|
||||
propertiesTool.setVisible(true);
|
||||
grid.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -618,7 +618,7 @@
|
|||
<tr>
|
||||
<td class="label">Script URL</td>
|
||||
<td>
|
||||
<input id="property-script-url"></input>
|
||||
<input id="property-script-url" class="url"></input>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -637,13 +637,13 @@
|
|||
<tr class="model-section">
|
||||
<td class="label">Model URL</td>
|
||||
<td>
|
||||
<input type="text" id="property-model-url"></input>
|
||||
<input type="text" id="property-model-url" class="url"></input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-section">
|
||||
<td class="label">Animation URL</td>
|
||||
<td>
|
||||
<input type="text" id="property-model-animation-url"></input>
|
||||
<input type="text" id="property-model-animation-url" class="url"></input>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="model-section">
|
||||
|
|
|
@ -96,6 +96,10 @@ input {
|
|||
background-color: #eee;
|
||||
}
|
||||
|
||||
input.url {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table#entity-table {
|
||||
border-collapse: collapse;
|
||||
font-family: Sans-Serif;
|
||||
|
@ -171,7 +175,7 @@ table#properties-table {
|
|||
}
|
||||
|
||||
#properties-table td {
|
||||
padding: 5px 0px 5px 10px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
col#col-label {
|
||||
|
|
|
@ -439,7 +439,11 @@ GridTool = function(opts) {
|
|||
} else if (overlay == uiOverlays.snapToGridCheckbox.overlay) {
|
||||
horizontalGrid.setSnapToGrid(!horizontalGrid.getSnapToGrid());
|
||||
} else if (overlay == uiOverlays.moveToAvatar.overlay) {
|
||||
horizontalGrid.setPosition(MyAvatar.position);
|
||||
var position = MyAvatar.getJointPosition("LeftFoot");
|
||||
if (position.x == 0 && position.y == 0 && position.z == 0) {
|
||||
position = MyAvatar.position;
|
||||
}
|
||||
horizontalGrid.setPosition(position);
|
||||
} else if (overlay == uiOverlays.moveToSelection.overlay) {
|
||||
var newPosition = selectionManager.worldPosition;
|
||||
newPosition = Vec3.subtract(newPosition, { x: 0, y: selectionManager.worldDimensions.y * 0.5, z: 0 });
|
||||
|
|
|
@ -599,7 +599,7 @@ Menu::Menu() :
|
|||
|
||||
AudioIOStatsRenderer::SharedPointer statsRenderer = DependencyManager::get<AudioIOStatsRenderer>();
|
||||
addCheckableActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioStats,
|
||||
Qt::CTRL | Qt::Key_A,
|
||||
Qt::CTRL | Qt::SHIFT | Qt::Key_A,
|
||||
false,
|
||||
statsRenderer.data(),
|
||||
SLOT(toggle()));
|
||||
|
|
Loading…
Reference in a new issue