aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-27 01:50:32 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-27 01:50:32 +0800
commitcf1956ab2c05b9a636611d96d75d62cb22ed7e34 (patch)
tree36b79ea7f7066dd8d503e195894c7c6e020e933c
parent00377de547b4033c5c1e7e6c770dd1b85db92de4 (diff)
downloadSoopyV2-cf1956ab2c05b9a636611d96d75d62cb22ed7e34.tar.gz
SoopyV2-cf1956ab2c05b9a636611d96d75d62cb22ed7e34.tar.bz2
SoopyV2-cf1956ab2c05b9a636611d96d75d62cb22ed7e34.zip
Text in favorite items box when no favorites added telling user how to add them
-rw-r--r--features/betterGuis/museumGui.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/features/betterGuis/museumGui.js b/features/betterGuis/museumGui.js
index a6b0474..1dec09c 100644
--- a/features/betterGuis/museumGui.js
+++ b/features/betterGuis/museumGui.js
@@ -8,6 +8,7 @@ import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow"
import ProgressBar from "../../../guimanager/GuiElement/ProgressBar"
import SoopyBoxElement from "../../../guimanager/GuiElement/SoopyBoxElement"
import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement"
+import SoopyMarkdownElement from "../../../guimanager/GuiElement/SoopyMarkdownElement"
import SoopyTextElement from "../../../guimanager/GuiElement/SoopyTextElement"
import TextBox from "../../../guimanager/GuiElement/TextBox"
import Notification from "../../../guimanager/Notification"
@@ -785,6 +786,12 @@ class MuseumGui {
updatedFavorites(saveToFile=true){
this.favoriteBox.clearChildren()
+ if(this.favoriteItems.length === 0 ){
+ let item = new SoopyMarkdownElement().setText("Middle click to add an item to your favorites list").setLocation(0.05,0.025,0.9,0.9)
+
+ this.favoriteBox.addChild(item)
+ }
+
this.favoriteItems.forEach((fItem, i)=>{
let item = new ButtonWithArrow().setText(fItem.name.startsWith("§f")?"&7"+fItem.name.substr(2):fItem.name).setLocation(0.05,0.025+0.125*i,0.9,0.1).setLore(fItem.lore)