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 - Torraske

Pages: [1]
1
Window / Re: PollEvent and double MouseButtonPressed
« on: June 06, 2012, 06:23:45 pm »
I realized the PollEvent is being overriden by the RenderWindow class, so it is calling the PollEvent from "csfml-graphics-2.dll" (Not window dll)

I am trying to use the latest sfml graphics lib to solve it.

Sorry for the previous unaccurate info

2
Window / Re: PollEvent and double MouseButtonPressed
« on: June 05, 2012, 11:24:22 pm »
Yes I think the problem may be there, I will try to replace the libraries.

The doesnt use the sfml-net because when they started to build the engine, the sfml-net were not created. So to exchange the libs now is doesnt worth the effort.

However, I cannot do anything without the f***ing double click!! And I want it when I press the second "MouseButtonPressed" not the common double click: the second "MouseButtonReleased"

Thanks for your replies

3
Window / Re: PollEvent and double MouseButtonPressed
« on: June 04, 2012, 12:52:09 am »
Thanks for the reply, I am coding in C#, but I have the libraries directly imported from the "csfml" using:

            [DllImport("csfml-window-2", CallingConvention = CallingConvention.Cdecl)]
            [SuppressUnmanagedCodeSecurity]
            static extern bool sfWindow_PollEvent(IntPtr This, out Event Evt);
 

I will try anyway on other computers to see if the problem is my OS or graphic card

4
Window / Re: PollEvent and double MouseButtonPressed
« on: May 31, 2012, 06:39:50 pm »
Lurent:

I am not sure, because I have downloaded them with an engine (the sfml dll date is November 8th 2011 and the function hooked is PollEvent (not pollEvent))

However, I have downloaded the latest DLL and hooked it directly to pollEvent without luck.
The OS is Win7 x64

The engine is coded in C#, but it uses the csfml libs (not the sfml net). Could it make some trouble? The weird thing it works perfect for button release...


eXpl0it3r:

I am not concerned with the double click function right now, the problem I have is the event is not catched by PollEvent for some very weird reason.


Thanks guys, I have been several days trying to fix this issue and I am getting crazy



5
Window / Re: PollEvent and double MouseButtonPressed
« on: May 31, 2012, 06:01:23 pm »
Thanks for your reply, my code looks weird because it is in C# (I dont like it too)

I have changed it to see if it is clearer:

(Note that the problem is in PollEvent, it doesnt send me the second button pressed)

            public void DispatchEvents()
            {
                Event e;
                while (PollEvent(out e)) // PollEvent Location
                {
                   if(e.type == EvenType.MouseButtonPressed)
                   {
                           if(MouseButtonPressed < 2)
                                   ++MouseButtonPressed; // Doesnt work, when I double click, the PollEvent seems to "eat" a click
                           else
                           {
                                   MouseButtonPressed = 0;
                                   // Handle Double (or more) Click Event
                           }
                   }
                }
            }
       
 

6
Window / PollEvent and double MouseButtonPressed
« on: May 31, 2012, 04:21:56 pm »
Hello, my problem is very weird, I want to perform a simple "double click" (but triggered when I press the mouse button, not when I release it)

Problem: The PollEvent is not detecting me the second MouseButtonPressed (for a double click)

It is weird because it detects the second MouseButtonReleased, but not the MouseButtonPressed :S

Code:

            public void DispatchEvents()
            {
                Event e;
                while (PollEvent(out e)) // PollEvent Location
                {
                    CallEventHandler(e);
                }
            }
           
            void CallEventHandler(Event e)
            {
                switch (e.Type)
                {                    
                    case EventType.MouseButtonPressed:         // Doesn't detect double click            
                        if (MouseButtonPressed != null)  
                            MouseButtonPressed(this, new MouseButtonEventArgs(e.MouseButton));                        
                        break;

                    case EventType.MouseButtonReleased:       // Does detect doble click                
                        if (MouseButtonReleased != null)
                            MouseButtonReleased(this, new MouseButtonEventArgs(e.MouseButton));
                        break;
                   
                }
            }

 

Thanks!!

Pages: [1]