mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 21:42:13 +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;
|
||||
|
||||
|
||||
|
||||
console.log('STARTCHECK', properties.collidesWith)
|
||||
elCollideStatic.checked = properties.collidesWith.indexOf("static") > -1;
|
||||
elCollideKinematic.checked = properties.collidesWith.indexOf("kinematic") > -1;
|
||||
elCollideDynamic.checked = properties.collidesWith.indexOf("dynamic") > -1;
|
||||
|
@ -743,17 +743,20 @@
|
|||
propertyValue = propertyValue.replace(subPropertyString + ",", "");
|
||||
}
|
||||
|
||||
var _properties ={}
|
||||
_properties[propertyName] = propertyValue;
|
||||
|
||||
EventBridge.emitWebEvent(
|
||||
JSON.stringify({
|
||||
type: "update",
|
||||
properties: {propertyName: propertyValue}
|
||||
properties: _properties
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
elCollideDynamic.addEventListener('change', function() {
|
||||
console.log("CHANGE!")
|
||||
updateCheckedSubProperty("collidesWith", properties.collidesWith, elCollideDynamic, 'dynamic');
|
||||
});
|
||||
|
||||
|
|
|
@ -8,12 +8,16 @@ EntityListTool = function(opts) {
|
|||
title: 'Entities', source: url, toolWindow: true
|
||||
});
|
||||
|
||||
|
||||
|
||||
var searchRadius = 100;
|
||||
|
||||
var visible = false;
|
||||
|
||||
webView.setVisible(visible);
|
||||
|
||||
that.webView = webView;
|
||||
|
||||
that.setVisible = function(newVisible) {
|
||||
visible = newVisible;
|
||||
webView.setVisible(visible);
|
||||
|
@ -71,6 +75,7 @@ EntityListTool = function(opts) {
|
|||
webView.eventBridge.emitScriptEvent(JSON.stringify(data));
|
||||
}
|
||||
|
||||
|
||||
webView.eventBridge.webEventReceived.connect(function(data) {
|
||||
data = JSON.parse(data);
|
||||
if (data.type == "selectionUpdate") {
|
||||
|
|
Loading…
Reference in a new issue