Jump to content

GuiCreateStaticImage as a button


Recommended Posts

When we move the cursor on the button then the button is highlighted. Is it possible that when the cursor is on the image, with the button as its parent, the button highlights?

e.g

  
button = guiCreateButton(163, 23, 109, 97, "", false) 
image = guiCreateStaticImage(10, 10, 89, 77, "icon/button.png", false, button) 

Link to comment

Something like that if i understand you right..?

  
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        myb = guiCreateButton(690, 400, 100, 100, "?", false)  
        showCursor(true)    
         
        addEventHandler( "onClientMouseEnter", myb, showClientImage, false) 
        addEventHandler( "onClientMouseLeave", myb, dontshowClientImage, false)      
    end 
) 
  
function showClientImage() 
   image = guiCreateStaticImage( 690, 310, 100, 100, "icon/button.png", false )  
end    
  
function dontshowClientImage() 
   guiSetVisible(image, false) 
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...