From 68728e18f331229638aa12042996930145718ea1 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Mon, 13 Sep 2021 01:16:56 +0200 Subject: [PATCH] Remove dependency on translations --- UI/Base/Title.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/UI/Base/Title.ts b/UI/Base/Title.ts index 893313fba..d9b1c464c 100644 --- a/UI/Base/Title.ts +++ b/UI/Base/Title.ts @@ -1,5 +1,5 @@ import BaseUIElement from "../BaseUIElement"; -import Translations from "../i18n/Translations"; +import {FixedUiElement} from "./FixedUiElement"; export default class Title extends BaseUIElement { private readonly _embedded: BaseUIElement; @@ -7,7 +7,11 @@ export default class Title extends BaseUIElement { constructor(embedded: string | BaseUIElement, level: number = 3) { super() - this._embedded = Translations.W(embedded); + if(typeof embedded === "string"){ + this._embedded = new FixedUiElement(embedded) + }else{ + this._embedded = embedded + } this._level = level; }