function isMouseInPosition ( x, y, width, height )
if ( not isCursorShowing( ) ) then
return false
end
local sx, sy = guiGetScreenSize ( )
local cx, cy = getCursorPosition ( )
local cx, cy = ( cx * sx ), ( cy * sy )
return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) )
end
------------
color = tocolor(0, 0, 0, 180) --Here is the color of the button I made
------------
dxDrawRectangle(sx*.40, sy*.47, sx*.06, sy*.05, color1 or color, false) --gombl
------------
if isMouseInPosition(sx*.40, sy*.47, sx*.06, sy*.05) then
color1 = tocolor(88, 0, 0, 50) --And here you put any color when the mouse touches the button, a color appears
else
color1 = color
end
try this