Jump to content

[help] Click on GUI.window triggers click on all the buttons


monday

Recommended Posts

Is it a bug or that's how it should be? I don't know why but when I click on the window it automatically "clicks" all the buttons inside it. I added event handlers "onClientGUIClick" only for the buttons and left the main window without any functions "onclick"

Link to comment

EXAMPLE:

  
function theFunction() 
gui = guiCreateWindow(float x, float y, float z, "EXAMPLE", false) 
anybutton = guiCreateButton(float x, float y, float z, "CLOSE", false) 
showCursor(true) 
addEventHandler ( "onClientGUIClick", anybutton, close, false) 
end 
addEventHandler ( "onClientResourceStart", resourceRoot, theFunction) 
  
function close() 
guiSetVisible(gui , false) 
showCursor(guiGetVisible(gui)) 
end 
. 

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...