Question regarding tooltips

Started by Wasupwithuman 3 posts 96 views

Reply on sbox.game
  1. #1
    Wasupwithuman 365
    Apologize if this is a noob question, but I searched and couldn't find anything.

    I am confused on the "tooltips" that should be showing up on IPressables.

    Do I need to implement this tooltip displays myself in razor? From looking through the docs and the news releases it looked like this should happen "automagically"...

    Do I need to call something specific when doing a raycast to show the tooltip?

    An example just for further clarification, I added the chair component to a model but the sit tooltip does not show up in when looking at it. At this point i'm not sure if it should show up automatically, do I need to call something, or am I supposed to be implementing this myself?

    Thanks.
  2. #2
    Remscar 2,705
    I think that ToolTIp is just a data class of the tooltip that you should show but it's not showing it for you.

    You will need to see if the player is looking at a pressable, if so, try to get a tooltip, and if there is one, then you should display some UI element as the tooltip and then populate it with the data you get back from IPressable.Tooltip
  3. #3
    Wasupwithuman Started this 365
    Thanks for the clarification, much appreciated