Jump to content

[FUNCION] dxDrawOutlinedRectangle


Recommended Posts

Posted

Esta función lo que hace es crear un rectangulo con bordes ( Tal como lo hace el guieditor al marcar la opcion outlined )

function dxDrawOutlinedRectangle( posX, posY, WidX, WidY, cLine, cRectangle, postGui )
    local AX1 = posX - 1
    local AY1 = posY - 1
    local WX1 = posX + WidX
    local HY1 = posY + WidY
    dxDrawLine(AX1, AY1, AX1, HY1, ( cLine or tocolor(0, 0, 0, 255) ), 1, ( postGui or false ) )
    dxDrawLine(WX1, AY1, AX1, AY1, ( cLine or tocolor(0, 0, 0, 255) ), 1, ( postGui or false ) )
    dxDrawLine(AX1, HY1, WX1, HY1, ( cLine or tocolor(0, 0, 0, 255) ), 1, ( postGui or false ) )
    dxDrawLine(WX1, HY1, WX1, AY1, ( cLine or tocolor(0, 0, 0, 255) ), 1, ( postGui or false ) )
    dxDrawRectangle(posX, posY, WidX, WidY, ( cRectangle or tocolor(0, 0, 0, 255) ), ( postGui or false ) )
end


--cLine este seria el color que tendria los bordes
--cRectangle y este el color que tendria el rectangulo

--Ejemplo

dxDrawOutlinedRectangle( 20, 100, 50, 50, tocolor(0, 0, 0, 255), tocolor(99, 99, 99, 255) )

 

Espero te sirva.

Leal es quien te ama y respeta tus sentimientos

Paid Scripter, Contact me: https://www.facebook.com/rexscripting/  Estoy retirado.

  • MTA Team
Posted

Genial, podrías agregarla a la wiki en el apartado de funciones útiles.

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted (edited)
1 hour ago, Simple01 said:

El GUIEDITOR de por si ya trae esta función que es igual vamos... Pero igual, gracias por aportar tus conocimientos a la comunidad.

Mi función, funciona igual pero se entiende mejor que la de la wiki.

Edited by -Rex-

Leal es quien te ama y respeta tus sentimientos

Paid Scripter, Contact me: https://www.facebook.com/rexscripting/  Estoy retirado.

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