Is it possible to draw an object on top of each node?

Forums 💬 NodeCanvas ⚙️ Support Is it possible to draw an object on top of each node?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17449
    king_haps
    Participant

      Dear nodeCanvas community,

      Let’s say I have an FSM, I want to have a circle which goes through all the states of that FSM ( Petri-Net style ). The creation of that travelling circle, does nodeCanvas support this?

      Thanks

      #17452
      Gavalakis
      Keymaster

        Hello and sorry for the late reply (I was ill).
        I am not familiar with petri-net style you mentioned and even though I’ve quickly looked up a few references I unfortunately didn’t quite understand the differences and the functionality offered. Can you please clarify what you mean, or what you are after?
        Thank you in advance.

        #17451
        king_haps
        Participant

          Dear Gavalakis,

          Let’s say for now, aside from the usual things a state node can have, I also want it to display a container within it. Within that container I want to have buttons. So it would probably be an extra box and within that box, I can flexibly add my buttons and remove them. Can I know how I can do this? Thank you for your help.

          #17450
          Gavalakis
          Keymaster

            Hello again,

            For this, you will need to create a custom State Node class and override the OnNodeGUI method as so to make possible to display custom GUI controls within the node. Possibly the easiest way, would be to create a custom node deriving the ActionState class, like for example:

            Doing this will allow you to retain the existing functionality of ActionState, while also possible to add extra GUI Controls like in the above example, a simple button.
            If you don’t want to retain the ActionState functionality, then you could also derive from the base class all FSM nodes derive from, that being the FSMState class, and thus possible to create a completely different “type” of state node for able to be added in an FSM.

            Let me know if that works for you.
            Thank you.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.