";
- html += flag("registered", entity.registered);
- html += flag("uid", entity.uid);
- html += flag("destroyed", entity.destroyed);
- html += "
";
-
- html += "
";
+ html += property`registered ${entity.registered}`;
+ html += property`uid ${entity.uid}`;
+ html += property`destroyed ${entity.destroyed}`;
for (const componentId in entity.components) {
const data = entity.components[componentId];
- html += "
";
- html += "" + componentId + "";
- html += "";
+ html += "";
+ html += "" + componentId + "
";
- html += "
";
+ for (const property in data) {
+ // Put entity into recursion list, so it won't get "expanded"
+ html += this.propertyToHTML(property, data[property], 0, [entity]);
+ }
+
+ html += "
";
}
- html += "
";
-
- this.entityInfoElem.innerHTML = html;
+ this.componentsElem.innerHTML = html;
}
+
+ this.domAttach.update(this.visible);
}
- onMouseDown() {}
+ onMouseDown() {
+ // On click, update current entity
+
+ const mousePos = this.root.app.mousePosition;
+ if (!mousePos) {
+ return;
+ }
+ const worldPos = this.root.camera.screenToWorld(mousePos);
+ const worldTile = worldPos.toTileSpace();
+ }
}
diff --git a/src/js/game/key_action_mapper.js b/src/js/game/key_action_mapper.js
index d5a758a5..7140c927 100644
--- a/src/js/game/key_action_mapper.js
+++ b/src/js/game/key_action_mapper.js
@@ -204,22 +204,20 @@ export function getStringForKeyCode(code) {
case 115:
return "F4";
case 116:
- return "F4";
- case 117:
return "F5";
- case 118:
+ case 117:
return "F6";
- case 119:
+ case 118:
return "F7";
- case 120:
+ case 119:
return "F8";
- case 121:
+ case 120:
return "F9";
- case 122:
+ case 121:
return "F10";
- case 123:
+ case 122:
return "F11";
- case 124:
+ case 123:
return "F12";
case 144: