Download Tutorials and Topics

Transcript
Screen aesthetics
Tutorial 19
Clicking on a Picture
•
Lock the Patcher window and click on the picture of a button marked ON. The metro object is
started, just as if you had clicked on the toggle. Click on the picture of an OFF button to stop
the metro.
We know that the OFF and ON buttons are just pictures, so how do they turn the metro off and
on? The pictures seem to respond to a mouse click because transparent buttons—ubutton
objects—have been placed on top of them.
The ubutton object is a rectangular button that becomes invisible when the Patcher window is
locked. When you click down on a ubutton, it sends a bang out its second outlet and inverts the part
of the screen it covers. When the mouse button is released, ubutton sends a bang out its left outlet
and becomes transparent again.
A ubutton can be placed over a picture or a comment (or over nothing, for that matter, if you just
want an invisible button) to make that portion of the screen respond to a mouse click. The pixelinverting feature of ubutton can also be used to highlight a spot on the screen. Look under ubutton
in the Max Reference Manual for details.
The connections between the ubutton objects and the toggle are hidden from sight with the Hide
On Lock command.
Coloring and Resizing Objects
In addition to adding color to your patches by pasting in pictures, you can set certain user interface objects to a color other than gray by selecting them and choosing a color from the Color submenu of the Object menu. Objects that can be colored in this way include button, dial, hslider,
rslider, and uslider. (The color of the led object is set by selecting it and choosing Get Info... from
the Object menu.) If you have selected an object that cannot be colored, the Color submenu will
be disabled in the Object menu.
69