Jump to content

[HELP] DGS System


Recommended Posts

Hi, sorry for bad english.
I have a question about DGS.
I create a window in which I create a button (buttonWindow) and add an event to it, but the function works even if you clicked on the window (wnd).

wnd = dgsCreateWindow (...)
buttonWindow = dgsCreateButton (...,wnd)
addEventHandler ("onDgsMouseClick", buttonWindow, buttonWindowFunction)

function buttonWindowFunction ()
...
end


How can I fix this?
Thank you in advance! :) 

Link to comment
2 hours ago, MRmihailZH said:

Hi, sorry for bad english.
I have a question about DGS.
I create a window in which I create a button (buttonWindow) and add an event to it, but the function works even if you clicked on the window (wnd).


wnd = dgsCreateWindow (...)
buttonWindow = dgsCreateButton (...,wnd)
addEventHandler ("onDgsMouseClick", buttonWindow, buttonWindowFunction)

function buttonWindowFunction ()
...
end


How can I fix this?
Thank you in advance! :) 

 

Didn't understand the code a bit, but try so!
function button()
	buttonWindow = dgsCreateButton()
	addEventHandler("onDgsMouseClick", buttonWindow, buttonWindowFunction)
end
addEventHandler("onClientResourceStart", root, button)

function buttonWindowFunction()
	dgsCreateWindow()
end

 

write the required parameters in parentheses:

https://wiki.multitheftauto.com/wiki/DgsCreateButton

https://wiki.multitheftauto.com/wiki/DgsCreateWindow

Edited by Hugos
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...