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