dugasz1 Posted June 6, 2013 Share Posted June 6, 2013 Hello! I wanna make my own inventory system but i get a little problem. I wanna you can move you items, when your state "down" you pick up the item and draging it and when the state is "up" you put it a slot or drop it. The problem is i want to make it whit addEventHandler ( "onClientGUIClick", getRootElement(), addLabelOnClick ) event but the wiki write this Please note currently only the up state is supported. and my plane is failed. I thinking about addEventHandler ( "onClientClick", getRootElement(), addLabelOnClick ) event but whit it i can't call whit "source" the gui (all slot is a guiImage and set a number in it for all slots whit setElementData to i can reference it) Any idea how i can made it? Link to comment
Castillo Posted June 6, 2013 Share Posted June 6, 2013 Maybe you can combine it with onClientGUIMouseEnter/Leave. Link to comment
dugasz1 Posted June 7, 2013 Author Share Posted June 7, 2013 Whit onClientMouseEnter i know which gui he entered but how can i check his clicked? Can you write me an example? Link to comment
rain_gloom Posted June 7, 2013 Share Posted June 7, 2013 If dragging is not that important you could just use the "up" state, so one click picks the item up and another puts it down. Link to comment
dugasz1 Posted June 7, 2013 Author Share Posted June 7, 2013 yeah, i think about this but i hope it to i can make it whit down and up click Link to comment
denny199 Posted June 7, 2013 Share Posted June 7, 2013 use getKeyState : https://wiki.multitheftauto.com/wiki/GetKeyState with onClientRender for GUI's use guiSetPosition and getCursorPosition for DX drawing use variables and getCursorPosition 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