aboutsummaryrefslogtreecommitdiff
path: root/features/soopyGui
diff options
context:
space:
mode:
Diffstat (limited to 'features/soopyGui')
-rw-r--r--features/soopyGui/GuiPage.js6
-rw-r--r--features/soopyGui/index.js8
2 files changed, 13 insertions, 1 deletions
diff --git a/features/soopyGui/GuiPage.js b/features/soopyGui/GuiPage.js
index fb93bbe..583eab9 100644
--- a/features/soopyGui/GuiPage.js
+++ b/features/soopyGui/GuiPage.js
@@ -7,7 +7,7 @@ class GuiPage{
this.soopyGui = undefined;
new Thread(()=>{
- while(global.soopyv2featuremanagerthing.features["soopyGui"] === undefined){
+ while(global.soopyv2featuremanagerthing.features === undefined || global.soopyv2featuremanagerthing.features["soopyGui"] === undefined){
Thread.sleep(100)
}
@@ -55,6 +55,10 @@ class GuiPage{
this.soopyGui.closeSidebarPage()
}
+ delete(){
+ this.soopyGui.deleteCategory(this);
+ }
+
//Override me :D
onOpen(){
diff --git a/features/soopyGui/index.js b/features/soopyGui/index.js
index cb5b241..662221d 100644
--- a/features/soopyGui/index.js
+++ b/features/soopyGui/index.js
@@ -35,6 +35,7 @@ class SoopyGui extends Feature {
// this.gui.isDebugEnabled = true
this.registerCommand("soopyv2", this.openCommand)
+ this.registerCommand("soopy", this.openCommand)
this.mainWindowElement = new SoopyBoxElement().setLocation(0.25, 0.2, 0.5, 0.6)
@@ -92,6 +93,13 @@ class SoopyGui extends Feature {
this.updateButtons()
}
+ deleteCategory(category){
+ this.pages = this.pages.filter(a=>a!==category)
+ this.sortPages()
+
+ this.updateButtons()
+ }
+
updateButtons(){
if(!this.buttonListElm) return;