Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • 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

 

08445d5166.jpg

 

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?

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.