Jump to content

onClientMouseEnter : bad triggering


_Kinan

Recommended Posts

Hi, I added an event handler to my static image. but when I actually 
 

See the gif
5OFDYkJ.gif

code : 


login = {
    label = {},
    staticimage = {},
    edit = {}
}
login.staticimage[1] = guiCreateStaticImage(557, 336, 400, 404, "imgs/window.png", false)

login.staticimage[2] = guiCreateStaticImage(191, 314, 185, 57, "imgs/register.png", false, login.staticimage[1])
login.staticimage[3] = guiCreateStaticImage(14, 308, 167, 73, "imgs/login.png", false, login.staticimage[1])

---- EVENT : 
addEventHandler("onClientMouseEnter",login.staticimage[2],function()
	guiSetAlpha(login.staticimage[2],0.8)
		outputChatBox("trigger in")

end)
addEventHandler("onClientMouseLeave",login.staticimage[2],function()
	guiSetAlpha(login.staticimage[2],0.2)
	outputChatBox("trigger left")
end)
guiSetAlpha(login.staticimage[2],0.2)

 

Link to comment
  • Moderators

https://wiki.multitheftauto.com/wiki/AddEventHandler

Optional Arguments

    getPropagated: A boolean representing whether the handler will be triggered if the event was propagated down or up the element tree (starting from the source), and not triggered directly on attachedTo (that is, handlers attached with this argument set to false will only be triggered if source == this).

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