aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-02 17:03:08 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-02 17:03:08 +0800
commit4411297dc00f5fa33864530756fbeeaf617bb2c7 (patch)
treeac5438f1007d468d330dcbfe770956fedc1b4d2d
parent76eb246b585318f1fd93b0492d6fdcb7b27be3ea (diff)
downloadSoopyV2-4411297dc00f5fa33864530756fbeeaf617bb2c7.tar.gz
SoopyV2-4411297dc00f5fa33864530756fbeeaf617bb2c7.tar.bz2
SoopyV2-4411297dc00f5fa33864530756fbeeaf617bb2c7.zip
fixes
-rw-r--r--features/friendsGUI/index.js2
-rw-r--r--features/settings/index.js17
-rw-r--r--features/soopyGui/GuiPage.js5
-rw-r--r--features/soopyGui/index.js6
-rw-r--r--index.js2
5 files changed, 27 insertions, 5 deletions
diff --git a/features/friendsGUI/index.js b/features/friendsGUI/index.js
index 51335a9..0ad6bd3 100644
--- a/features/friendsGUI/index.js
+++ b/features/friendsGUI/index.js
@@ -18,7 +18,7 @@ class FriendsGui extends Feature {
this.GuiPage = new SettingPage()
- this.registerChat("&9-----------------------------------------------------&r&9${*}&r&9 ${*} &6Friends (Page ${pagenum} of ${maxpages})${friendslist}&r&9-----------------------------------------------------&r", (...args)=>{this.GuiPage.friendListMessageEvent.call(this.GuiPage, ...args)})
+ this.registerChat("&9&m-----------------------------------------------------&r&9${*}&r&9 ${*} &6Friends (Page ${pagenum} of ${maxpages})${friendslist}&r&9&m-----------------------------------------------------&r", (...args)=>{this.GuiPage.friendListMessageEvent.call(this.GuiPage, ...args)})
this.registerStep(true, 5, ()=>{this.GuiPage.regenGuiElements.call(this.GuiPage)})
}
diff --git a/features/settings/index.js b/features/settings/index.js
index 77309f5..9426337 100644
--- a/features/settings/index.js
+++ b/features/settings/index.js
@@ -143,6 +143,13 @@ class SettingPage extends GuiPage {
this.settingsCategoryArea.location.scroll.x.set(0, 0)
this.settingsCategoryArea.location.scroll.y.set(0, 0)
this.settingsCategoryArea._scrollAmount = 0
+
+ this.settingsCategorySearch.setText("")
+ this.updateSettingCategories()
+ }
+
+ onOpenPage(p){
+ if(p===1) this.updateSettingCategories()
}
updateSettingCategories(){
@@ -196,7 +203,7 @@ class SettingPage extends GuiPage {
setting.getGuiObject().location.location.y.set(height, 0)
this.settingsCategoryArea.addChild(setting.getGuiObject())
- height += 0.045+setting.getGuiObject().location.size.y.get()
+ height += 0.025+setting.getGuiObject().location.size.y.get()
}
})
}
@@ -278,6 +285,14 @@ class SettingPage extends GuiPage {
totalHeight += e.location.size.y.get()+Math.min(0.045,e.location.size.y.get())
})
+
+ totalHeight = 0
+
+ this.settingsCategoryArea.children.forEach(e=>{
+ e.location.location.y.set(totalHeight, 0)
+
+ totalHeight += e.location.size.y.get()+Math.min(0.025,e.location.size.y.get())
+ })
}
clickedOpenCategory(category){
diff --git a/features/soopyGui/GuiPage.js b/features/soopyGui/GuiPage.js
index 66dcb0c..35ce980 100644
--- a/features/soopyGui/GuiPage.js
+++ b/features/soopyGui/GuiPage.js
@@ -52,6 +52,11 @@ class GuiPage{
onOpen(){
}
+
+ //Override me :D
+ onOpenPage(page){
+
+ }
}
export default GuiPage; \ No newline at end of file
diff --git a/features/soopyGui/index.js b/features/soopyGui/index.js
index d9ef421..0f223e1 100644
--- a/features/soopyGui/index.js
+++ b/features/soopyGui/index.js
@@ -128,9 +128,9 @@ class SoopyGui extends Feature {
this.mainWindowElement.addChild(p)
})
- this.goToPageNum(1, anim)
-
category.onOpen()
+
+ this.goToPageNum(1, anim)
}
onDisable(){
@@ -185,6 +185,8 @@ class SoopyGui extends Feature {
this.categoryPage.location.location.x.set(-pageNum, animate?500:0)
this.backButton.location.location.y.set((pageNum === 0 || !this.currCategory.showBackButton)?-0.2:0, animate?500:0)
+
+ this.currCategory.onOpenPage(pageNum)
}
openSidebarPage(child){
this.sidebarPage.location.location.x.set(0.625, 500)
diff --git a/index.js b/index.js
index 7576769..246ea31 100644
--- a/index.js
+++ b/index.js
@@ -31,7 +31,7 @@ if(FileLib.read("soopyAddonsData", "deletesoopyv1please.txt") === "true"){
}else{
let a = register("worldLoad", ()=>{
new SoopyAddons()
- ChatLib.chat("Loading soopyv2")
+
a.unregister()
})
}