Msypon Posted July 30, 2012 Share Posted July 30, 2012 What functions do i need to create a button as image? Link to comment
Castillo Posted July 30, 2012 Share Posted July 30, 2012 guiCreateStaticImage guiCreateLabel Link to comment
MarcusJ Posted July 30, 2012 Share Posted July 30, 2012 (edited) myImage = guiCreateStaticImage(100, 100, 100, 100, "path", false) addEventHandler("onClientGUIClick", myImage, function() --your code end) Edited July 30, 2012 by Guest Link to comment
Castillo Posted July 30, 2012 Share Posted July 30, 2012 The event: onClientGUIClick is used for ANY GUI element, not just buttons. Link to comment
Msypon Posted July 31, 2012 Author Share Posted July 31, 2012 Thanks, another question: how to add image on progress bar? Link to comment
Castillo Posted July 31, 2012 Share Posted July 31, 2012 Set the parent of the image to the progress bar. Link to comment
Msypon Posted July 31, 2012 Author Share Posted July 31, 2012 How to do it? I tried with guieditor but i didnt understand Link to comment
Castillo Posted July 31, 2012 Share Posted July 31, 2012 With guieditor is easy, you can just right click on the progress bar and create the image. Link to comment
Tete omar Posted July 31, 2012 Share Posted July 31, 2012 onClientGUIClick event is on all GUI elements even the image, not only the button, and here's how to make an image with guieditor 1- your image must be PNG 2- put your image into guieditor.zip / images 3- go to meta.xml into the zip file 4- and do like this "images/imageName.PNG"/> put this code down here if you're a new guieditor user "images/shruk.png"/> for sure onClientGUIClick event is on all GUI elements even the image, not only the button, example : local myImage = guiCreateStaticImage(240,20,229,261,"Msypon.PNG",false) -- create the image function Msypon() outputChatBox(" Msypon Msypon Msypon") -- out put to chat box this message end addEventHandler("onClientGUIClick", myImage, Msypon) -- when you click on the picture then the function will work. check it out for your self good luck 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