diff --git a/Source/Editor/Options/InputOptions.cs b/Source/Editor/Options/InputOptions.cs
index ca0f38b7b..7c577ad4a 100644
--- a/Source/Editor/Options/InputOptions.cs
+++ b/Source/Editor/Options/InputOptions.cs
@@ -123,6 +123,10 @@ namespace FlaxEditor.Options
[EditorDisplay("Common"), EditorOrder(200)]
public InputBinding LockFocusSelection = new InputBinding(KeyboardKeys.F, KeyboardKeys.Shift);
+ [DefaultValue(typeof(InputBinding), "Ctrl+Alpha0")]
+ [EditorDisplay("Common"), EditorOrder(201)]
+ public InputBinding ShowEditorContents = new InputBinding(KeyboardKeys.Alpha0, KeyboardKeys.Control);
+
[DefaultValue(typeof(InputBinding), "Ctrl+F")]
[EditorDisplay("Common"), EditorOrder(210)]
public InputBinding Search = new InputBinding(KeyboardKeys.F, KeyboardKeys.Control);
diff --git a/Source/Editor/Surface/SurfaceUtils.cs b/Source/Editor/Surface/SurfaceUtils.cs
index 638d8338c..257e018af 100644
--- a/Source/Editor/Surface/SurfaceUtils.cs
+++ b/Source/Editor/Surface/SurfaceUtils.cs
@@ -589,7 +589,7 @@ namespace FlaxEditor.Surface
redoButton = toolStrip.AddButton(editor.Icons.Redo64, undo.PerformRedo).LinkTooltip("Redo.", ref inputOptions.Redo);
toolStrip.AddSeparator();
toolStrip.AddButton(editor.Icons.Search64, showSearch).LinkTooltip("Open content search tool.", ref inputOptions.Search);
- toolStrip.AddButton(editor.Icons.CenterView64, surface.ShowWholeGraph).LinkTooltip("Show whole graph.");
+ toolStrip.AddButton(editor.Icons.CenterView64, surface.ShowWholeGraph).LinkTooltip("Show whole graph.", ref inputOptions.ShowEditorContents);
var gridSnapButton = toolStrip.AddButton(editor.Icons.Grid32, surface.ToggleGridSnapping);
gridSnapButton.LinkTooltip("Toggle grid snapping for nodes.");
gridSnapButton.AutoCheck = true;
@@ -600,6 +600,7 @@ namespace FlaxEditor.Surface
window.InputActions.Add(options => options.Undo, undo.PerformUndo);
window.InputActions.Add(options => options.Redo, undo.PerformRedo);
window.InputActions.Add(options => options.Search, showSearch);
+ window.InputActions.Add(options => options.ShowEditorContents, surface.ShowWholeGraph);
}
}
}
diff --git a/Source/Editor/Windows/Assets/PreviewsCacheWindow.cs b/Source/Editor/Windows/Assets/PreviewsCacheWindow.cs
index 1e6e3e863..8e5db9e08 100644
--- a/Source/Editor/Windows/Assets/PreviewsCacheWindow.cs
+++ b/Source/Editor/Windows/Assets/PreviewsCacheWindow.cs
@@ -28,7 +28,7 @@ namespace FlaxEditor.Windows.Assets
};
// Toolstrip
- _toolstrip.AddButton(editor.Icons.CenterView64, _preview.CenterView).LinkTooltip("Center view");
+ _toolstrip.AddButton(editor.Icons.CenterView64, _preview.CenterView).LinkTooltip("Center view", ref editor.Options.Options.Input.ShowEditorContents);
}
///
diff --git a/Source/Editor/Windows/Assets/SpriteAtlasWindow.cs b/Source/Editor/Windows/Assets/SpriteAtlasWindow.cs
index 94deb18c0..b7cf16219 100644
--- a/Source/Editor/Windows/Assets/SpriteAtlasWindow.cs
+++ b/Source/Editor/Windows/Assets/SpriteAtlasWindow.cs
@@ -326,7 +326,9 @@ namespace FlaxEditor.Windows.Assets
_propertiesEditor.BuildLayout();
}).LinkTooltip("Add a new sprite");
_toolstrip.AddSeparator();
- _toolstrip.AddButton(editor.Icons.CenterView64, _preview.CenterView).LinkTooltip("Center view");
+ _toolstrip.AddButton(editor.Icons.CenterView64, _preview.CenterView).LinkTooltip("Center view", ref editor.Options.Options.Input.ShowEditorContents);
+
+ InputActions.Add(options => options.ShowEditorContents, _preview.CenterView);
}
///
diff --git a/Source/Editor/Windows/Assets/TextureWindow.cs b/Source/Editor/Windows/Assets/TextureWindow.cs
index dcdd6e750..4aae7f674 100644
--- a/Source/Editor/Windows/Assets/TextureWindow.cs
+++ b/Source/Editor/Windows/Assets/TextureWindow.cs
@@ -262,9 +262,11 @@ namespace FlaxEditor.Windows.Assets
_saveButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Save64, Save).LinkTooltip("Save", ref inputOptions.Save);
_toolstrip.AddButton(Editor.Icons.Import64, () => Editor.ContentImporting.Reimport((BinaryAssetItem)Item)).LinkTooltip("Reimport");
_toolstrip.AddSeparator();
- _toolstrip.AddButton(Editor.Icons.CenterView64, _preview.CenterView).LinkTooltip("Center view");
+ _toolstrip.AddButton(Editor.Icons.CenterView64, _preview.CenterView).LinkTooltip("Center view", ref editor.Options.Options.Input.ShowEditorContents);
_toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/graphics/textures/index.html")).LinkTooltip("See documentation to learn more");
+
+ InputActions.Add(options => options.ShowEditorContents, _preview.CenterView);
}
///