Jump to content

onClientMouseEnter/Leave


Recommended Posts

This code seems not working for me:

  
function images() 
    loginButton = guiCreateStaticImage(x/1.55,y/1.6,200/5,200/5,login,false) 
    userIcon = guiCreateStaticImage( x/5,y/3,256,256, user,false) 
end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource() ), images ) 
  
addEventHandler("onClientMouseEnter", root, 
function(x,y) 
    if (source == userIcon) then 
        guiSetAlpha(source,150) 
    end 
end 
) 
  
addEventHandler("onClientMouseLeave", root, 
function(x,y) 
    if (source == userIcon) then 
        guiSetAlpha(source,255) 
    end 
end 
) 
  
  

Yes, images are rendered from an event on other place in full code

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