KraZ Posted December 8, 2012 Share Posted December 8, 2012 How would i use the onClientMouseEnter client event, so when your cursor is over a dx text or image it will display a different image or text or change the colour of text, And also how would i use a dxText/image as a button, Could someone post some source code so I can see how its done or can someone help me? onClientGUIClick onClientMouseEnter onClientMouseLeave Link to comment
HunT Posted December 8, 2012 Share Posted December 8, 2012 Example : myLabel = guiCreateLabel guiSetVisible (myLabel,false) function onGuiMouse (button, state, absoluteX, absoluteY) if (source == myLable) then guiSetVisible (myLabel,true) -- elseif for other element Example elseif (source == otherLabel) then -- here end end addEventHandler ("onClientMouseEnter", getRootElement(), onGuiMouse) function onGuiLeave (button, state, absoluteX, absoluteY) if (source == myLabel) then guiSetVisible (myLabel,false) -- elseif for other element Example elseif (source == otherLabel) then -- here end end addEventHandler ("onClientMouseLeave", getRootElement(), onGuiLeave) Link to comment
Castillo Posted December 8, 2012 Share Posted December 8, 2012 He's asking for DirectX ( DX ), not GUI. @KraZ: You can calculate the cursor position: getCursorPosition 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