Jump to content

Recommended Posts

Posted

Gui#drawTexturedModalRect expects your image to be 256x256 pixels. Use GuiScreen#drawModalRectWithCustomSizedTexture with the last 2 arguments being the texture width and height.

  • Like 1

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Thank you very much,

now I have the problem that the buttons start to glimmer yellow if i hover them.

But this is also shifted to the button on their left. How can I highlight them in the default white?

And also how can I position it correctly?

 

Posted
2 minutes ago, Pingubro said:

And also how can I position it correctly?

 

Right now you are changing the texture position on the image, not the position of the actual button.

 

I don't know what you mean by "glimmer yellow", can you maybe describe your issues a bit better?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted (edited)

So you mean your glimmer is in the wrong place?

 

else if (this.hovered)
{
    j = 16777120;
}

 

To change the color, you have to change that value. It is now 16777120, which is hex value 0xFFFFBE, which is slightly yellow. Use 16777215, or 0xFFFFFF for white.

 

A bit weird is that the only place that is used for is the rendering of text, which may also be why the position is wrong, as you always pass in an empty String as the button text. You either have to fiddle around with the positions or make your own method for rendering a colored overlay on top of your button.

Edited by larsgerrits
  • Like 1

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted (edited)

So als the title says and the comments

my Buttons dont highlight properly.

Can somebody maybe tell me how it is done in Minecraft e.g. slot highlighting?

Edited by Pingubro

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.