From 4411297dc00f5fa33864530756fbeeaf617bb2c7 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 2 Apr 2022 17:03:08 +0800 Subject: fixes --- features/settings/index.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'features/settings/index.js') 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){ -- cgit