ME3Explorer.SequenceObjects.SVar.SVar C# (CSharp) Method

SVar() public method

public SVar ( int idx, float x, float y, IMEPackage p, GraphEditor grapheditor ) : System
idx int
x float
y float
p IMEPackage
grapheditor UMD.HCIL.GraphEditor.GraphEditor
return System
        public SVar(int idx, float x, float y, IMEPackage p, GraphEditor grapheditor)
            : base(idx, p, grapheditor)
        {
            string s = export.ObjectName;
            s = s.Replace("BioSeqVar_", "");
            s = s.Replace("SFXSeqVar_", "");
            s = s.Replace("SeqVar_", "");
            type = getType(s);
            float w = 60;
            float h = 60;
            shape = PPath.CreateEllipse(0, 0, w, h);
            outlinePen = new Pen(getColor(type));
            shape.Pen = outlinePen;
            shape.Brush = nodeBrush;
            shape.Pickable = false;
            this.AddChild(shape);
            this.Bounds = new RectangleF(0, 0, w, h);
            val = new SText(GetValue());
            val.Pickable = false;
            val.TextAlignment = StringAlignment.Center;
            val.X = w / 2 - val.Width / 2;
            val.Y = h / 2 - val.Height / 2;
            this.AddChild(val);
            var props = export.GetProperties();
            foreach (var prop in props)
            {
                if (prop.Name == "VarName" || prop.Name == "varName")
                {
                    SText VarName = new SText((prop as NameProperty).Value, Color.Red, false);
                    VarName.Pickable = false;
                    VarName.TextAlignment = StringAlignment.Center;
                    VarName.X = w / 2 - VarName.Width / 2;
                    VarName.Y = h;
                    this.AddChild(VarName);
                    break;
                }
            }
            this.TranslateBy(x, y);
            this.MouseEnter += OnMouseEnter;
            this.MouseLeave += OnMouseLeave;
        }