nw::PaletteTreeNode

struct PaletteTreeNode

Public Functions

explicit PaletteTreeNode(nw::MemoryResource *allocator)
PaletteTreeNode *add_blueprint(String name, Resref resref, uint32_t strref)

Add blueprint node to root.

PaletteTreeNode *add_branch(String name, uint32_t strref)

Add branch node to root.

PaletteTreeNode *add_category(String name, uint32_t strref, int id = -1)

Add category to root.

void clear()

Clears node returning it to default constructed state.

Public Members

PaletteNodeType type
uint8_t id = std::numeric_limits<uint8_t>::max()
uint8_t display = 0
String name
uint32_t strref = std::numeric_limits<uint32_t>::max()
Resref resref
float cr = 0.0
String faction
Palette *parent = nullptr
Vector<PaletteTreeNode*> children