Display node parameter "hints"

Forums General Discussion Display node parameter "hints"

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  lividthedream 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2355

    lividthedream
    Participant

    Hi,

    When I have a variable on a node that takes a string, if I set the value of it that text appears next to the node port. However, if that parameter is of a custom class type of mine I get no text beside the port, making it hard to determine what the node is doing at a glance.

    Is there a way to get some info to appear on there?

    In the image attached the value of “Text” appears to the left of the port, but the value of EndEvent appears empty. I’d like to display something for this.

    In FlowNode::DrawInputPortGraphic I noticed that my class gets skipped in the main section where it displays the text. I can hack the code in there to do what I want but is there a better way?

    Thanks!

    Attachments:
    You must be logged in to view attached files.
    #2365

    Gavalakis
    Keymaster

    Hello and very sorry for late reply due to summer vacation!

    Indeed, normal classes do not have a hint. Initially, it was made so that all types show a hit via .ToString(), but unless the class overrides ToString() as to show something custom and useful, only the name of the type is returned from calling ToString() as expected. Because this was reduntant since the type of the port is already possible to see when you hover the mouse of the port, I removed the hints for normal classes altogether.

    I could probably return this ability and check if ToString returns the type name and only show the hint if not (meaning that it’s something custom). Is that what you would expect for hints? Meaning to display what the class ToString override returns?

    Let me know 🙂

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #2368

    lividthedream
    Participant

    Hi,

    That would be a great way of displaying this information and save having to hack around in the nodecanvas codebase – I always feel dirty when I do that!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.