Obsolete the old file dialog.
This commit is contained in:
@@ -6,7 +6,9 @@ namespace Cryville.Crtr.Browsing {
|
||||
Uri GetItemUri(int id);
|
||||
|
||||
bool ImportItemFrom(Uri uri);
|
||||
[Obsolete]
|
||||
string[] GetSupportedFormats();
|
||||
[Obsolete]
|
||||
IReadOnlyDictionary<string, string> GetPresetPaths();
|
||||
|
||||
event Action ItemChanged;
|
||||
|
@@ -13,6 +13,7 @@ namespace Cryville.Crtr.Browsing.UI {
|
||||
readonly HashSet<int> _selectedItems = new HashSet<int>();
|
||||
readonly Dictionary<int, BrowserItem> _items = new Dictionary<int, BrowserItem>();
|
||||
|
||||
[Obsolete]
|
||||
FileDialog _dialog;
|
||||
|
||||
protected virtual void Start() {
|
||||
@@ -22,6 +23,7 @@ namespace Cryville.Crtr.Browsing.UI {
|
||||
InitDialog();
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
protected void InitDialog() {
|
||||
_dialog = Instantiate(Resources.Load<GameObject>("Common/FileDialog")).GetComponent<FileDialog>();
|
||||
_dialog.gameObject.SetActive(false);
|
||||
@@ -65,10 +67,12 @@ namespace Cryville.Crtr.Browsing.UI {
|
||||
ResourceManager.ReturnToDirectory(id);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public void OnAddButtonClicked() {
|
||||
_dialog.Show();
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
private void OnAddDialogClosed() {
|
||||
if (_dialog.FileName == null) return;
|
||||
if (ResourceManager.ImportItemFrom(new Uri(_dialog.FileName))) {
|
||||
|
Reference in New Issue
Block a user