diff --git a/Source/Editor/Content/Import/ImportFilesDialog.cs b/Source/Editor/Content/Import/ImportFilesDialog.cs index ab2c7be15..967583cf6 100644 --- a/Source/Editor/Content/Import/ImportFilesDialog.cs +++ b/Source/Editor/Content/Import/ImportFilesDialog.cs @@ -139,7 +139,7 @@ namespace FlaxEditor.Content.Import var menu = new ContextMenu(); menu.AddButton("Rename", OnRenameClicked); menu.AddButton("Don't import", OnDontImportClicked); - menu.AddButton("Show in Explorer", OnShowInExplorerClicked); + menu.AddButton(Utilities.Constants.ShowInExplorer, OnShowInExplorerClicked); menu.Tag = node; menu.Show(node, location); } diff --git a/Source/Editor/Utilities/Constants.cs b/Source/Editor/Utilities/Constants.cs index 176fed5f7..fb9f82cf5 100644 --- a/Source/Editor/Utilities/Constants.cs +++ b/Source/Editor/Utilities/Constants.cs @@ -14,5 +14,11 @@ namespace FlaxEditor.Utilities public const string FacebookUrl = "https://facebook.com/FlaxEngine"; public const string YoutubeUrl = "https://youtube.com/c/FlaxEngine"; public const string TwitterUrl = "https://twitter.com/FlaxEngine"; + +#if PLATFORM_MAC + public const string ShowInExplorer = "Show in Finder"; +#else + public const string ShowInExplorer = "Show in explorer"; +#endif } } diff --git a/Source/Editor/Windows/ContentWindow.ContextMenu.cs b/Source/Editor/Windows/ContentWindow.ContextMenu.cs index 6923d634d..1dd26ecf5 100644 --- a/Source/Editor/Windows/ContentWindow.ContextMenu.cs +++ b/Source/Editor/Windows/ContentWindow.ContextMenu.cs @@ -58,7 +58,7 @@ namespace FlaxEditor.Windows if (item is ContentFolder contentFolder && contentFolder.Node is ProjectTreeNode) { - cm.AddButton("Show in explorer", () => FileSystem.ShowFileExplorer(CurrentViewFolder.Path)); + cm.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(CurrentViewFolder.Path)); } else if (isValidElement) { @@ -72,7 +72,7 @@ namespace FlaxEditor.Windows Open(e); }); - cm.AddButton("Show in explorer", () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(item.Path))); + cm.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(item.Path))); if (item.HasDefaultThumbnail == false) { @@ -135,7 +135,7 @@ namespace FlaxEditor.Windows } else { - cm.AddButton("Show in explorer", () => FileSystem.ShowFileExplorer(CurrentViewFolder.Path)); + cm.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(CurrentViewFolder.Path)); b = cm.AddButton("Paste", _view.Paste); b.Enabled = _view.CanPaste(); diff --git a/Source/Editor/Windows/OutputLogWindow.cs b/Source/Editor/Windows/OutputLogWindow.cs index 1d188a32c..3665b7073 100644 --- a/Source/Editor/Windows/OutputLogWindow.cs +++ b/Source/Editor/Windows/OutputLogWindow.cs @@ -195,7 +195,7 @@ namespace FlaxEditor.Windows _contextMenu.AddButton("Clear log", Clear); _contextMenu.AddButton("Copy selection", _output.Copy); _contextMenu.AddButton("Select All", _output.SelectAll); - _contextMenu.AddButton("Show in explorer", () => FileSystem.ShowFileExplorer(Path.Combine(Globals.ProjectFolder, "Logs"))); + _contextMenu.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(Path.Combine(Globals.ProjectFolder, "Logs"))); _contextMenu.AddButton("Scroll to bottom", () => { _vScroll.TargetValue = _vScroll.Maximum; }).Icon = Editor.Icons.ArrowDown12; // Setup editor options diff --git a/Source/Editor/Windows/Profiler/Assets.cs b/Source/Editor/Windows/Profiler/Assets.cs index e2a65d496..3ccf6e2eb 100644 --- a/Source/Editor/Windows/Profiler/Assets.cs +++ b/Source/Editor/Windows/Profiler/Assets.cs @@ -274,7 +274,7 @@ namespace FlaxEditor.Windows.Profiler ContextMenuButton b; b = cm.AddButton("Open", () => Editor.Instance.ContentEditing.Open(assetItem)); cm.AddButton("Show in content window", () => Editor.Instance.Windows.ContentWin.Select(assetItem)); - cm.AddButton("Show in explorer", () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(assetItem.Path))); + cm.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(assetItem.Path))); cm.AddButton("Select actors using this asset", () => Editor.Instance.SceneEditing.SelectActorsUsingAsset(assetItem.ID)); cm.AddButton("Show asset references graph", () => Editor.Instance.Windows.Open(new AssetReferencesGraphWindow(Editor.Instance, assetItem))); cm.AddButton("Copy name", () => Clipboard.Text = assetItem.NamePath); diff --git a/Source/Editor/Windows/Search/SearchItem.cs b/Source/Editor/Windows/Search/SearchItem.cs index e8bdc4e56..506d30d0d 100644 --- a/Source/Editor/Windows/Search/SearchItem.cs +++ b/Source/Editor/Windows/Search/SearchItem.cs @@ -157,7 +157,7 @@ namespace FlaxEditor.Windows.Search var cm = new FlaxEditor.GUI.ContextMenu.ContextMenu { Tag = assetItem }; b = cm.AddButton("Open", () => Editor.Instance.ContentFinding.Open(Item)); cm.AddSeparator(); - cm.AddButton("Show in explorer", () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(assetItem.Path))); + cm.AddButton(Utilities.Constants.ShowInExplorer, () => FileSystem.ShowFileExplorer(System.IO.Path.GetDirectoryName(assetItem.Path))); cm.AddButton("Show in Content window", () => Editor.Instance.Windows.ContentWin.Select(assetItem, true)); b.Enabled = proxy != null && proxy.CanReimport(assetItem); if (assetItem is BinaryAssetItem binaryAsset)