Jump to content

dxDrawRectangle on right click


botshara

Recommended Posts

Hello, Im trying to make inventory script and I want when I press right mouse button on the item then acurs my function.

The problem is that dx functions doesnt support onClientClick by default, I looked in forum and I found some solutions where onClientClick checks for coords, but this variant is not suitable for me because i need also check which item I pressed. Also I cant use onClientGUIClick for example by creating empty label because onClientGUIClick doesnt work when I press right mouse button.

Any ideas?

Edited by botshara
Link to comment

What would probably be a lot easier, more flexible, and nicer would be to make use CEF instead.
This will require you to use HTML, CSS and Javascript as well. But even if you've never done it before, it's not that difficult.

https://wiki.multitheftauto.com/wiki/CEF_Tutorial

 

Otherwise for the dx solution, you will need to compare the position you clicked on with the position of the items, since dxDraw functions don't create elements or anything like that, they just draw a couple lines and such for you.

  • Thanks 1
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...