Mefisto_PL Posted April 6, 2014 Posted April 6, 2014 (edited) My function should change colors in my buttons and it's working.. but I add event that when mouse leave from this button then colors should be changed again and now when I move cursor up then simple change colors, but when I move cursor down, left, right it isn't changed.. function spawnMenuInit ( ) if source == ls_bg then guiLabelSetColor ( ls_label, 255, 255, 255 ) guiSetProperty ( ls_bg, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000" ) elseif source == sf_bg then guiLabelSetColor ( sf_label, 255, 255, 255 ) guiSetProperty ( sf_bg, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000" ) elseif source == lv_bg then guiLabelSetColor ( lv_label, 255, 255, 255 ) guiSetProperty ( lv_bg, "ImageColours", "tl:FF000000 tr:FF000000 bl:FF000000 br:FF000000" ) end end addEventHandler( "onClientMouseEnter", getRootElement(), spawnMenuInit ) function spawnMenuLeave ( ) if source == ls_bg then guiLabelSetColor ( ls_label, 155, 155, 155 ) guiSetProperty ( ls_bg, "ImageColours", "tl:CC000000 tr:CC000000 bl:AA000000 br:AA000000" ) elseif source == sf_bg then guiLabelSetColor ( sf_label, 155, 155, 155 ) guiSetProperty ( sf_bg, "ImageColours", "tl:AA000000 tr:AA000000 bl:AA000000 br:AA000000" ) elseif source == lv_bg then guiLabelSetColor ( lv_label, 155, 155, 155 ) guiSetProperty ( lv_bg, "ImageColours", "tl:AA000000 tr:AA000000 bl:CC000000 br:CC000000" ) end end addEventHandler( "onClientMouseLeave", getRootElement(), spawnMenuLeave ) Edited April 6, 2014 by Guest
monumento Posted April 6, 2014 Posted April 6, 2014 What's your res? //czyzbys robil swojego erpega czy tam playa?
Dzsozi (h03) Posted April 7, 2014 Posted April 7, 2014 Can anybody help me? .. Please.. Where is the lv, ls and sf_bg defined?
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