Skip to content

Commit

Permalink
[Nodes] Renderer has option to disable default shortcuts when focused
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvux committed Feb 12, 2017
1 parent 81ec8a6 commit 59c6e9d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ private bool DecodeTouch(ref Message m)
[Input("Show Cursor", DefaultValue = 0, Visibility = PinVisibility.OnlyInspector)]
protected IDiffSpread<bool> FInShowCursor;

[Input("Disable Shortcuts", DefaultValue = 0,IsSingle =true, Visibility = PinVisibility.OnlyInspector)]
protected IDiffSpread<bool> FInDisableShortCuts;

[Input("Refresh Rate", DefaultValue = 60, Visibility = PinVisibility.OnlyInspector)]
protected IDiffSpread<int> FInRefreshRate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public DX11RendererNode(IPluginHost host, IIOFactory iofactory,IHDEHost hdehost)
this.Resize += DX11RendererNode_Resize;
this.Load += new EventHandler(DX11RendererNode_Load);
this.MouseWheel += new System.Windows.Forms.MouseEventHandler(DX11RendererNode_MouseWheel);
this.GotFocus += DX11RendererNode_GotFocus;
this.LostFocus += DX11RendererNode_LostFocus;

Touchdown += OnTouchDownHandler;
Touchup += OnTouchUpHandler;
Expand All @@ -48,6 +50,22 @@ public DX11RendererNode(IPluginHost host, IIOFactory iofactory,IHDEHost hdehost)

}

private void DX11RendererNode_LostFocus(object sender, EventArgs e)
{
if (this.FInDisableShortCuts[0])
{
this.hde.EnableShortCuts();
}
}

private void DX11RendererNode_GotFocus(object sender, EventArgs e)
{
if (this.FInDisableShortCuts[0])
{
this.hde.DisableShortCuts();
}
}

private bool touchsupport;

void DX11RendererNode_Load(object sender, EventArgs e)
Expand Down

0 comments on commit 59c6e9d

Please sign in to comment.