31
DotNet / Re: [VB.NET] Mouse events for custom drawn gfx controls.
« on: June 10, 2016, 03:39:05 am »
Coming back to this, I have been looking up how to apply a callback function to my custom control, but I am unable to figure this out. Maybe I rambled on too much in the above posts? I have sought assistance on other forums, but keep being referred here because no one knows what SFML is, or how to assist. I'd like to start fresh and see if I can get a pointer, either C# or VB.net, on how to do this.
I'm making a custom control class library, essentially drawn primitives on a render window, to mimic a control such as a button.
Traditional event handlers do not work, so I am having to push the location of the mouse through the render window's event to the location of the button, check if the mouse is over or clicked(down), then set the image over/down for the button.
Moving the mouse with any speed will not toggle the mouse up/leave events, which causes the button to appear to still be hovered or clicked down on the button. Note the horizontal scroll bars left button:
Every example of a callback that I can find refer to calling back to a .dll file. I am really lost. I have noticed other control libraries that allow the functionality for the mouse events to happen without going through what I am, plus there are no issues with the mouse leave events not firing.
Hopefully that can explain my issue better. I will give someone an awesome hi-five if they can explain what I need to do, or if there is something else that I did not know to look up
I'm making a custom control class library, essentially drawn primitives on a render window, to mimic a control such as a button.
Traditional event handlers do not work, so I am having to push the location of the mouse through the render window's event to the location of the button, check if the mouse is over or clicked(down), then set the image over/down for the button.
Moving the mouse with any speed will not toggle the mouse up/leave events, which causes the button to appear to still be hovered or clicked down on the button. Note the horizontal scroll bars left button:
Every example of a callback that I can find refer to calling back to a .dll file. I am really lost. I have noticed other control libraries that allow the functionality for the mouse events to happen without going through what I am, plus there are no issues with the mouse leave events not firing.
Hopefully that can explain my issue better. I will give someone an awesome hi-five if they can explain what I need to do, or if there is something else that I did not know to look up