botshara Posted October 25, 2017 Share Posted October 25, 2017 (edited) 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 October 25, 2017 by botshara Link to comment
Scripting Moderators thisdp Posted October 25, 2017 Scripting Moderators Share Posted October 25, 2017 (edited) You can use a dx lib instead of MTA's gui. So that you don't need to worry about it. Edited October 25, 2017 by thisdp Link to comment
botshara Posted October 25, 2017 Author Share Posted October 25, 2017 7 hours ago, thisdp said: You can use a dx lib instead of MTA's gui. So that you don't need to worry about it. What do you mean with dx lib? Resource? Link to comment
Ahmed Ly Posted October 25, 2017 Share Posted October 25, 2017 1 hour ago, botshara said: What do you mean with dx lib? Resource? https://wiki.multitheftauto.com/wiki/Dgs https://forum.multitheftauto.com/topic/95964-releasethisdps-dx-gui-system/ 2 Link to comment
NanoBob Posted October 26, 2017 Share Posted October 26, 2017 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. 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now