Item Tooltips
Overview
As of v2.0.0, ScrollingMenuSign allows menu items to have lore, or item tooltip, information attached to them. This tooltip information is displayed in a variety of ways depending on the view type and can be used to provide more information about what a particular menu item does.
Adding/Changing a Tooltip
When adding an item:
/sms add <menu-name> <item-name> <command> -lore <tooltip-text>
When editing an existing item:
/sms edit <menu-name> <item-name> -lore <tooltip-text>
E.g.
/sms add warps Home "/warp home" -lore "Go back home" /sms add warps Mines "/warp mine" /sms edit warps Mines -lore "Go to the mines"
Removing a Tooltip
To remove a tooltip, simply pass the empty string for the lore:
/sms edit warps Mines -lore ""
Multiline Tooltips
You can use the \\
(two backslashes) sequences anywhere in the lore text to force a line break in the tooltip.
/sms edit warps Mines -lore "Go to the mines\\This will take you\\to the main shaft"
You may need to experiment with the positioning of the line breaks to get the ideal display.
Tooltip Display
Map Views
Map view tooltips are displayed in a tooltip box drawn directly on the map.
Inventory Views
Inventory view tooltips use the native tooltip box that Minecraft displays whenever an item is moused over.
Spout Views
Spout view tooltips are displayed just underneath the menu item label in the Spout list widget.
Sign/Multisign Views
This takes slightly more work. Sign/Multisign views use an auxiliary sign placed adjacent to the view to display the tooltip.
- Create your sign/multisign view as normal
- Place a sign adjacent to (left, right, above, below - not diagonally) the view you created, with the text [smstooltip] on the first line
- (v2.2.0+) If there is more than one sign view adjacent to your tooltip sign, you can put one of U, D, L, or R on the second line to disambiguate the intended view for your tooltip
- You will get a confirmation message that the tooltip sign has been added
Now that sign will display the item tooltip, if any exists, for the selected item in the view adjacent to it.
Comments