diff options
Diffstat (limited to 'features/soopyGui/GuiPage.js')
-rw-r--r-- | features/soopyGui/GuiPage.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/features/soopyGui/GuiPage.js b/features/soopyGui/GuiPage.js index 13778fe..fb93bbe 100644 --- a/features/soopyGui/GuiPage.js +++ b/features/soopyGui/GuiPage.js @@ -5,15 +5,31 @@ class GuiPage{ this.currentPageId = 0; this.priority = priority - this.soopyGui = require('./index.js').class; + this.soopyGui = undefined; + new Thread(()=>{ + while(global.soopyv2featuremanagerthing.features["soopyGui"] === undefined){ + Thread.sleep(100) + } + + this.soopyGui = global.soopyv2featuremanagerthing.features["soopyGui"].class; + + if(this.finalisedLoading){ + this.finaliseLoading() + } + }).start() this.name = "" this.pages = {} this.showBackButton = true + this.finalisedLoading = false } finaliseLoading(){ + if(!this.soopyGui){ + this.finalisedLoading = true + return + } this.soopyGui.addCategory(this); } |