Change to use static method for import path ui.
This commit is contained in:
@@ -100,20 +100,9 @@ namespace FlaxEditor.Windows.Assets
|
||||
}
|
||||
|
||||
base.Initialize(layout);
|
||||
|
||||
(window.Item as BinaryAssetItem).GetImportPath(out var path);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
layout.Space(5);
|
||||
layout.Label("Import Path:");
|
||||
var textBox = layout.TextBox().TextBox;
|
||||
textBox.TooltipText = "Path is not editable here.";
|
||||
textBox.IsReadOnly = true;
|
||||
textBox.Text = path;
|
||||
layout.Space(2);
|
||||
var button = layout.Button("Open Import Path in Explorer").Button;
|
||||
button.Clicked += () => FileSystem.ShowFileExplorer(Path.GetDirectoryName(path));
|
||||
}
|
||||
|
||||
// Creates the import path UI
|
||||
Utilities.Utils.CreateImportPathUI(layout, window.Item as BinaryAssetItem);
|
||||
|
||||
layout.Space(10);
|
||||
var reimportButton = layout.Button("Reimport");
|
||||
|
||||
Reference in New Issue
Block a user