upgrade to .net6 part 2

This commit is contained in:
2022-06-07 12:54:35 +02:00
parent 0d4322c2b3
commit 39ea821fee
3 changed files with 16 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ Imports OpenTK.Mathematics
Imports OpenTK.WinForms
Imports OpenTK.Input
Imports OpenTK.Windowing.GraphicsLibraryFramework
Imports Key = OpenTK3.Input.Key
Namespace PreviewN
@@ -31,6 +32,12 @@ Namespace PreviewN
Public Property Scaling As Single = 500.0F
Public Property ClearColor As Color = Color.CornflowerBlue
Public ReadOnly Property Keyboard As OpenTK3.Input.KeyboardState
Get
Return OpenTK3.Input.Keyboard.GetState
End Get
End Property
Public Property EnableCameraControlling As Boolean
Get
Return _EnableCameraControlling
@@ -82,14 +89,14 @@ Namespace PreviewN
Private ReadOnly Property IsStrgPressed As Boolean
Get
Dim state As KeyboardState = Keyboard.GetState()
Dim state = Keyboard
Return state(Key.ControlLeft) OrElse state(Key.ControlRight)
End Get
End Property
Private ReadOnly Property IsShiftPressed As Boolean
Get
Dim state As KeyboardState = Keyboard.GetState()
Dim state = Keyboard
Return state(Key.ShiftLeft) OrElse state(Key.ShiftRight)
End Get
End Property
@@ -286,7 +293,7 @@ Namespace PreviewN
Dim allowCamMove As Boolean = Not (IsMouseDown AndAlso IsShiftPressed)
If allowCamMove Then
Dim state As KeyboardState = Keyboard.GetState
Dim state = Keyboard
If state(Key.W) Then
'camera.Move(moveSpeed, moveSpeed, camMtx)