diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-09-23 17:56:38 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-09-23 17:56:38 +0800 |
commit | a38700b5ae8822f159c7457d4d67e53f75ca63fa (patch) | |
tree | 13097a8f1a5e1e3b71a0948f9b876e6ec3d1c600 /src/features/settings/settingThings | |
parent | 644a192508dba2719c24ecd3c0b3295120b0fbb5 (diff) | |
download | SoopyV2-a38700b5ae8822f159c7457d4d67e53f75ca63fa.tar.gz SoopyV2-a38700b5ae8822f159c7457d4d67e53f75ca63fa.tar.bz2 SoopyV2-a38700b5ae8822f159c7457d4d67e53f75ca63fa.zip |
Support lets encript prepairing for hypixel api change
Diffstat (limited to 'src/features/settings/settingThings')
-rw-r--r-- | src/features/settings/settingThings/settingBase.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/features/settings/settingThings/settingBase.js b/src/features/settings/settingThings/settingBase.js index 5320f40..2346f32 100644 --- a/src/features/settings/settingThings/settingBase.js +++ b/src/features/settings/settingThings/settingBase.js @@ -30,12 +30,12 @@ class SettingBase { this.helpButton = new BoxWithText().setText("ยง0?").setLocation(3, 3, 0.05, 0.5) this.helpButton.location.location.setRelative(false, false) - this.helpButton.addEvent(new SoopyMouseClickEvent().setHandler(() => { + this.helpButton.addEvent(new SoopyMouseClickEvent().setHandler(async () => { module.FeatureManager.features.soopyGui.class.openSidebarPage(new SoopyGuiElement().setLocation(0.05, 0.05, 0.9, 0.9).setScrollable(true).addChild(new SoopyMarkdownElement().setLocation(0, 0, 1, 1).setText("Loading..."))) - this.getHelp(helpText => { - module.FeatureManager.features.soopyGui.class.openSidebarPage(new SoopyGuiElement().setLocation(0.05, 0.05, 0.9, 0.9).setScrollable(true).addChild(new SoopyMarkdownElement().setLocation(0, 0, 1, 1).setText(helpText))) - }) + let helpText = await this.getHelp() + + module.FeatureManager.features.soopyGui.class.openSidebarPage(new SoopyGuiElement().setLocation(0.05, 0.05, 0.9, 0.9).setScrollable(true).addChild(new SoopyMarkdownElement().setLocation(0, 0, 1, 1).setText(helpText))) })) this.helpButton.setLore(["Click for more information about this setting"]) @@ -79,8 +79,8 @@ class SettingBase { return helpDataLoader.hasData(this.moduleId, this.settingId) } - getHelp(callback) { - helpDataLoader.getData(this.moduleId, this.settingId, callback) + async getHelp() { + return await helpDataLoader.getData(this.moduleId, this.settingId) } getValue() { |