aboutsummaryrefslogtreecommitdiff
path: root/features/globalSettings/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-07 01:23:02 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-07 01:23:02 +0800
commit2154f49bceed1ac8eeb1111ea402ddd2b243679d (patch)
treea0bb6d7150068f8cf25be3d2146302c651c4415a /features/globalSettings/index.js
parentb7848e65afbd06a9a549ee31912425680ab11536 (diff)
downloadSoopyV2-2154f49bceed1ac8eeb1111ea402ddd2b243679d.tar.gz
SoopyV2-2154f49bceed1ac8eeb1111ea402ddd2b243679d.tar.bz2
SoopyV2-2154f49bceed1ac8eeb1111ea402ddd2b243679d.zip
Add first load page (Still need to add the settings added in that though)
Diffstat (limited to 'features/globalSettings/index.js')
-rw-r--r--features/globalSettings/index.js67
1 files changed, 66 insertions, 1 deletions
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index 422754f..04e3a20 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -4,6 +4,9 @@ import Feature from "../../featureClass/class";
import ButtonSetting from "../settings/settingThings/button";
import TextSetting from "../settings/settingThings/textSetting";
import ToggleSetting from "../settings/settingThings/toggle";
+import firstLoadPages from "./firstLoadPages";
+import GuiPage from "../soopyGui/GuiPage"
+import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement";
class Hud extends Feature {
constructor() {
@@ -13,8 +16,8 @@ class Hud extends Feature {
}
initVariables(){
-
this.apiKeySetting = undefined
+ this.GuiPage = undefined
}
onEnable(){
@@ -23,7 +26,20 @@ class Hud extends Feature {
this.notifyNewVersion = new ToggleSetting("Notify when there is a new update", "Will notify you when there is a new version of soopyv2 avalible for download", true, "notify_update", this) //TODO: Make false by default when uploaded on ct website
+
+ // this.reportErrorsSetting = new ToggleSetting("Send module errors to soopy server", "This will allow me to more effectivly fix them", false, "privacy_send_errors", this)
+ // this.sendChatSetting = new ToggleSetting("Send (hashed) chat messages to soopy server", "This will allow the hide spam feature to detect messages that are spam", false, "privacy_send_chat", this)
+
+ // this.privacySettings = [this.reportErrorsSetting, this.sendChatSetting]
+
+ // this.GuiPage = new FirstLoadingPage(this)
+
this.registerChat("&aYour new API key is &r&b${key}&r", this.newKey)
+
+ // new Thread(()=>{
+ // Thread.sleep(1000)
+ // ChatLib.command("soopyv2 first_load_thing", true)//TODO: ONLY RUN ON FIRST INSTALL
+ // }).start()
}
verifyKey(){
@@ -49,6 +65,55 @@ class Hud extends Feature {
}
}
+class FirstLoadingPage extends GuiPage {
+ constructor(mainThing){
+ super(-10)
+
+ this.showBackButton = false
+
+ this.name = "First load thing"
+
+ this.mainThing = mainThing
+
+ this.pageThings = []
+
+ firstLoadPages.forEach((page, i)=>{
+ let newPage = this.newPage()
+
+ newPage.addChild(page)
+
+ page.setLoc(i!==0, i!== firstLoadPages.length-1)
+ page.guiPage = this
+
+ this.pageThings.push(newPage)
+ })
+
+ this.pageNum = 0
+
+ this.finaliseLoading()
+ }
+
+ nextPage(){
+ this.pageNum++
+
+ this.goToPage(this.pageNum)
+ }
+
+ prevPage(){
+ this.pageNum--
+
+ this.goToPage(this.pageNum)
+ }
+
+ onOpen(){
+ this.pageNum = 0
+
+ firstLoadPages.forEach((page, i)=>{
+ page.load()
+ })
+ }
+}
+
module.exports = {
class: new Hud()
} \ No newline at end of file