mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Add new button in HMD
Add new button in HMD: - add undo and redo support - add HMD detection
This commit is contained in:
parent
08038fb1bc
commit
ab45a32fea
1 changed files with 12 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
// entityList.js
|
||||
//
|
||||
// Copyright 2014 High Fidelity, Inc.
|
||||
// Copyright 2020 Vircadia contributors.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
|
@ -73,7 +74,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
that.setVisible = function(newVisible) {
|
||||
visible = newVisible;
|
||||
webView.setVisible(shouldUseEditTabletApp() && visible);
|
||||
entityListWindow.setVisible(!shouldUseEditTabletApp() && visible);
|
||||
entityListWindow.setVisible(!shouldUseEditTabletApp() && visible);
|
||||
};
|
||||
|
||||
that.isVisible = function() {
|
||||
|
@ -163,6 +164,12 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
}
|
||||
|
||||
that.sendUpdate = function() {
|
||||
|
||||
emitJSONScriptEvent({
|
||||
"type": "confirmHMDstate",
|
||||
"isHmd": HMD.active
|
||||
});
|
||||
|
||||
PROFILE('Script-sendUpdate', function() {
|
||||
var entities = [];
|
||||
|
||||
|
@ -302,6 +309,10 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
SelectionDisplay.toggleSpaceMode();
|
||||
} else if (data.type === 'keyUpEvent') {
|
||||
keyUpEventFromUIWindow(data.keyUpEvent);
|
||||
} else if (data.type === 'undo') {
|
||||
undoHistory.undo();
|
||||
} else if (data.type === 'redo') {
|
||||
undoHistory.redo();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue