Color Buttons

Assembling a HUD

Step by step instructions on assembling a hud:

  1. Rez the “Recoloring HUD Template” on the ground. DO NOT ROTATE IT
  2. Rez a new cube on the ground, behind the template. DO NOT ROTATE IT. This will be the background and the root prim of the HUD, and should show your name as creator.
  3. Add two scripts to the HUD root prim: “AH Color Buttons” and “AH Color Sliders Widgets”. TheĀ AH Color Sliders Widgets script may throw an error: “Color Picker prim is missing from the linkset”. You can ignore this error, since we will be linking the HUD shortly.
  4. Decide which of the buttons in the template work best for you. Delete the rest. See the section “Button Styles” below for more information about the button styles.
  5. For basic buttons ONLY: you may rez your own button prims, as long as they are full perm. Just rename them to “basic button”
  6. Duplicate the buttons, if necessary and arrange the HUD how you like. Create textures for the buttons and the background, as necessary.
  7. Change the description of each button to the name of the face group it should control
  8. Link everything together. The background MUST be the root prim.
  9. Try out the buttons and the color picker. Everything should work.
  10. Give the new HUD a good name, and take it to inventory.
  11. Attach the new HUD to one of the HUD attach points. If you avoided rotating the template, background, and set the root prim correctly, it will attach with the correct side facing forward.
  12. If the HUD is facing the wrong way, rotate it until it is showing correctly.
  13. Detatch the HUD

Anatomy of the HUD

A color HUD consists of several parts:

  • A script named “AH Color Buttons” in the root prim
  • A script named “AH Color Sliders Widgets” in the root prim
  • A color gradient prim
  • A set of color preset buttons (optional)
  • A help button (optional)
  • A set of face group selector buttons

The HUD can be colored, textured, or arranged any way you like as long as it contains these parts. A color HUD works as follows:

  • Click a face group button to select which part of the objects to color
  • Choose a color using either the gradient selector or the preset buttons.
    This color will be applied to your objects, and to the HUD button
  • Optionally, save your favorite colors in the preset buttons

The only HUD componets you need to configure are the face group selector buttons. To do that:

  1. Rez or duplicate as many buttons (any style) as you have face groups
  2. Set the prim description of each button to the name of it’s face group
  3. Link the buttons to the HUD

This is all the script requires. However, the buttons need some kind of label for people to know what they do. The kit provides 3 styles of buttons:

  • text buttons
  • image buttons
  • basic buttons

Button Styles

Text buttons are the easiest to use, but the least flexible. They automatically change their label to the face group name, and resize the button to fit that label. The text of the button will also change color so that it is always readable, no matter what color the button is. The texture and shape of these buttons cannot be changed. Additionally, this button is mesh, so you should avoid it if you have customers that don’t use mesh. (no other component of the hud is mesh)

Image buttons are similar to text buttons, in that they have two colors: the selected color for the button, and a contrasting color for the label. They are made of a hollow box prim, and so can be used on non-mesh viewers. The foreground and background can be textured independently. This kit provides a set of ready-to-use image buttons providing rounded corners in various sizes. These can be found in the “Image Button Shape Textures” box. Also provided are some sample labels used in the sample huds (in the “Sample Image Button Labels” box, but you will most likely need to create your own label textures for your own hud. All these textures are also available in the zip file referenced at the top of this document.

Basic buttons are the simplest button type. The entire button prim is colored to match the selected color; no contrast is guaranteed. They can, therefore, be any prim type, including cylinders, sculpties, or mesh. They are therefore probably the best choice if you want to make something other than a hud out of this kit, such as a holo vendor. They are also good for drawing pictures with the button prims, as demonstrated in the “Sample HUD (Graphic)”. The kit provides many sample button textures in the “Sample Basic Button Textures” box and in the zip file

Here is a side by side comparison of the features of the three button styles:

Basic Image Text
Needs custom textures? Yes Yes
Requires mesh viewer? Yes
Guarantees contrast? Yes Yes
Flexible prim shape? Yes

Additional HUD Configuration

The “AH Color Buttons” script contains two configurable options. You can change them by editing the first two lines of the script:


By default, when you rez an object while its HUD is attached, it will recolor itself to the HUD colors. You can turn off this behavior by setting SHOULD_SYNC_ON_ATTACHMENT_REZ to FALSE in the script.

Similarly, by default, when you rez the HUD, it will recolor all its rezzed objects to the HUD colors. You can turn off this behavior by setting SHOULD_SYNC_ON_HUD_REZ to FALSE in the script.

Leave a Reply