Jump to content

dxButton


Mann56

Recommended Posts

Hey guys,

I was making a dxButton for my resource, but i have no idea how to get it clicked.

I mean : I have a dxRectangle, then i can change the colour of the rectangle a bit when a players hovers his mouse over it, but how can i get his click on the dxButton, i want the button to function as a normal gui button works...

Thanks for reading,

Regards,

Mann

Link to comment
either hide a MTA GUI button under there with an alpha of 0, or just add an eventhandler; onClientClick, and add a "hoverButton = " in your render. If the hoverButton equals something, it clicks a button.

Thanks,

So if i am right, i can use a onClientClick and check if the cursor was clicked in the designated area and so output the function?

EDIT: Can you explain the second method of ahover button to me? I made a onClientClick and got the position of cursor using getCursorPosition, but how'd i check if the cursor is in a particular space without using gui buttons ?

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...