Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - 135

Pages: [1]
1
DotNet / Question about Input
« on: July 29, 2011, 10:39:46 am »
Hey Laurent

Did you manage to reproduce the behaviour ?

2
DotNet / SFML Drawables
« on: July 25, 2011, 05:52:44 pm »
I would use a image containing all the frames and subRect before each draw.

3
DotNet / FloatRect.Intersects() - Um... What?...
« on: July 25, 2011, 05:49:19 pm »
May be you can show us your full loop ?

From you code: you draw a cyan rectangle then a green rectangle over then a red rectangle over.
Nothing incompatible with your output if mObj = oObj.

4
DotNet / Question about Input
« on: July 23, 2011, 07:34:27 pm »
Sure.
Code: [Select]

Imports SFML.Graphics
Imports SFML.Window

Public Class SFMLPanel
    Inherits Panel

    'the SFML window
    Protected WithEvents RenderWindow As RenderWindow

    ''' <summary>
    ''' Constructor
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub New()
        MyBase.New()

        'init
        Me.SetStyle(ControlStyles.UserPaint Or ControlStyles.AllPaintingInWmPaint Or ControlStyles.Opaque, True)
        RenderWindow = New RenderWindow(Me.Handle)

    End Sub

    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)

        'clear
        RenderWindow.Clear()
        MyBase.OnPaint(e)

        RenderWindow.DispatchEvents()

     
        'render
        RenderWindow.Display()

        'next iteration
        Application.DoEvents()
        Me.Invalidate()

    End Sub

    Protected Overrides Sub OnResize(ByVal eventargs As System.EventArgs)
        MyBase.OnResize(eventargs)
        'update view
        RenderWindow.SetView(New View(New FloatRect(0, 0, Me.Width, Me.Height)))
    End Sub


    Private Sub RenderWindow_MouseMoved(ByVal sender As Object, ByVal e As SFML.Window.MouseMoveEventArgs) _
        Handles RenderWindow.MouseMoved

        Debug.WriteLine("Mouse moved " + e.X.ToString + " ; " + e.Y.ToString)

    End Sub


    Private Sub RenderWindow_MouseButtonPressed(ByVal sender As Object, ByVal e As SFML.Window.MouseButtonEventArgs) _
      Handles RenderWindow.MouseButtonPressed

        Debug.WriteLine("Mouse clicked")
        Me.Focus()

    End Sub

End Class


And this panel is only docked in my main form :

Code: [Select]
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim renderPanel As New SFMLPanel

        SplitContainer1.Panel1.Controls.Add(renderPanel)
        renderPanel.Dock = DockStyle.Fill

    End Sub

End Class

5
DotNet / Question about Input
« on: July 23, 2011, 04:49:27 pm »
Hello

I'm just trying SFML 2 in .net since yesterday.
First, this is a great engine, really easy to use.

Dealing with the inputs, i have just figured out that a mouse move event is triggered on a mouse clicked, even if the mouse didn't move.
Is it a intended (and quite surprising) behavior ?

Pages: [1]