ivor Posted March 31, 2016 Posted March 31, 2016 hi all today i want to ask all I Create Dx Rectangle i want change him to a button how !! with example please first post in English Forum
ivor Posted March 31, 2016 Author Posted March 31, 2016 for easy i want create a dx button in dx panel or gui panel
Seba500PLK Posted April 10, 2016 Posted April 10, 2016 function isMouseWithinRangeOf(psx,psy,pssx,pssy) if not isCursorShowing() then return false end local cx,cy = getCursorPosition() cx,cy = cx*x,cy*y if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then return true,cx,cy else return false end end function dx() dxDrawRectangle (0, 0, 100, 50, tocolor ( 195, 195, 195, 50 ) ) dxDrawText ("#B01010CLICK!",0, 0, 100, 50, tocolor(195, 195, 195, 255), 15, "default", "center", "center", false, false, true, true) CursorInButton = isMouseWithinRangeOf(0, 0, 100, 50) if CursorInButton then dxDrawRectangle (0, 0, 100, 50, tocolor ( 195, 195, 195, 100 ) ) end end addEventHandler("onClientRender", root, dx) function click(theButton, press) if theButton == "mouse1" and press == true then if CursorInButton then outputChatBox("wow") end end end addEventHandler("onClientKey", root, click)
OnlineCheater Posted April 10, 2016 Posted April 10, 2016 Easiest way would be to draw your rectangle and add a gui button above with guiSetAlpha(theButton, 0) [list]GuiCreateButton GuiSetAlpha[/list]
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