aboutsummaryrefslogtreecommitdiff
path: root/features/settings/index.js
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 /features/settings/index.js
parent76eb246b585318f1fd93b0492d6fdcb7b27be3ea (diff)
downloadSoopyV2-4411297dc00f5fa33864530756fbeeaf617bb2c7.tar.gz
SoopyV2-4411297dc00f5fa33864530756fbeeaf617bb2c7.tar.bz2
SoopyV2-4411297dc00f5fa33864530756fbeeaf617bb2c7.zip
fixes
Diffstat (limited to 'features/settings/index.js')
-rw-r--r--features/settings/index.js17
1 files changed, 16 insertions, 1 deletions
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){