diff options
Diffstat (limited to 'features/settings/index.js')
-rw-r--r-- | features/settings/index.js | 17 |
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){ |