C4 Engine Terathon Software C4 Engine API Documentation

• Interface Manager

API Links
Developer Links

class ColorPicker

Defined in:  C4ColorPicker.h
A ColorPicker class encapsulates a color picker box.
Definition

class ColorPicker : public Window, public LinkTarget<ColorPicker>, public Completable<ColorPicker>

Member Functions
ColorPicker::GetColor Returns the color that is currently displayed.
Constructor

ColorPicker(const char *title, const ColorRGBA& color, unsigned long flags = 0);

Parameters
title The color picker's displayed title.
color The initial color that is shown in the color picker.
flags Flags that affect the appearance and behavior of the color picker. See below for a list of possible values.
Description
The ColorPicker class provides a standard interface for selecting colors. When the user selects a color, the color picker's completion procedure is called. The completion procedure can then retrieve the new color by calling the ColorPicker::GetColor function.

Options that control the appearance and behavior of the color picker can be controlled by specifying any combination (through logical OR) of the following values in the flags parameter.
kColorPickerAlpha Allow the alpha value to be changed.
If the color picker is cancelled, then the completion procedure is not called.
Base Classes
Window The ColorPicker class is a specific type of window.
LinkTarget<ColorPicker> A pointer to a ColorPicker may be stored in a Link object.
Completable<ColorPicker> The completion procedure is called when the color picker is dismissed.