aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/soopyGui/GuiPage.js18
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(){