Button ToolTip

Started by Hyrancood on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Button ToolTip

Hi!

I know it's possible to add a tooltip for button/Imagebutton with codding, but there is no information about it anywhere.

Is there anyone here who can show an example of how to create this?

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I really want this, too.  
Mon, 03/27/2023 - 20:33

I really want this, too.

 

Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this.addButton(new…
Sat, 04/15/2023 - 22:17
this.addButton(new ImageButton(xPos, yPos, xSize, Ysize, xPosInResourse, xPosInResourse, SizeofResourse, ResourseLocation, e -> {
			Mod.PACKET_HANDLER.sendToServer(new ModGui.ButtonPressedMessage(0, x, y, z));
			ModGui.handleButtonAction(entity, 0, x, y, z);
			//You can create usual button in MCreator GUI builder and edit, excluding the handlers part
		})
		{public void renderToolTip(MatrixStack ms, int mouseX, int mouseY){
			ModGuiWindow.this.renderTooltip(ms, "Your text", mouseX, mouseY);
			//You also can use constant variable for xPos and yPos of ToolTip
			}
		}
);

This code for 1.16.5
You also can find good tutorial here - https://mcreator.net/forum/83507/added-image-buttons-guis

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please help I really need…
Wed, 07/26/2023 - 13:23

Please help I really need Button Tooltip code on 1.19.2