class
PaletteCategoryA category in an editor palette contains pages.
Pages can be grouped in subcategories (like in the paint region category: base, coat, detail) and in DLC groups.
Base classes
- class DefaultRefCounted
- The default implementation of a reference counted class.
- class Object
- This class represents a basic reference counted object.
Public static variables
Constructors, destructors, conversion operators
- PaletteCategory()
- ~PaletteCategory() virtual
Public functions
-
auto ReadProp(const ResourceKey& name,
uint32_
t defaultLayoutID) -> bool - Loads the configuration .prop file of this category; this does not load the pages nor the subcategories contained on it.
-
auto GetCategory(uint32_
t categoryID) -> PaletteCategory* - Returns the subcategory in this palette that has the specified instance ID.
-
auto GetPageAt(size_
t nIndex) -> PalettePage* - Returns the palette page at the specified index.
- auto HasCategory(PaletteCategory* pCategory) -> bool
- Tells whether the given subcategory is a children of this subcategory.
- auto AddRef() -> int override
- auto Release() -> int override
-
auto Cast(uint32_
t) const -> void* override
Public variables
- eastl::vector<PalettePagePtr> mPages
- The pages contained in this category.
-
eastl::vector<uint32_
t> mDLCGroups - The IDs of the DLC groups that divide the pages in the category.
- eastl::vector<PaletteCategoryPtr> mChildren
- Subcategories contained in this category.
-
uint32_
t mLayoutID - The instance ID of the user interface layout file used by the category.
-
uint32_
t mnSequenceNumber - An integer number that defines the order of this category inside the palette.
- bool mbPaintByNumber
-
uint32_
t mRegionFilterID - For paint categories: the instance ID of a file that defines which region is painted in partial styles.
-
uint32_
t mSkinPaintIndex - LocalizedString mCategoryName
- The text that is displayed when the category icon is hovered.
- bool mbForceHasPages
-
uint32_
t mCategoryID - The ID that identifies this category.
-
uint32_
t mParentCategoryID - The ID of the parent category, if any.
- ResourceKey mCategoryIcon
- The ResourceKey of the icon used, only if this is a subcategory.
- ResourceKey* mCategoryIconList
- A list of 9 ResourceKey objects that point to the icons used in the category button.
- bool field_8C
Function documentation
bool Palettes:: PaletteCategory:: ReadProp(const ResourceKey& name,
uint32_ t defaultLayoutID)
Loads the configuration .prop file of this category; this does not load the pages nor the subcategories contained on it.
Parameters | |
---|---|
name | The ResourceKey that points to the .prop file. |
defaultLayoutID | The default instance ID of the layout file that the category will use, if no layout is specified in the .prop file. |
Returns | True if the .prop file existed and was read, false otherwise. |
If the groupID of the ResourceKey given is 0, 0x406B0100 will be used as folder instead.
PaletteCategory* Palettes:: PaletteCategory:: GetCategory(uint32_ t categoryID)
Returns the subcategory in this palette that has the specified instance ID.
Parameters | |
---|---|
categoryID | The instance ID of the category to return. |
Returns | The Palettes:: |
This method will check recursively on all the subcategories and their children categories (if any). If no category has the given ID, nullptr will be returned.
PalettePage* Palettes:: PaletteCategory:: GetPageAt(size_ t nIndex)
Returns the palette page at the specified index.
Parameters | |
---|---|
nIndex |
The behaviour is undefined if the index is out of bounds.
bool Palettes:: PaletteCategory:: HasCategory(PaletteCategory* pCategory)
Tells whether the given subcategory is a children of this subcategory.
Parameters | |
---|---|
pCategory |
Variable documentation
eastl::vector<PaletteCategoryPtr> Palettes:: PaletteCategory:: mChildren
Subcategories contained in this category.
Subcategories are, for example, the different regions that can be painted inside the Paint Region category.
uint32_ t Palettes:: PaletteCategory:: mLayoutID
The instance ID of the user interface layout file used by the category.
The layout is expected to have:
- A window that can contain the DLC group buttons (i.e. creepy & Cute, base game, GA)
- A window with ControlID 0x0AF12396 or 0x811C9DC5 (it's not clear which) that will contain the page.
- A window with ControlID 0x92DF6FD8 that will contain the page numbers and arrows. By default it's 0x89845152.
uint32_ t Palettes:: PaletteCategory:: mnSequenceNumber
An integer number that defines the order of this category inside the palette.
Categories with lower sequence number go first.
uint32_ t Palettes:: PaletteCategory:: mRegionFilterID
For paint categories: the instance ID of a file that defines which region is painted in partial styles.
This is only for block-paint editors, such as the building editor. The file is assumed to be in the folder with group ID 0x406A6F00.
ResourceKey* Palettes:: PaletteCategory:: mCategoryIconList
A list of 9 ResourceKey objects that point to the icons used in the category button.
The images are in this order:
- Normal
- Disabled
- Highlighted (when the mouse is hovered)
- Action (when the mouse is clicked)
- On & Normal (when it's selected)
- On & Disabled (when it's selected and disabled)
- On & Highlighted (when it's selected and the mouse is hovered)
- On & Action (when it's selected and the mouse is clicked)
- Normal again ?