From cf1956ab2c05b9a636611d96d75d62cb22ed7e34 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 27 Nov 2021 01:50:32 +0800 Subject: Text in favorite items box when no favorites added telling user how to add them --- features/betterGuis/museumGui.js | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- cgit