From 431e4fc9d1657a50ebc34b8ac24f9bfaea06417f Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 17 Sep 2022 19:39:05 +0800 Subject: Initial move to babel + change fetch to use async/await --- src/features/globalSettings/firstLoadPage.js | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/features/globalSettings/firstLoadPage.js (limited to 'src/features/globalSettings/firstLoadPage.js') diff --git a/src/features/globalSettings/firstLoadPage.js b/src/features/globalSettings/firstLoadPage.js new file mode 100644 index 0000000..62805f5 --- /dev/null +++ b/src/features/globalSettings/firstLoadPage.js @@ -0,0 +1,42 @@ +import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent" +import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow" +import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement" + +class FirstLoadPage extends SoopyGuiElement { + constructor() { + super() + + this.setLocation(0, 0, 1, 1) + + this.guiPage = undefined + } + + setLoc(addBack, addNext) { + if (addBack) { + let backButton = new ButtonWithArrow().setLocation(0.05, 0.85, 0.2, 0.1).setDirectionRight(false).setText("§0Back") + + backButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.guiPage.prevPage() + this.guiPage.closeSidebarPage() + })) + + this.addChild(backButton) + } + if (addNext) { + let nextButton = new ButtonWithArrow().setLocation(0.75, 0.85, 0.2, 0.1).setText("§0Next") + + nextButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.guiPage.nextPage() + this.guiPage.closeSidebarPage() + })) + + this.addChild(nextButton) + } + } + + load() { + + } +} + +export default FirstLoadPage \ No newline at end of file -- cgit