TestEIn 1.6h4 :

- possibilità di escludere presa di fuoco su scena con solo mouse move.
This commit is contained in:
Dario Sassi
2015-08-22 13:53:28 +00:00
parent fa6fd31152
commit 967989bf00
2 changed files with 14 additions and 6 deletions
+2 -2
View File
@@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices
' utilizzando l'asterisco (*) come descritto di seguito:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.6.8.3")>
<Assembly: AssemblyFileVersion("1.6.8.3")>
<Assembly: AssemblyVersion("1.6.8.4")>
<Assembly: AssemblyFileVersion("1.6.8.4")>
+12 -4
View File
@@ -224,8 +224,14 @@ Public Class Scene
Public Event OnChangedSnapPointType(ByVal sender As Object, ByVal nSpType As SP, ByVal bForced As Boolean)
'---- Mouse -----------
Private m_bSetFocusOnMove As Boolean = True
' Per correggere un problema con hot spot cursore, nei file cur è stato spostato di 4 pixel in Y+ (in basso)
Public Sub SetFocusOnMove(ByVal bVal As Boolean)
m_bSetFocusOnMove = bVal
End Sub
Protected Overrides Sub OnMouseDown(e As System.Windows.Forms.MouseEventArgs)
' Imposto il contesto della scena come corrente
EgtSetCurrentContext(m_nGseContext)
@@ -486,10 +492,12 @@ Public Class Scene
EgtSetCurrentContext(m_nGseContext)
End If
' Se sono abbastanza all'interno della scena (10% della dimensione), imposto il focus
Const BordPu As Double = 0.10000000000000001
If e.Location.X > BordPu * Size.Width AndAlso e.Location.X < (1 - BordPu) * Size.Width AndAlso
e.Location.Y > BordPu * Size.Height AndAlso e.Location.Y < (1 - BordPu) * Size.Height Then
Focus()
If m_bSetFocusOnMove Then
Const BordPu As Double = 0.1
If e.Location.X > BordPu * Size.Width AndAlso e.Location.X < (1 - BordPu) * Size.Width AndAlso
e.Location.Y > BordPu * Size.Height AndAlso e.Location.Y < (1 - BordPu) * Size.Height Then
Focus()
End If
End If
' Visualizzo le coordinate del mouse
ShowCursorPos(e.Location)