From 7823fdfab0bdb7d160e10ec3ff8c2b1387aea46b Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Sat, 17 May 2025 15:23:02 -0400 Subject: [PATCH] dev: add lazy render option for UIElement --- src/gui/src/UI/UIElement.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/src/UI/UIElement.js b/src/gui/src/UI/UIElement.js index e50fbfb6..198cb3a7 100644 --- a/src/gui/src/UI/UIElement.js +++ b/src/gui/src/UI/UIElement.js @@ -126,7 +126,9 @@ export default def(class UIElement extends AdvancedBase { style.textContent = this.constructor.CSS; document.head.appendChild(style); } - this.make(this); + if ( ! this.constructor.LAZY_RENDER ) { + this.make(this); + } } reinitialize () {