diff --git a/src/css/ingame_hud/entity_debugger.scss b/src/css/ingame_hud/entity_debugger.scss index c8a41db1..4cf7e5e9 100644 --- a/src/css/ingame_hud/entity_debugger.scss +++ b/src/css/ingame_hud/entity_debugger.scss @@ -53,13 +53,27 @@ opacity: 0.5; } } + &, + * { + @include SuperSmallText; + @include S(font-size, 7px, $important: true); + @include S(line-height, 12px, $important: true); + } .object { grid-column: 1 / 3; line-height: 1.5em; + > summary { + transition: opacity 0.1s ease-in-out; + cursor: pointer; + &:hover { + opacity: 0.8; + } + } > div { @include S(margin-left, 4px); + cursor: pointer; } } } diff --git a/src/js/game/hud/parts/entity_debugger.js b/src/js/game/hud/parts/entity_debugger.js index fc701925..e290979c 100644 --- a/src/js/game/hud/parts/entity_debugger.js +++ b/src/js/game/hud/parts/entity_debugger.js @@ -1,8 +1,13 @@ -import { BaseHUDPart } from "../base_hud_part"; +/* dev:start */ import { makeDiv, removeAllChildren } from "../../../core/utils"; -import { globalConfig } from "../../../core/config"; +import { Vector } from "../../../core/vector"; +import { Entity } from "../../entity"; +import { BaseHUDPart } from "../base_hud_part"; import { DynamicDomAttach } from "../dynamic_dom_attach"; +/** + * Allows to inspect entities by pressing F8 while hovering them + */ export class HUDEntityDebugger extends BaseHUDPart { createElements(parent) { this.element = makeDiv( @@ -14,17 +19,10 @@ export class HUDEntityDebugger extends BaseHUDPart { Use F8 to toggle this overlay