C4 Engine
C4 Engine API Documentation

class ResourceSetting

Defined in:  C4Configuration.h
The ResourceSetting class is used for a resource name setting represented by a text box and a browse button.
Definition

class ResourceSetting : public Setting

Member Functions
ResourceSetting::GetResourceName Returns the resource name stored in the setting.
Constructor

ResourceSetting(Type identifier, const char *title, const char *name, 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.
name The initial resource name for 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 ResourceSetting class represents a setting that displays a text box and has a resource name value. 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.
Base Classes
Setting A ResourceSetting is a specific type of setting.