func Set(int x1,int y1,int x2,int y2,int clr) { SetVertexXY(0, x1, y1); SetVertexXY(1, x2, y2); this.LineColors = [clr, clr]; return; }
protected func Initialize() { SetAction("Connect"); SetVertexXY(0, GetX(), GetY()); SetVertexXY(1, GetX(), GetY()); SetPosition(0, 0); }
func Init(to, max, cur, timeout, offset, visibility, proplist data) { maximum = max; current = cur; timeout_time = timeout; width = data.width ?? 40; height = data.height ?? 5; if(timeout_time) { var e = AddEffect("TimeOut", this, 1, BoundBy(timeout_time/2, 5, 35), this); e.t = timeout_time; } this.Visibility = visibility; SetGraphics(nil, GetID(), 1, GFXOV_MODE_Base, nil, GFX_BLIT_Custom); SetBarColor(data.color, data.back_color); SetAction("Attach", to); SetVertexXY(0, -offset.x, -offset.y); AddEffect("LifeCheck", to, 1, 0, this); Update(); }
func SetBottom2(object host) { SetGraphics("Bottom"); SetAction("Bottom", host); SetShape(0,0,32,4); SetPosition(host->GetX()+13, host->GetY()+12); SetSolidMask(0,0,32,4); SetVertexXY(0,1-29,-27); return true; }
func SetLeft(object host) { SetGraphics("Left"); SetAction("Left", host); SetShape(0,0,4,32); SetPosition(host->GetX()-16, host->GetY()-16); SetSolidMask(0,0,2,32); SetVertexXY(0,1,1); return true; }
func SetTop(object host) { SetGraphics("Top"); SetAction("Top", host); SetShape(0,0,32,4); SetPosition(host->GetX()-16, host->GetY()-16); SetSolidMask(0,0,32,4); SetVertexXY(0,1,1); return true; }
func SetRight2(object host) { SetGraphics("Right"); SetAction("Right", host); SetShape(0,0,4,32); SetPosition(host->GetX()+15, host->GetY()-48); SetSolidMask(0,0,2,32,2,0); SetVertexXY(0,-27-3,1+32); return true; }
func MakeReady(pClonk) { pClonk->SetAction("HangReady", this); SetVertexXY(0,7,1); SetAction("Closed"); }
func DoHang(pClonk) { pClonk->SetAction("Hang", this); SetVertexXY(0,6,4); SetAction("Open"); }