LoadingByte / GuiLib

A Minecraft library that allows modders to create more advanced Minecraft GUIs.
https://loadingbyte.com/wiki/GuiLib
Other
0 stars 0 forks source link

Built-in mechanism for adding custom tooltips #6

Open LoadingByte opened 7 years ago

LoadingByte commented 7 years ago

PR #5 introduced a simple way to add custom text tooltips to checkboxes. That quick and dirty fix, however, only highlights a larger problem that will require a more permanent solution. We obviously want to be able to add tooltips to most kinds of widgets, without allowing insensible ones like tooltips on containers or scrollbars. Ideally, we also want to be able to adjust the fixed tooltips, i.e. the ones created by item buttons.

Until there's a good solution for that problem (adding boilerplate code to each and every widget sadly isn't one), the only way to add custom tooltips is through subclassing the widgets and adding methods like you did with the checkbox widget.