1.1.0: Added README and ToolbarSettings, so visibility of tools can be set in Preferences -> Module -> Toolbar
This commit is contained in:
parent
e1d2deb4c5
commit
9802f8aaa3
23 changed files with 297 additions and 43 deletions
|
|
@ -11,13 +11,15 @@ using UnityEditor.SceneManagement;
|
|||
using UnityEditor.Experimental.SceneManagement;
|
||||
#endif
|
||||
|
||||
namespace Module.NavigationTool.Editor.Tools
|
||||
namespace Module.NavigationTool.Editor.Toolbar
|
||||
{
|
||||
[UsedImplicitly]
|
||||
internal sealed class ToolUICanvasPicker : AbstractToolbarDrawer
|
||||
{
|
||||
public override bool Visible => ToolbarSettings.IsUiEnabled;
|
||||
public override bool Enabled => (UTools.visibleLayers & (1 << LayerMask.NameToLayer("UI"))) != 0;
|
||||
public override EToolbarPlacement Placement => EToolbarPlacement.Left;
|
||||
public override int Priority => (int)EToolbarPriority.Medium;
|
||||
|
||||
private static bool IS_DIRTY = true;
|
||||
private static string[] OPTIONS = new string[0];
|
||||
|
|
@ -62,7 +64,8 @@ namespace Module.NavigationTool.Editor.Tools
|
|||
|
||||
protected override void Draw(Rect rect)
|
||||
{
|
||||
// Note: To fix an issue, where instantiated canvases wouldn't be detected, due to no events for canvas additions/removals exist in Unity API (at the moment)
|
||||
// Note: To fix an issue, where instantiated canvases wouldn't be detected, due to no events for canvas
|
||||
// additions/removals exist in Unity API (at the moment)
|
||||
if (Event.current.type == EventType.MouseDown)
|
||||
{
|
||||
IS_DIRTY = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue