This class is used to represent a standard asset dialog of the UnigineEditor that can be used for opening and saving assets.
More...
#include <AssetDialogs.h>
|
static void | browseAsset (Unigine::CallbackBase1< const SelectedAsset & > *callback, const char *window_title=nullptr, const char *filter=nullptr, const char *hint_asset_path=nullptr, DialogMode mode=DialogMode::Modal) |
| Opens a dialog enabling the user to select a single asset. When the dialog opens, the specified default path and file filter shall be set displaying the corresponding elements. On selecting an asset and confirming selection by clicking OK, the specified callback function is executed. More...
|
|
static void | browseAssetList (Unigine::CallbackBase1< const Unigine::Vector< SelectedAsset > & > *callback, const char *window_title=nullptr, const char *filter=nullptr, const char *hint_asset_path=nullptr, DialogMode mode=DialogMode::Modal) |
| Opens a dialog enabling the user to select multiple assets. When the dialog opens, the specified default path and file filter shall be set displaying the corresponding elements. On selecting assets and confirming selection by clicking OK, the specified callback function is executed. More...
|
|
static void | saveAsset (Unigine::CallbackBase1< const char * > *callback, const char *window_title=nullptr, const char *filter=nullptr, const char *dest_path=nullptr, DialogMode mode=DialogMode::Modal) |
| Opens a dialog enabling the user to save an asset to the selected path. When the dialog opens, the specified default path and file filter shall be set displaying the corresponding elements. On selecting assets and confirming selection by clicking OK, the specified callback function is executed. More...
|
|
This class is used to represent a standard asset dialog of the UnigineEditor that can be used for opening and saving assets.
◆ DialogMode
Dialog mode.
Enumerator |
---|
Modal | Modal dialog, which requires the user to respond before continuing the program (the function returns control only when the user closes the dialog).
|
Modeless | Modeless dialog, which stays on the screen and is available for use at any time but permits other user activities (the function returns control right after creating and displaying the dialog).
|
◆ browseAsset()
static void Editor::AssetDialogs::browseAsset |
( |
Unigine::CallbackBase1< const SelectedAsset & > * |
callback, |
|
|
const char * |
window_title = nullptr , |
|
|
const char * |
filter = nullptr , |
|
|
const char * |
hint_asset_path = nullptr , |
|
|
DialogMode |
mode = DialogMode::Modal |
|
) |
| |
|
static |
Opens a dialog enabling the user to select a single asset. When the dialog opens, the specified default path and file filter shall be set displaying the corresponding elements. On selecting an asset and confirming selection by clicking OK, the specified callback function is executed.
- Parameters
-
callback | Callback function to be fired on selecting an asset and clicking OK. The signature of the callback function is as follows: void (const SelectedAsset &) |
window_title | Title of the dialog window. If not specified, the default title is 'Select Asset'. |
filter | Filter, which is used to display files of required types only. List of file extensions with leading dots and without additional separators, for example: .mesh.prop. If the filter is empty, the dialog displays assets of all types. |
hint_asset_path | Path to an asset to be selected by default when the dialog opens. |
mode | Dialog mode to be set (see DialogMode). |
◆ browseAssetList()
static void Editor::AssetDialogs::browseAssetList |
( |
Unigine::CallbackBase1< const Unigine::Vector< SelectedAsset > & > * |
callback, |
|
|
const char * |
window_title = nullptr , |
|
|
const char * |
filter = nullptr , |
|
|
const char * |
hint_asset_path = nullptr , |
|
|
DialogMode |
mode = DialogMode::Modal |
|
) |
| |
|
static |
Opens a dialog enabling the user to select multiple assets. When the dialog opens, the specified default path and file filter shall be set displaying the corresponding elements. On selecting assets and confirming selection by clicking OK, the specified callback function is executed.
- Parameters
-
callback | Callback function to be fired on selecting assets and clicking OK. The signature of the callback function is as follows: void (const Unigine::Vector<SelectedAsset> &) |
window_title | Title of the dialog window. If not specified, the default title is 'Select Asset'. |
filter | Filter, which is used to display files of required types only. List of file extensions with leading dots and without additional separators, for example: .mesh.prop. If the filter is empty, the dialog displays assets of all types. |
hint_asset_path | Path to an asset to be selected by default when the dialog opens. |
mode | Dialog mode to be set (see DialogMode). |
◆ saveAsset()
static void Editor::AssetDialogs::saveAsset |
( |
Unigine::CallbackBase1< const char * > * |
callback, |
|
|
const char * |
window_title = nullptr , |
|
|
const char * |
filter = nullptr , |
|
|
const char * |
dest_path = nullptr , |
|
|
DialogMode |
mode = DialogMode::Modal |
|
) |
| |
|
static |
Opens a dialog enabling the user to save an asset to the selected path. When the dialog opens, the specified default path and file filter shall be set displaying the corresponding elements. On selecting assets and confirming selection by clicking OK, the specified callback function is executed.
- Parameters
-
callback | Callback function to be fired on selecting an asset and clicking OK. The signature of the callback function is as follows: void (const char *) |
window_title | Title of the dialog window. If not specified, the default title is 'Save Asset'. |
filter | Filter, which is used to display files of required types only. List of file extensions with leading dots and without additional separators, for example: .mesh.prop. If the filter is empty, the dialog displays assets of all types. |
dest_path | Destination path to be set by default, when the dialog opens. |
mode | Dialog mode to be set (see DialogMode). |