Change watermark interval

This commit is contained in:
tobspr 2020-09-29 18:06:39 +02:00
parent 344f213566
commit 8b7c0a91cd
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,9 @@ import { T } from "../../../translations";
import { BaseHUDPart } from "../base_hud_part";
import { DynamicDomAttach } from "../dynamic_dom_attach";
const watermarkShowIntervalSeconds = G_IS_DEV ? 120 : 7 * 60;
const watermarkShowDuration = 5;
export class HUDWatermark extends BaseHUDPart {
createElements(parent) {
this.element = makeDiv(
@ -38,7 +41,9 @@ export class HUDWatermark extends BaseHUDPart {
}
update() {
this.domAttach.update(this.root.time.realtimeNow() % (G_IS_DEV ? 20 : 180) < 5);
this.domAttach.update(
this.root.time.realtimeNow() % watermarkShowIntervalSeconds < watermarkShowDuration
);
}
onWatermarkClick() {