mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:36:26 +02:00
checkboxes working
This commit is contained in:
parent
f85916e808
commit
94fdf6b091
2 changed files with 11 additions and 3 deletions
|
@ -501,7 +501,7 @@
|
||||||
elDynamic.checked = properties.dynamic;
|
elDynamic.checked = properties.dynamic;
|
||||||
|
|
||||||
|
|
||||||
|
console.log('STARTCHECK', properties.collidesWith)
|
||||||
elCollideStatic.checked = properties.collidesWith.indexOf("static") > -1;
|
elCollideStatic.checked = properties.collidesWith.indexOf("static") > -1;
|
||||||
elCollideKinematic.checked = properties.collidesWith.indexOf("kinematic") > -1;
|
elCollideKinematic.checked = properties.collidesWith.indexOf("kinematic") > -1;
|
||||||
elCollideDynamic.checked = properties.collidesWith.indexOf("dynamic") > -1;
|
elCollideDynamic.checked = properties.collidesWith.indexOf("dynamic") > -1;
|
||||||
|
@ -743,17 +743,20 @@
|
||||||
propertyValue = propertyValue.replace(subPropertyString + ",", "");
|
propertyValue = propertyValue.replace(subPropertyString + ",", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _properties ={}
|
||||||
|
_properties[propertyName] = propertyValue;
|
||||||
|
|
||||||
EventBridge.emitWebEvent(
|
EventBridge.emitWebEvent(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
type: "update",
|
type: "update",
|
||||||
properties: {propertyName: propertyValue}
|
properties: _properties
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
elCollideDynamic.addEventListener('change', function() {
|
elCollideDynamic.addEventListener('change', function() {
|
||||||
|
console.log("CHANGE!")
|
||||||
updateCheckedSubProperty("collidesWith", properties.collidesWith, elCollideDynamic, 'dynamic');
|
updateCheckedSubProperty("collidesWith", properties.collidesWith, elCollideDynamic, 'dynamic');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -8,12 +8,16 @@ EntityListTool = function(opts) {
|
||||||
title: 'Entities', source: url, toolWindow: true
|
title: 'Entities', source: url, toolWindow: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var searchRadius = 100;
|
var searchRadius = 100;
|
||||||
|
|
||||||
var visible = false;
|
var visible = false;
|
||||||
|
|
||||||
webView.setVisible(visible);
|
webView.setVisible(visible);
|
||||||
|
|
||||||
|
that.webView = webView;
|
||||||
|
|
||||||
that.setVisible = function(newVisible) {
|
that.setVisible = function(newVisible) {
|
||||||
visible = newVisible;
|
visible = newVisible;
|
||||||
webView.setVisible(visible);
|
webView.setVisible(visible);
|
||||||
|
@ -71,6 +75,7 @@ EntityListTool = function(opts) {
|
||||||
webView.eventBridge.emitScriptEvent(JSON.stringify(data));
|
webView.eventBridge.emitScriptEvent(JSON.stringify(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
webView.eventBridge.webEventReceived.connect(function(data) {
|
webView.eventBridge.webEventReceived.connect(function(data) {
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
if (data.type == "selectionUpdate") {
|
if (data.type == "selectionUpdate") {
|
||||||
|
|
Loading…
Reference in a new issue