From f85accc99f673a20b6cc130d1861e584bdae061f Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Wed, 6 Jul 2011 22:13:27 +0200 Subject: [PATCH] Updated the Visual Basic example of SFML.Net --- bindings/dotnet/examples/visualbasic/OpenGL.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/dotnet/examples/visualbasic/OpenGL.vb b/bindings/dotnet/examples/visualbasic/OpenGL.vb index 84966481..b25ec708 100644 --- a/bindings/dotnet/examples/visualbasic/OpenGL.vb +++ b/bindings/dotnet/examples/visualbasic/OpenGL.vb @@ -23,7 +23,7 @@ Module OpenGL ' Create a text to display Dim text = New Text("SFML / OpenGL demo") - text.Position = New Vector2(250.0F, 450.0F) + text.Position = New Vector2f(250.0F, 450.0F) text.Color = New Color(255, 255, 255, 170) ' Load an OpenGL texture. @@ -70,8 +70,8 @@ Module OpenGL Gl.glClear(Gl.GL_DEPTH_BUFFER_BIT) ' We get the position of the mouse cursor, so that we can move the box accordingly - Dim x = window.Input.GetMouseX() * 200.0F / window.Width - 100.0F - Dim y = -window.Input.GetMouseY() * 200.0F / window.Height + 100.0F + Dim x = window.GetCursorPosition().X * 200.0F / window.Width - 100.0F + Dim y = -window.GetCursorPosition().Y * 200.0F / window.Height + 100.0F ' Apply some transformations time += window.GetFrameTime() / 1000.0F @@ -146,7 +146,7 @@ Module OpenGL ''' Sub App_KeyPressed(ByVal sender As Object, ByVal e As KeyEventArgs) Handles window.KeyPressed Dim window = CType(sender, RenderWindow) - If e.Code = KeyCode.Escape Then + If e.Code = Keyboard.Key.Escape Then window.Close() End If End Sub