From ee952cd190b367a05d7b6879b3d954ebcbcf5721 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sun, 6 Feb 2022 12:48:29 +0800 Subject: fix bug --- features/soopyGui/GuiPage.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'features') diff --git a/features/soopyGui/GuiPage.js b/features/soopyGui/GuiPage.js index 812c831..66dcb0c 100644 --- a/features/soopyGui/GuiPage.js +++ b/features/soopyGui/GuiPage.js @@ -6,14 +6,6 @@ class GuiPage{ this.currentPageId = 0; this.priority = priority - this.soopyGui = undefined; - new Thread(()=>{ - while(global.soopyv2featuremanagerthing === undefined || global.soopyv2featuremanagerthing.features === undefined || global.soopyv2featuremanagerthing.features["soopyGui"] === undefined){ - Thread.sleep(100) - } - - this.soopyGui = global.soopyv2featuremanagerthing.features["soopyGui"].class; - }).start() this.name = "" this.pages = {} @@ -26,6 +18,10 @@ class GuiPage{ categoryManager.addCategory(this); } + getSoopyGui(){ + return global.soopyv2featuremanagerthing.features["soopyGui"].class + } + newPage(){ this.currentPageId++ let page = new SoopyGuiElement().setLocation(1*this.currentPageId,0,1,1) @@ -38,14 +34,14 @@ class GuiPage{ } goToPage(page, anim){ - this.soopyGui.goToPageNum(page, anim) + this.getSoopyGui().goToPageNum(page, anim) } openSidebarPage(child){ - this.soopyGui.openSidebarPage(child) + this.getSoopyGui().openSidebarPage(child) } closeSidebarPage(){ - this.soopyGui.closeSidebarPage() + this.getSoopyGui().closeSidebarPage() } delete(){ -- cgit