Editor API
UnigineEditor public API
AssetDialogs.h
1 // Copyright (C), UNIGINE. All rights reserved.
2 #pragma once
3 
4 #include <editor/EditorGlobal.h>
5 
6 #include <UnigineCallback.h>
7 #include <UnigineGUID.h>
8 #include <UnigineVector.h>
9 
10 
11 namespace Editor
12 {
14 class EDITOR_API AssetDialogs final
15 {
16 public:
18  enum class DialogMode
19  {
21  Modal,
23  Modeless
24  };
25 
28  {
30  Unigine::UGUID asset_guid;
32  Unigine::UGUID runtime_guid;
33  };
34 
43  static void browseAsset(Unigine::CallbackBase1<const SelectedAsset &> *callback,
44  const char *window_title = nullptr,
45  const char *filter = nullptr,
46  const char *hint_asset_path = nullptr,
47  DialogMode mode = DialogMode::Modal);
48 
57  static void browseAssetList(Unigine::CallbackBase1<const Unigine::Vector<SelectedAsset> &> *callback,
58  const char *window_title = nullptr,
59  const char *filter = nullptr,
60  const char *hint_asset_path = nullptr,
61  DialogMode mode = DialogMode::Modal);
62 
71  static void saveAsset(Unigine::CallbackBase1<const char *> *callback,
72  const char *window_title = nullptr,
73  const char *filter = nullptr,
74  const char *dest_path = nullptr,
75  DialogMode mode = DialogMode::Modal);
76 };
77 
78 } // namespace Editor
Definition: Actions.h:11
DialogMode
Dialog mode.
Definition: AssetDialogs.h:18
Unigine::UGUID asset_guid
GUID of the selected asset. Additional information for a given GUID can be obtained via the Unigine::...
Definition: AssetDialogs.h:30
This class is used to represent a standard asset dialog of the UnigineEditor that can be used for ope...
Definition: AssetDialogs.h:14
Unigine::UGUID runtime_guid
GUID of the selected asset's runtime-file. Additional information for a given GUID can be obtained vi...
Definition: AssetDialogs.h:32
Structure representing an asset selected in the dialog.
Definition: AssetDialogs.h:27