diff --git a/src/css/ingame_hud/entity_debugger.scss b/src/css/ingame_hud/entity_debugger.scss
index 15f03848..6d0b4c52 100644
--- a/src/css/ingame_hud/entity_debugger.scss
+++ b/src/css/ingame_hud/entity_debugger.scss
@@ -1,43 +1,61 @@
#ingame_HUD_EntityDebugger {
position: absolute;
+ background: $ingameHudBg;
+ @include S(padding, 5px);
@include S(right, 30px);
- @include S(top, 200px);
- font-size: 14px;
- line-height: 16px;
- color: #fff;
- background: rgba(0, 10, 20, 0.7);
- padding: 10px;
+ top: 50%;
+ transform: translateY(-50%);
+
+ @include SuperSmallText;
+ color: #eee;
+ display: flex;
+ flex-direction: column;
+
+ > label {
+ text-transform: uppercase;
+ }
+
+ .hint {
+ color: #aaa;
+ }
+
&,
* {
pointer-events: all;
}
- .flag {
- display: inline-block;
- background: #333438;
- @include S(padding, 2px);
- @include S(margin-right, 2px);
+ .propertyTable,
+ .entityComponents,
+ .entityComponents .object > div {
+ @include S(margin-top, 5px);
- u {
- opacity: 0.5;
- }
+ display: grid;
+ grid-template-columns: 1fr auto;
+ @include S(column-gap, 10px);
}
- .components {
- @include S(margin-top, 4px);
- display: grid;
- grid-template-columns: 1fr 1fr;
- @include S(grid-gap, 3px);
- .component {
- @include S(padding, 2px);
- background: #333;
- display: flex;
- flex-direction: column;
+ .entityComponents {
+ grid-column: 1 / 3;
+ font-family: "Roboto Mono", "Fira Code", monospace;
+ font-size: 90%;
+ @include S(letter-spacing, -0.5px);
- .data {
- @include S(width, 150px);
- @include S(height, 130px);
+ label,
+ span {
+ line-height: 140%;
+
+ &:not(span) {
+ opacity: 0.5;
+ }
+ }
+
+ .object {
+ grid-column: 1 / 3;
+ line-height: 140%;
+
+ > div {
+ @include S(margin-left, 4px);
}
}
}
diff --git a/src/js/game/hud/hud.js b/src/js/game/hud/hud.js
index 3edc4e17..111f062a 100644
--- a/src/js/game/hud/hud.js
+++ b/src/js/game/hud/hud.js
@@ -108,7 +108,7 @@ export class GameHUD {
this.parts.keybindingOverlay = new HUDKeybindingOverlay(this.root);
}
- if (G_IS_DEV && globalConfig.debug.enableEntityInspector) {
+ if (queryParamOptions.sandboxMode || (G_IS_DEV && globalConfig.debug.enableEntityInspector)) {
this.parts.entityDebugger = new HUDEntityDebugger(this.root);
}
diff --git a/src/js/game/hud/parts/entity_debugger.js b/src/js/game/hud/parts/entity_debugger.js
index 80f15eea..6f501d6b 100644
--- a/src/js/game/hud/parts/entity_debugger.js
+++ b/src/js/game/hud/parts/entity_debugger.js
@@ -1,6 +1,7 @@
import { BaseHUDPart } from "../base_hud_part";
import { makeDiv, removeAllChildren } from "../../../core/utils";
import { globalConfig } from "../../../core/config";
+import { DynamicDomAttach } from "../dynamic_dom_attach";
export class HUDEntityDebugger extends BaseHUDPart {
createElements(parent) {
@@ -9,9 +10,14 @@ export class HUDEntityDebugger extends BaseHUDPart {
"ingame_HUD_EntityDebugger",
[],
`
- Tile below cursor:
- Chunk below cursor:
-