1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2024-10-27 20:34:29 +00:00

debug info fixes

This commit is contained in:
dengr1065 2020-07-06 12:02:31 +03:00 committed by GitHub
parent 6546c023a6
commit f4c9c66354
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ export class HUDDebugInfo extends BaseHUDPart {
}
updateFullText() {
this.element.classList.toggle("debugFull", this.full);
this.element.setAttribute("data-mode", this.mode);
let version = `version ${G_BUILD_VERSION}`;
if (this.full) {
@ -61,12 +61,14 @@ export class HUDDebugInfo extends BaseHUDPart {
break;
}
this.updateFullText();
this.domAttach.update(this.mode != enumDebugOverlayMode.disabled);
this.domAttach.update(this.mode !== enumDebugOverlayMode.disabled);
}
update() {
const now = this.root.time.realtimeNow();
if (now - this.lastTick > 0.25 && this.visible) {
if (!this.visible) return;
if (now - this.lastTick > 0.25) {
this.lastTick = now;
this.tickRateElement.innerText = "Tickrate: " + this.root.dynamicTickrate.currentTickRate;
this.fpsElement.innerText =