Posted July 4, 201411 yr I have a quick question. How would one go about drawing a tooltip that displays the current level of liquid in a tank when hovered over in the gui. Basically a tooltip that will spit out my int value for petroleum whenever i'm hovered over a certain section of the gui. I've searched around a bit but haven't found anything that I can get working. Any tips are helpful! thanks http://i.imgur.com/bkongSe.png[/img]
July 4, 201411 yr Author This is great! exactly what I need. Thank you! http://i.imgur.com/bkongSe.png[/img]
July 4, 201411 yr Author You can use func_146283_a in the Gui class to draw the default tooltips. The List should contain the lines you want to draw, parameters 2 and 3 and the x & y coordinates. Then in your drawScreen method just check if the mouse coordinates (you get the as parameters) are in the area you want, and if so call the tooltip method. Oh one more thing, So I have it here How would I make the petroleum text a bit darker, and also put a line break after it so the values are below it, since obviously /r/n isn't working. Also interesting... Just realized all my slots and stuff are not there anymore. Something to do with adding drawScreen has caused my container class to not work correctly I guess? http://i.imgur.com/bkongSe.png[/img]
July 4, 201411 yr Author I can't thank you enough! You've been a huge help http://i.imgur.com/bkongSe.png[/img]
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.