..:D&G:.. Posted May 1, 2014 Posted May 1, 2014 Hello, I am creating a gui, and I want to use text instead of buttons. I want to change the color of the text when its beeing clicked. Here is the "button": GUIEditor.label[2] = guiCreateLabel(30, 45, 88, 22, "Stay", false, GUIEditor.staticimage[1])
Martyz Posted May 1, 2014 Posted May 1, 2014 addEventHandler('onClientGUIClick', getRootElement(), function(button, state, absoluteX, absoluteY) if(source == GUIEditor.label[2]) if(button == 'left') then if(state == 'down') then guiLabelSetColor(source, red, green, blue) -- set your color when mouse is pushed elseif(state == 'up') then guiLabelSetColor(source, red, green, blue) -- set your color when mouse is released end end end end )
..:D&G:.. Posted May 2, 2014 Author Posted May 2, 2014 Thanks. Now how do I make it so its sets another color when the mouse is over the text?
toxicsmoke11 Posted May 2, 2014 Posted May 2, 2014 onClientMouseEnter and onClientMouseLeave use this events
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