StageTools - Documentation (CenterStage/Tutorial) [Prev][Top][Up]


Creating a Custom Input Panel

By default, each type of input device is opened in a separate window, so all the sliders appear together, and all the type-ins are in one window. This means we have two separate control windows for this demonstration. It would be nice to have both widgets in the same window, and CenerStage allows you to do this in the following way. First, select the top level Group object, and enter

    Window Controls
as its script, then press Enter on the keypad. This will open a blank window into which we will put the other two controls. Now select the Surface and change the TypeIn line to read
    TypeIn f "x^2 - y^2" -in Controls -at {0 0}
then press Enter. This puts the type-in box into the window named Controls that we just created, placing it in the first column of the first row of the window (these are numbered starting at zero). Finally, select the Slice group object and change its slider to be
    Slider h -1 1 0 -in Controls -at {0 1}
so that it appears in the first column of the second row. Press the Update button to activate all the changes. You should now have a single control window containing both the function and the slider. As a side benefit, the slider and type-in will always be available, regardless of which object is selected. Very sophisticated demonstrations can be built using custom panels of this type.

This demonstration illustrates some of the most important features of CenerStage: the easy definition of objects and their attributes, the ability to tie values to input devices such as sliders and type-in areas, and the ability to link one object to another so that changes in one are reflected in the other. CenerStage comes with more than one hundred pre-defined examples that demonstrate the features of the program. These are stored in the directory StageTools/doc/CenterStage/Samples that is part of the StageTools distribution. You can load these into CenerStage by choosing the File/Open menu item, and using the navigation dialog box to locate this directory and the files within it. Open any of the example files, select the various objects and read the documentation that is presented in the comments within the scripts themselves.



[HOME] StageTools Documentation web pages
Created: 08 Sep 2001
Last modified: 07 Jan 2001 06:27:05
Comments to: dpvc@union.edu
[Up] A Short CenterStage Tutorial
[Prev] Using Groups to Isolate Updates