diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-02-06 12:48:29 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-02-06 12:48:29 +0800 |
commit | ee952cd190b367a05d7b6879b3d954ebcbcf5721 (patch) | |
tree | 476c4ff0035eed89689276877f6ac463e6774c62 /features | |
parent | 8c65ef26f0e4e3275de2426183dc0ee892865de3 (diff) | |
download | SoopyV2-ee952cd190b367a05d7b6879b3d954ebcbcf5721.tar.gz SoopyV2-ee952cd190b367a05d7b6879b3d954ebcbcf5721.tar.bz2 SoopyV2-ee952cd190b367a05d7b6879b3d954ebcbcf5721.zip |
fix bug
Diffstat (limited to 'features')
-rw-r--r-- | features/soopyGui/GuiPage.js | 18 |
1 files changed, 7 insertions, 11 deletions
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(){ |