Ejemplo n.º 1
0
        public static MPanel AddPanel(MControl parent, double x, double y, double w, double h, string sName)
        {
            MPanel p = new MPanel(sName);

            p.transform.Position = new Vector3d(x, y, 0);
            //p.transform.Scale = new Vector3d(w, h, 0);
            p.Width  = w;
            p.Height = h;
            if (parent == null)
            {
                _instance.Add(p);
            }
            else
            {
                parent.Add(p);
            }
            return(p);
        }
Ejemplo n.º 2
0
        public static MButton AddButton(MControl parent, double x, double y, double w, double h, string sName, string sText, string sIconPath = "UI\\Art\\button-bg-default.png")
        {
            MButton p = new MButton(sName, sIconPath);

            p.transform.Position = new Vector3d(x, y, 0);
            //p.transform.Scale = new Vector3d(w, h, 0);
            p.Width  = w;
            p.Height = h;
            p.Text   = sText;
            if (parent == null)
            {
                _instance.Add(p);
            }
            else
            {
                parent.Add(p);
            }
            return(p);
        }
Ejemplo n.º 3
0
        public static MText AddText(MControl parent, double x, double y, double w, double h, string sName, string sText)
        {
            MText p = new MText(sName);

            p.transform.Position = new Vector3d(x, y, 0);
            //p.transform.Scale = new Vector3d(w, h, 0);
            p.Width  = w;
            p.Height = h;
            p.Text   = sText;
            if (parent == null)
            {
                _instance.Add(p);
            }
            else
            {
                parent.Add(p);
            }
            return(p);
        }