|
|
Link Object to a Vertex Added on: Mon Aug 14 2000 |
Page: 1 2 3 4 5 6 7 8 9 10 |
Now that you have the rollout defined it is time to put some stuff in it. I like to keep my Rollout's neat and semi-organized, that way people besides yourself will feel more comfortable with your script. One way to keep it clean is with the "group".
Group is a Rollout Control, it controls the rollout's layout. The first thing we want in our floater is a way to select the vertex we want to be the parent so we will title this group "Pick Vert". Type the following in inside the Vert_Linker Rollout parenthesis.
group "Pick Vert" (
) -- Close Group Group takes one parameter which is the title of the group. Everything you want in the group should be inside the " ( ) "
Lets add some labels before we make the button in this group. Type:
Label getvert1L "Select a vertex to be parent"
Label getvert2L "then hit 'Get Selected Vert' " Label takes two parameters, the first is the name of the label and the second is the text that will be displayed.
Now lets add a button. Type:
Button GetVert_Button "Get Selected Vert" Button makes just a normal button you push. It takes two parameters. The name of the button and the text that is on the button.
Since we would like to know what vertex we selected we will add the following line in.
Label vertnumL "Vertex Number: (none selected)" This is another label. You can change labels when hitting buttons and stuff. Which is what will happen with this one.
Lets to a quick catch up. You now should have the following:
MainFloater = NewRolloutFloater "Link To Vertex" 300 315
Rollout Vert_Linker "Vertex Linker" (
group "Pick Vert" (
Label getvert1L "Select a vertex to be parent"
Label getvert2L "then hit 'Get Selected Vert' "
Button GetVert_Button "Get Selected Vert"
Label vertnumL "Vertex Number: (none selected)"
) -- Close Group
) -- Close Rollout
addRollout Vert_Linker MainFloater
|
|
|
|