C4 Engine
C4 Engine API Documentation

class MultiResourceSetting

Defined in:  C4Configuration.h
The MultiResourceSetting class is used for a setting showing a list of resource names in a text box with a browse button.
Definition

class MultiResourceSetting : public Setting

Member Functions
MultiResourceSetting::GetResourceCount Returns the number of resource names stored in the setting.
MultiResourceSetting::GetResourceName Returns an individual resource name stored in the setting.
Constructor

ResourceSetting(Type identifier, const char *title, const char *picker,

const ResourceDescriptor *descriptor, const char *subdir = nullptruint32 flags = 0);

Parameters
identifier The setting's unique identifier.
title The title of the setting.
picker The title of the file picker dialog.
descriptor A pointer to the resource descriptor for the type of resource that can be chosen with the setting.
subdir A subdirectory within the main resource directory to which the resource selection should be restricted.
flags Flags that affect the behavior of the setting.
Description
The MultiResourceSetting class represents a setting that displays a text box and has a value which is a list of resource names. A button is also displayed that causes a file picker dialog to appear when clicked by the user. When a file is chosen through the file picker, the returned resource name is the virtual path to the resource if the flags parameter is 0. If the following value is specified for the flags parameter, then the generic path to the resource is returned.
kResourceSettingGenericPath Return the generic resource path instead of the virtual resource path.
kResourceSettingImportCatalog Show files in the Import folder instead of the Data folder.
When new files are chosen in the file picker, they are added to the list of resource names.
Base Classes
Setting A MultiResourceSetting is a specific type of setting.