..:D&G:.. Posted May 1, 2014 Share 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]) Link to comment
Martyz Posted May 1, 2014 Share 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 ) Link to comment
..:D&G:.. Posted May 2, 2014 Author Share Posted May 2, 2014 Thanks. Now how do I make it so its sets another color when the mouse is over the text? Link to comment
toxicsmoke11 Posted May 2, 2014 Share Posted May 2, 2014 onClientMouseEnter and onClientMouseLeave use this events 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