Interactivity

unhandled

#1

Is there a way to add some interactivity to my definition? I meant clickable objects on the graphical screen.


(Andrew Heumann) #2

I’m not sure I know what you mean. If you want to click-interact with objects in the rhino viewport try the “clickable mesh” component from human.


#3

Clickable mesh works in human gui graphic window?


(Andrew Heumann) #4

no, only in the rhino viewport. You can also interact with 2d shapes by turning on a “click mode” (right-click option) in the create shapes component - a value listener attached will tell you the indices of the shape(s) the user clicked on.


#5

wow that sounds very promising. Thank you!


(Arturo De La Fuente) #6

(Andrew Heumann) #7

Here is an example, showing the three interaction modes in different tabs; “Button mode” returns true for that item while the mouse is down and switches back to false immediately. “Toggle Mode” lets you enable/disable each item, enabling you to select multiple shapes. Finally, “Picker” mode operates like a radio button, where selecting one item deselects the others.
Interactive Shapes.gh (14.4 KB)

clickable%20shapes


#8

Amazing!!! Thank you very much!