Jump to content

Label click event


Dvor_nik

Recommended Posts

Hi!

How I can add click event for LABEL widget?

I think it not very hard (because it based on widget)?

	#if GINPUT_NEED_MOUSE
{
0, // Process mose down events (NOT USED)
0, // Process mouse up events (NOT USED)
0, // Process mouse move events (NOT USED)
},

Link to comment
Share on other sites

If you really want to create a mouseDown and mosueUp event then the code you posted is the right way to go. In fact, you can see how the button widget handles this.

However, the real question to ask here is why you would want to do that. A label is a non-interactive element by design. What do you want to archive? Usually the right way to do anything like this is to implement a custom render for a button or a checkbox using the standard API.

~ Tectu

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...