Jump to content

dxDrawRectangle Click Help Bug.


XeRo

Recommended Posts

Hi Guys. DxDrawRectangle Click Function Pls Fix.???

    function Button() 
        dxDrawRectangle(screenW * 0.1875, screenH * 0.6267, screenW * 0.7025, screenH * 0.0233, tocolor(9, 72, 199, 255), false) 
        dxDrawText("Click to Info", (screenW * 0.3700) + 1, (screenH * 0.6267) + 1, (screenW * 0.7063) + 1, (screenH * 0.6500) + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Click to Info", screenW * 0.3700, screenH * 0.6267, screenW * 0.7063, screenH * 0.6500, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
    end 
  
    addEventHandler ( "onClientClick", root, function () 
        if source == Button then 
addEventHandler("onClientRender",root, Aresa)    
        end 
        end) 
         
     
        function Aresa() 
        dxDrawRectangle(screenW * 0.1363, screenH * 0.6550, screenW * 0.8087, screenH * 0.1933, tocolor(0, 0, 0, 138), false) 
        dxDrawText("Area: ", screenW * 0.1487, screenH * 0.6933, screenW * 0.9400, screenH * 0.7217, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, true, false, true, false) 
        dxDrawText("Secret:", screenW * 0.1487, screenH * 0.7383, screenW * 0.9400, screenH * 0.7667, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, true, false, true, false) 
    end 

Link to comment

Wtf, stop bumping the topic after 1 hour...

addEventHandler("onClientClick", root, 
    function(button, state, x, y) 
        if button == "left" and state == "down" then 
            if x >= screenW * 0.1875 and y >= screenH * 0.6267 and x <= screenW * 0.1875+screenW * 0.7025 and y <= screenH * 0.6267+screenH * 0.0233 then 
                -- Do something... 
            end 
        end 
    end 
) 

Link to comment

don't work.

Wtf, stop bumping the topic after 1 hour...
addEventHandler("onClientClick", root, 
    function(button, state, x, y) 
        if button == "left" and state == "down" then 
            if x >= screenW * 0.1875 and y >= screenH * 0.6267 and x <= screenW * 0.1875+screenW * 0.7025 and y <= screenH * 0.6267+screenH * 0.0233 then 
                -- Do something... 
            end 
        end 
    end 
) 

    function Button() 
        dxDrawRectangle(screenW * 0.1875, screenH * 0.6267, screenW * 0.7025, screenH * 0.0233, tocolor(9, 72, 199, 255), false) 
        dxDrawText("Click to Info", (screenW * 0.3700) + 1, (screenH * 0.6267) + 1, (screenW * 0.7063) + 1, (screenH * 0.6500) + 1, tocolor(0, 0, 0, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
        dxDrawText("Click to Info", screenW * 0.3700, screenH * 0.6267, screenW * 0.7063, screenH * 0.6500, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, true, false) 
    end 
  
    addEventHandler("onClientClick", root, 
        function(Button, state, x, y) 
            if Button == "left" and state == "down" then 
                if x >= screenW * 0.1875 and y >= screenH * 0.6267 and x <= screenW * 0.1875+screenW * 0.7025 and y <= screenH * 0.6267+screenH * 0.0233 then 
                end 
            end 
        end 
    ) 

Link to comment

*facepalm* What do you expect it to do?

if x >= screenW * 0.1875 and y >= screenH * 0.6267 and x <= screenW * 0.1875+screenW * 0.7025 and y <= screenH * 0.6267+screenH * 0.0233 then 
    -- Write whatever you want to do here!!! 
end 

Link to comment
*facepalm* What do you expect it to do?
if x >= screenW * 0.1875 and y >= screenH * 0.6267 and x <= screenW * 0.1875+screenW * 0.7025 and y <= screenH * 0.6267+screenH * 0.0233 then 
    -- Write whatever you want to do here!!! 
end 

Click work ??

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...