Jump to content

Weird Cursor Problem o.O HELP PLEASE


Recommended Posts

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 by Guest
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...