diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-10-31 09:49:42 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2021-10-31 09:49:42 +0800 |
commit | 48653ec89538f1650106a5e77463412cad4684c2 (patch) | |
tree | 09687cd579462e04d539fd4615369fa6dae13902 /features/soopyGui/GuiPage.js | |
download | SoopyV2-48653ec89538f1650106a5e77463412cad4684c2.tar.gz SoopyV2-48653ec89538f1650106a5e77463412cad4684c2.tar.bz2 SoopyV2-48653ec89538f1650106a5e77463412cad4684c2.zip |
first commit
Diffstat (limited to 'features/soopyGui/GuiPage.js')
-rw-r--r-- | features/soopyGui/GuiPage.js | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/features/soopyGui/GuiPage.js b/features/soopyGui/GuiPage.js new file mode 100644 index 0000000..09142d0 --- /dev/null +++ b/features/soopyGui/GuiPage.js @@ -0,0 +1,46 @@ +import SoopyGuiElement from '../../../guimanager/GuiElement/SoopyGuiElement.js'; + +class GuiPage{ + constructor(priority){ + this.currentPageId = 0; + this.priority = priority + + this.soopyGui = require('./index.js').class; + this.name = "" + + this.pages = {} + } + + finaliseLoading(){ + this.soopyGui.addCategory(this); + } + + newPage(){ + this.currentPageId++ + let page = new SoopyGuiElement().setLocation(1*this.currentPageId,0,1,1) + + page._soopyAddonsPageId = this.currentPageId + + this.pages[this.currentPageId] = page + + return page + } + + goToPage(page, anim){ + this.soopyGui.goToPageNum(page, anim) + } + + openSidebarPage(child){ + this.soopyGui.openSidebarPage(child) + } + closeSidebarPage(){ + this.soopyGui.closeSidebarPage() + } + + //Override me :D + onOpen(){ + + } +} + +export default GuiPage;
\ No newline at end of file |