class
PaletteMainThis object represents the palette of an editor.
An editor can have two palettes, one for build mode and the other for paint mode. Palettes contain categories (Palettes::
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
- PaletteMain()
- ~PaletteMain() virtual
Public functions
-
auto ReadProp(const ResourceKey& name,
uint32_
t creationTypeID = -1, uint32_ t arg_8 = 0, uint32_ t layoutID = 0, uint32_ t categoryLayoutID = 0, uint32_ t pageLayoutID = 0, uint32_ t arg_18 = 0) -> bool - Loads the configuration .prop file of this palette, as well as all the page palettes that use it.
- auto ReadModuleProp(const ResourceKey& name) -> void
- Loads the configuration .prop of a module that makes up this palette.
-
auto GetCategory(uint32_
t categoryID) -> PaletteCategory* - Returns the category or subcategory in this palette that has the specified instance ID.
-
auto GetCategoryAt(size_
t nIndex) -> PaletteCategory* - Returns the category that is at the specified index.
- auto Unload() -> void
- auto AddRef() -> int override
- auto Release() -> int override
-
auto Cast(uint32_
t) const -> void* override
Public variables
- eastl::vector<PaletteCategoryPtr> mCategories
- A vector with all the categories used in this palette.
-
uint32_
t mLayoutID - The instance ID of the user interface layout file used by the palette.
-
uint32_
t mCategoryLayoutID - An instance ID that points to the layout categories must use.
-
uint32_
t mPageLayoutID - An instance ID that points to the layout pages must use.
-
uint32_
t field_2C -
uint32_
t mThumbnailGroupID - The ID of the folder that contains the icons for the parts in the palette, such as 0x02231C8B ('CreaturePartIcons~').
-
uint32_
t field_34 - Related to mThumbnailGroupID.
-
uint32_
t mnStartupCategory - The index of the category that will be selected when the editor is first opened.
-
uint32_
t mCreationTypeID - The type of creature, as an ID, that the editor of this palette is editing (for example, 'creature').
Function documentation
bool Palettes:: PaletteMain:: ReadProp(const ResourceKey& name,
uint32_ t creationTypeID = -1,
uint32_ t arg_8 = 0,
uint32_ t layoutID = 0,
uint32_ t categoryLayoutID = 0,
uint32_ t pageLayoutID = 0,
uint32_ t arg_18 = 0)
Loads the configuration .prop file of this palette, as well as all the page palettes that use it.
Parameters | |
---|---|
name | The ResourceKey that points to the .prop file. |
creationTypeID | The ID that represents the type of creation of the editor, such as 'creature'. |
arg_8 | Sets the field_34 value; it's a folder ID used for icons, but only on very specific occasions. |
layoutID | The default instance ID of the layout file that the palette must use. If this is specified, the 'palettePaletteLayoutID' property willbe ignored. |
categoryLayoutID | An instance ID that points to the layout categories must use. If this is specified, the 'paletteCategoryLayoutFile' property on each category will be ignored. |
pageLayoutID | An instance ID that points to the layout pages must use. If this is specified, the 'palettePageLayoutFile' property on each page will be ignored. |
arg_18 | A value that will be set in field_2C. |
Returns | True if the .prop file existed and was read, false otherwise. |
All the modules (i.e. prop files that contain a list with all the pages used by the palette) will be loaded; modules are expected to be inside a folder with ID 0x406B6BXX, where XX are the last two digits of the instance ID of the palette .prop file.
void Palettes:: PaletteMain:: ReadModuleProp(const ResourceKey& name)
Loads the configuration .prop of a module that makes up this palette.
Parameters | |
---|---|
name | The ResourceKey that points to the .prop file. |
A certain palette can have infinite modules that can belong to different mods; each module .prop just contains a list of pages that belong to the palette. This method will load all those pages as well, using the Palettes::
PaletteCategory* Palettes:: PaletteMain:: GetCategory(uint32_ t categoryID)
Returns the category or 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 categories and their children categories (if any). If no category has the given ID, nullptr will be returned.
PaletteCategory* Palettes:: PaletteMain:: GetCategoryAt(size_ t nIndex)
Returns the category that is at the specified index.
Parameters | |
---|---|
nIndex | The index the category is at in the vector. |
Returns | The Palettes:: |
Categories are generally ordered by the Palettes::
Variable documentation
uint32_ t Palettes:: PaletteMain:: mCategoryLayoutID
An instance ID that points to the layout categories must use.
If this is specified, the 'paletteCategoryLayoutFile' property on each category will be ignored.
uint32_ t Palettes:: PaletteMain:: mPageLayoutID
An instance ID that points to the layout pages must use.
If this is specified, the 'palettePageLayoutFile' property on each page will be ignored.
uint32_ t Palettes:: PaletteMain:: mnStartupCategory
The index of the category that will be selected when the editor is first opened.
For instance, if the value is 0, the first category will be selected.