1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Entity debugger style changes

This commit is contained in:
Exund 2020-09-12 13:49:46 +02:00
parent 64b2cea19f
commit d887c8dcd8
2 changed files with 28 additions and 16 deletions

View File

@ -1,7 +1,12 @@
#ingame_HUD_EntityDebugger { #ingame_HUD_EntityDebugger {
position: absolute; position: absolute;
@include S(right, 30px); @include S(right, 30px);
@include S(top, 200px);
bottom: 0;
height: calc(100vh - 200px * var(--ui-scale));
display: grid;
grid-template-rows: auto auto 1fr;
font-size: 14px; font-size: 14px;
line-height: 16px; line-height: 16px;
@ -24,10 +29,13 @@
} }
} }
.entityInfo {
overflow-y: auto;
.components { .components {
@include S(margin-top, 4px); @include S(margin-top, 4px);
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
overflow: auto;
@include S(grid-gap, 3px); @include S(grid-gap, 3px);
.component { .component {
@include S(padding, 2px); @include S(padding, 2px);
@ -35,9 +43,13 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.data {
@include S(width, 150px); @include S(width, 150px);
@include S(height, 130px); @include S(height, 150px);
.data {
resize: vertical;
flex-grow: 1;
}
} }
} }
} }

View File

@ -9,8 +9,8 @@ export class HUDEntityDebugger extends BaseHUDPart {
"ingame_HUD_EntityDebugger", "ingame_HUD_EntityDebugger",
[], [],
` `
Tile below cursor: <span class="mousePos"></span><br> <div>Tile below cursor: <span class="mousePos"></span></div>
Chunk below cursor: <span class="chunkPos"></span><br> <div>Chunk below cursor: <span class="chunkPos"></span></div>
<div class="entityInfo"></div> <div class="entityInfo"></div>
` `
); );
@ -41,7 +41,7 @@ export class HUDEntityDebugger extends BaseHUDPart {
const entity = this.root.map.getTileContent(worldTile, this.root.currentLayer); const entity = this.root.map.getTileContent(worldTile, this.root.currentLayer);
if (entity) { if (entity) {
removeAllChildren(this.entityInfoElem); removeAllChildren(this.entityInfoElem);
let html = "Entity"; let html = "<div>Entity</div>";
const flag = (name, val) => const flag = (name, val) =>
`<span class='flag' data-value='${val ? "1" : "0"}'><u>${name}</u> ${val}</span>`; `<span class='flag' data-value='${val ? "1" : "0"}'><u>${name}</u> ${val}</span>`;