This class holds all information related with the color picker in editor categories and its user interface.
A color picker is made of multiple color buttons, represented by the Palettes::
- static const static uint32_t TYPE
- auto Load(IWindow* pWindow, uint32_t propID, uint32_t regionFilter, vector<ColorRGB>* pColors = nullptr) -> bool
- Loads and generates the UI for this color picker.
- void SetVisible(bool visible)
- Toggles the visibility of this color picker.
auto GetSwatchArea(int index,
bool = false) const -> Math::
- Returns the area that a swatch in the given index would fit.
- void SetColor(const ColorRGB& color)
- auto AddRef() -> int override
- auto Release() -> int override
- auto Cast(uint32_t type) const -> void* override
- intrusive_ptr<Object> field_0C
- IWindow* mpWindow
- The container window where the layout is inserted.
- float mWidth
- The total width of the container window.
- float mHeight
- The total height of the container window.
- The currently selected color.
- int mCustomColorIndex
- The index of the button for setting a custom color, only used if the property 'colorpickerAddCustomColor' is true.
- int mDefaultColorIndex
- The index of the button for setting the default color, only used if the property 'colorpickerAddDefaultColor' is true.
- vector<intrusive_ptr<ColorSwatchUI>> mpColorUIs
- The user interfaces of the multiple color swatches that are shown in the color picker.
- size_t mColorsCount
- The number of color buttons that fit into the picker layout.
- The PROP file that contains the configuration for this color picker.
- uint32_t mRegionFilter
- In block painting, the instance ID of a file that defines which region is painted in partial styles; The file is assumed to be in the folder with group ID 0x406A6F00.
ColorPickerUI:: Load(IWindow* pWindow,
vector<ColorRGB>* pColors = nullptr)
Loads and generates the UI for this color picker.
|pWindow||The container window where the layout will be inserted.|
|propID||The instanceID of the property list that contains the properties of the color picker. The folder is assumed to be 'ColorPickerConfig'.|
|pColors||[Optional] A list of the colors that must be generated. If it is not present, the list will be taken from the property 'colorpickerColors' of the .prop file.|
This creates the layout for all the color buttons.
In block painting, the instance ID of a file that defines which region is painted in partial styles; The file is assumed to be in the folder with group ID 0x406A6F00.
In skinpaints, this is the skinpaint index (0 -> base, 1 -> coat, 2 -> detail).