aboutsummaryrefslogtreecommitdiff
path: root/features/globalSettings
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-07-26 19:49:12 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-07-26 19:49:12 +0800
commitaadc96313266643cc57e4e1d01112c41df0ac8a7 (patch)
tree782b0ab137a70d0ccec4069148879054964e00d9 /features/globalSettings
parent2aee47bfab2169eaed3b97890c82e684e8a1a1c3 (diff)
downloadSoopyV2-aadc96313266643cc57e4e1d01112c41df0ac8a7.tar.gz
SoopyV2-aadc96313266643cc57e4e1d01112c41df0ac8a7.tar.bz2
SoopyV2-aadc96313266643cc57e4e1d01112c41df0ac8a7.zip
asd
Diffstat (limited to 'features/globalSettings')
-rw-r--r--features/globalSettings/firstLoadPages.js70
-rw-r--r--features/globalSettings/index.js6
2 files changed, 38 insertions, 38 deletions
diff --git a/features/globalSettings/firstLoadPages.js b/features/globalSettings/firstLoadPages.js
index 50b9eee..19562a0 100644
--- a/features/globalSettings/firstLoadPages.js
+++ b/features/globalSettings/firstLoadPages.js
@@ -6,21 +6,21 @@ import Notification from "../../../guimanager/Notification";
import FeatureManager from "../../featureClass/featureManager";
import FirstLoadPage from "./firstLoadPage";
-class WelcomePage extends FirstLoadPage{
- constructor(){
+class WelcomePage extends FirstLoadPage {
+ constructor() {
super()
- this.addChild(new SoopyTextElement().setText("§0Welcome to SoopyAddons V2!").setLocation(0.1, 0.05,0.8,0.1).setMaxTextScale(10));
+ this.addChild(new SoopyTextElement().setText("§0Welcome to SoopyAddons V2!").setLocation(0.1, 0.05, 0.8, 0.1).setMaxTextScale(10));
- this.addChild(new SoopyTextElement().setText("§7First lets get privacy settings out of the way.").setLocation(0.1, 0.15,0.8,0.075).setMaxTextScale(10));
+ // this.addChild(new SoopyTextElement().setText("§7First lets get privacy settings out of the way.").setLocation(0.1, 0.15,0.8,0.075).setMaxTextScale(10));
- this.settingsArea = new SoopyGuiElement().setLocation(0.1, 0.25,0.8,0.75);
+ this.settingsArea = new SoopyGuiElement().setLocation(0.1, 0.25, 0.8, 0.75);
this.settingsArea.setScrollable(true)
this.addChild(this.settingsArea);
}
- load(){
+ load() {
let y = 0
this.guiPage.mainThing.privacySettings.forEach(setting => {
@@ -30,25 +30,25 @@ class WelcomePage extends FirstLoadPage{
this.settingsArea.addChild(setting);
- y += 0.045+setting.location.size.y.get()
+ y += 0.045 + setting.location.size.y.get()
})
}
}
-class ApiKeyPage extends FirstLoadPage{
- constructor(){
+class ApiKeyPage extends FirstLoadPage {
+ constructor() {
super()
- this.addChild(new SoopyTextElement().setText("§0Next lets setup your api key!").setLocation(0.1, 0.05,0.8,0.1).setMaxTextScale(10));
+ this.addChild(new SoopyTextElement().setText("§0Next lets setup your api key!").setLocation(0.1, 0.05, 0.8, 0.1).setMaxTextScale(10));
- this.addChild(new SoopyTextElement().setText("§7You can skip this but some features may not work").setLocation(0.1, 0.15,0.8,0.075).setMaxTextScale(10));
+ this.addChild(new SoopyTextElement().setText("§7You can skip this but some features may not work").setLocation(0.1, 0.15, 0.8, 0.075).setMaxTextScale(10));
- this.settingsArea = new SoopyGuiElement().setLocation(0.1, 0.25,0.8,0.75);
+ this.settingsArea = new SoopyGuiElement().setLocation(0.1, 0.25, 0.8, 0.75);
this.settingsArea.setScrollable(true)
this.addChild(this.settingsArea);
}
- load(){
+ load() {
let y = 0
let settings = [this.guiPage.mainThing.apiKeySetting, this.guiPage.mainThing.verifyApiKey, this.guiPage.mainThing.findApiKey, this.guiPage.mainThing.newApiKey]
@@ -59,30 +59,30 @@ class ApiKeyPage extends FirstLoadPage{
this.settingsArea.addChild(setting);
- y += 0.045+setting.location.size.y.get()
+ y += 0.045 + setting.location.size.y.get()
})
}
}
-class HowToOpenMenuPage extends FirstLoadPage{
- constructor(){
+class HowToOpenMenuPage extends FirstLoadPage {
+ constructor() {
super()
- this.addChild(new SoopyTextElement().setText("§0Your all set!").setLocation(0.1, 0.1,0.8,0.3).setMaxTextScale(10));
+ this.addChild(new SoopyTextElement().setText("§0Your all set!").setLocation(0.1, 0.1, 0.8, 0.3).setMaxTextScale(10));
- this.addChild(new SoopyTextElement().setText("§7To change any settings, or to access this menu again run §2/soopy§7.").setLocation(0.1, 0.3,0.8,0.1).setMaxTextScale(10));
+ this.addChild(new SoopyTextElement().setText("§7To change any settings, or to access this menu again run §2/soopy§7.").setLocation(0.1, 0.3, 0.8, 0.1).setMaxTextScale(10));
- let openSettingsButton = new ButtonWithArrow().setText("§0Open settings").setLocation(0.1, 0.5,0.3,0.2).setDirectionRight(false)
+ let openSettingsButton = new ButtonWithArrow().setText("§0Open settings").setLocation(0.1, 0.5, 0.3, 0.2).setDirectionRight(false)
- openSettingsButton.addEvent(new SoopyMouseClickEvent().setHandler(()=>{
+ openSettingsButton.addEvent(new SoopyMouseClickEvent().setHandler(() => {
ChatLib.command("soopyv2", true)
}))
this.addChild(openSettingsButton);
- let closeButton = new ButtonWithArrow().setText("§0Close").setLocation(0.6, 0.5,0.3,0.2)
+ let closeButton = new ButtonWithArrow().setText("§0Close").setLocation(0.6, 0.5, 0.3, 0.2)
- closeButton.addEvent(new SoopyMouseClickEvent().setHandler(()=>{
+ closeButton.addEvent(new SoopyMouseClickEvent().setHandler(() => {
Client.currentGui.close()
}))
@@ -91,34 +91,34 @@ class HowToOpenMenuPage extends FirstLoadPage{
}
}
-class DisableFeatures extends FirstLoadPage{
- constructor(){
+class DisableFeatures extends FirstLoadPage {
+ constructor() {
super()
- this.addChild(new SoopyTextElement().setText("§0Lastly do you want to disable all features?").setLocation(0.1, 0.1,0.8,0.3).setMaxTextScale(10));
+ this.addChild(new SoopyTextElement().setText("§0Lastly do you want to disable all features?").setLocation(0.1, 0.1, 0.8, 0.3).setMaxTextScale(10));
- this.addChild(new SoopyTextElement().setText("§7(So you can only enable the ones you want)").setLocation(0.1, 0.3,0.8,0.1).setMaxTextScale(10));
+ this.addChild(new SoopyTextElement().setText("§7(So you can only enable the ones you want)").setLocation(0.1, 0.3, 0.8, 0.1).setMaxTextScale(10));
- let openSettingsButton = new ButtonWithArrow().setText("§0Disable all features").setLocation(0.35, 0.5,0.3,0.2)
+ let openSettingsButton = new ButtonWithArrow().setText("§0Disable all features").setLocation(0.35, 0.5, 0.3, 0.2)
- openSettingsButton.addEvent(new SoopyMouseClickEvent().setHandler(()=>{
-
- new Thread(()=>{
+ openSettingsButton.addEvent(new SoopyMouseClickEvent().setHandler(() => {
+
+ new Thread(() => {
new Notification("Disabling features...", [])
- Object.keys(FeatureManager.featureMetas).forEach((f)=>{
+ Object.keys(FeatureManager.featureMetas).forEach((f) => {
let meta = FeatureManager.featureMetas[f]
let isHidden = meta.isHidden
- if(typeof isHidden === "string"){
+ if (typeof isHidden === "string") {
return
}
- if(isHidden) return
- if(!meta.isTogglable) return
+ if (isHidden) return
+ if (!meta.isTogglable) return
FeatureManager.featureSettingsData[f].enabled = false
FeatureManager.featureSettingsDataLastUpdated = true
- if(FeatureManager.isFeatureLoaded(f)){
+ if (FeatureManager.isFeatureLoaded(f)) {
FeatureManager.unloadFeature(f)
}
})
diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js
index 8ce9f7e..c215ae8 100644
--- a/features/globalSettings/index.js
+++ b/features/globalSettings/index.js
@@ -44,18 +44,18 @@ class GlobalSettings extends Feature {
this.darkTheme = new ToggleSetting("Dark theme", "This might be scuffed because guis are still made in light theme", false, "dark_theme", this)
// this.linkPreview = new ToggleSetting("Link preview", "Shows a preview of where a link will take you", true, "link_preview", this)
- 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.reportErrorsSetting = new ToggleSetting("Send module errors to soopy server", "This will allow me to more effectivly fix them", false, "privacy_send_errors", this)
this.hideFallingBlocks = new ToggleSetting("Hide falling blocks", "NOTE: this may cause more lag because of render entity event", false, "hide_falling_sand", this)
this.twitchCommands = new ToggleSetting("Ingame twitch bot commands", "Allows u to use twitch bot commands ingame (eg -sa)", true, "twitch_commands_ingame", this)
- this.privacySettings = [this.reportErrorsSetting]
+ this.privacySettings = []
this.firstLoadPageData = JSON.parse(FileLib.read("soopyAddonsData", "soopyv2firstloaddata.json") || "{}") || {}
this.GuiPage = new FirstLoadingPage(this)
- soopyV2Server.reportErrorsSetting = this.reportErrorsSetting
+ // soopyV2Server.reportErrorsSetting = this.reportErrorsSetting
this.registerChat("&aYour new API key is &r&b${key}&r", this.newKey)
const EntityFallingBlock = Java.type("net.minecraft.entity.item.EntityFallingBlock");