Zinjaaa Posted August 10, 2013 Share Posted August 10, 2013 Hello I come here for some help, It turns out that I want to make an effect on my button And I have no idea how to do Normal image (Button) Image with effect And the cursor over the button We notice a change if a darker image to a brighter I need some examples taken from wikipedia Link to comment
Castillo Posted August 10, 2013 Share Posted August 10, 2013 onClientMouseEnter onClientMouseLeave guiStaticImageLoadImage Link to comment
Zinjaaa Posted August 10, 2013 Author Share Posted August 10, 2013 onClientMouseEnteronClientMouseLeave guiStaticImageLoadImage I really need an example, Since wikipedia does not help me sorry for my ignorance :>> Link to comment
Castillo Posted August 10, 2013 Share Posted August 10, 2013 It does help, but you must be willing to read and learn. Link to comment
Zinjaaa Posted August 10, 2013 Author Share Posted August 10, 2013 It does help, but you must be willing to read and learn. Well if you are not able to do a very basic example is not necessary to speak on this topic I really do not know much about why I prefer wikipedia desire some examples created by itself (I understand that I am a novice but gradually learn) Link to comment
Castillo Posted August 10, 2013 Share Posted August 10, 2013 The links I gave you got examples, you obviously didn't even open them, what you want is to get it done. Link to comment
Zinjaaa Posted August 10, 2013 Author Share Posted August 10, 2013 I really do not ask for the script I do not know if it would be too much to ask an example ''Created by itself" Link to comment
manve1 Posted August 10, 2013 Share Posted August 10, 2013 Click on the link Solidsnake14 gave you, there are examples ... Link to comment
Vector Posted August 10, 2013 Share Posted August 10, 2013 1ºst way: create two different images and use guiStaticImageLoadImage when "onClientMouseEnter", "onClientMouseLeave" events are fired. -> bad way. client need to download 2 images from server. 2ºnd way: change the static image CEGUI property "ImageColours" to make the image a bit darker or brighter, when "onClientMouseEnter", "onClientMouseLeave" events are fired. ---> try this --> function blendStaticImageWithColor(guiStaticImage, r,g,b) local __hex = string.format("%X%X%X",r,g,b); guiSetProperty(guiStaticImage, "ImageColours", "tl:" .. __hex .. " tr:" .. __hex .. " bl:" .. __hex .. " br:" .. __hex); end; function make_it_darker(guiStaticImage) blendStaticImageWithColor(guiStaticImage, 155, 155, 155); end; function make_it_brighter(guiStaticImage) blendStaticImageWithColor(guiStaticImage, 255,255,255); end; addEventHandler("onClientMouseEnter", getRootElement(), function() -- just for static-images. if getElementType(source) ~= "gui-staticimage" then return; end; -- make the static image brighter. make_it_brighter(source); end); addEventHandler("onClientMouseLeave", getRootElement(), function() -- just for static-images. if getElementType(source) ~= "gui-staticimage" then return; end; -- make the static image darker. make_it_darker(source); end); Link to comment
Zinjaaa Posted August 10, 2013 Author Share Posted August 10, 2013 Thanks Friend, People like you there few Link to comment
Castillo Posted August 10, 2013 Share Posted August 10, 2013 Exactly what I said, you just wanted it done. Link to comment
Vector Posted August 10, 2013 Share Posted August 10, 2013 yes, you need to read all the answers, search, and do it by yourself. dont´t expect other will do your homework. Link to comment
tosfera Posted August 10, 2013 Share Posted August 10, 2013 yes, you need to read all the answers, search, and do it by yourself. dont´t expect other will do your homework. then why did you do it? Its oke to give people a script but dont make it fully working. Make a start, like someone wants a command to give players cash? Oke, sure. Give them something like this; addCommandHandler("giveMoney", function ( source, command, amount ) -- source = the player -- command = the command that has been triggered (giveMoney) -- amount = the amount of money -- check if it are numbers with; tonumber -- check if the player has money with; getPlayerMoney() -- give out the money and remove the amount of money takePlayerMoney() givePlayerMoney() end ); they would learn alot more then just getting scripts, turning them on and taking all the credits for it. ( and yes, thats out of experience. I also learned it that way! ) Link to comment
Zinjaaa Posted August 10, 2013 Author Share Posted August 10, 2013 At Last someone who understands me :.)) 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