PHP-Code:
@name EGP_SB
@inputs EGP:wirelink A Amax Aname:string INPUTA
@persist Space I
interval(200)
if(Amax==0 & I<=50 | first())
{
while(I<=50){
EGP:egpRemove(I)
I++
Space=50
}
}
if(Amax!=0)
{
if(Aname==""){Aname="Value A"}
PCA=round((100/Amax)*A,3)
ColorA=hsv2rgb(vec((120/100)*PCA,1,1))
EGP:egpBox(1,1,1,512,512,255,255,255,50)
EGP:egpBoxoutline(2,vec2(60,100),vec2(360,27),vec4(255,255,255,255))
EGP:egpText(3,toString(PCA)+"%",vec2(335,80),ColorA,255)
EGP:egpText(4,toString(INPUTA),vec2(250,80),ColorA,255)
EGP:egpText(5,Aname,vec2(60,80),vec4(255,255,255,255))
EGP:egpBox(6,vec2(61,101),vec2((358/Amax)*A,25),ColorA,255) #(Gesammtlnge durch Max) * Momentan
EGP:egpSetFont(3,"lucida console",15)
EGP:egpSetFont(4,"lucida console",15)
EGP:egpSetFont(5,"lucida console",15)
}
EGP:egpText(40,"EGP: Life Support Percent Bars",20,0,255,255,255,125)
EGP:egpSetFont(40,"lucida console",25)
EGP:egpDraw()
#http://www.abload.de/img/unbenannt-1irg7.jpg