@name 
@inputs Egp:wirelink
@outputs Pos:vector2 Output
@persist
@trigger 

interval(50)

if (first()) {
    #cursor
Egp:egpBox(1,vec2(0,0),vec2(10,10))

    #Button object
Egp:egpRoundedBox(2,vec2(255,300),vec2(300,100)) 

}

Pos = Egp:egpCursor(owner())
Egp:egpPos(1,Pos)

# checking if the POS is inrange of the object.
if (owner():keyUse()) {
if (inrange(Pos, vec2(105,250) , vec2(405,350))) {
    Output = 1
    Egp:egpColor(2,vec(0,255,0))
} else {
    Output = 0
    Egp:egpColor(2,vec(255,0,0))
}
}
