Gravestone Posted May 12, 2016 Share Posted May 12, 2016 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
swedishboy Posted May 12, 2016 Share Posted May 12, 2016 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
Gravestone Posted May 13, 2016 Author Share Posted May 13, 2016 This code will show the image only at the time when the cursor is on the button. I want the image to be shown all the time. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now