Esempio n. 1
0
        public UIForm Set(int x, int y, int w, int h, string text = "")
        {
            if (WhiteTex == null)
            {
                WhiteTex   = new Texture2D("data/ui/whitetex.png", LoadMethod.Single, true);
                WhiteTex2D = new Tex.Tex2D("data/ui/whitetex.png", false);
            }
            X = x;
            Y = y;
            W = w;
            H = h;



            Text = text;
            Changed?.Invoke();
            if (!designed)
            {
                designed = true;
                DesignUI();
            }
            AfterSet?.Invoke();
            // FormFB = new FrameBuffer.FrameBufferColor(W, H);
            Resize();
            return(this);
        }
Esempio n. 2
0
        public Vivid.Tex.Tex2D ToTex2D()
        {
            var nt = new Vivid.Tex.Tex2D();

            nt.ID      = ID;
            nt.Width   = W;
            nt.Height  = H;
            nt.Path    = Path;
            nt.RawData = RawData;
            nt.Alpha   = Alpha;
            return(nt);
        }
 public BigShotProjector()
 {
     Name           = "Big Shot";
     HudImg         = new Vivid.Texture.Texture2D("Corona/img/icon/bigshoticon.png", Vivid.Texture.LoadMethod.Single, true);
     Img            = new Vivid.Tex.Tex2D("Corona/img/icon/bigshoticon.png", true);
     ImgFrame       = Img;
     Light1         = new Vivid.Scene.GraphLight();
     Light1.X       = X;
     Light1.Y       = Y;
     Light1.Range   = 300;
     Light1.Diffuse = new OpenTK.Vector3(0, 0.4f, 0.4f);
 }
Esempio n. 4
0
        public override Vivid.Tex.Tex2D Process(Vivid.Tex.Tex2D img)
        {
            if (White == null)
            {
                White = new Tex.Tex2D("Corona/Img/fx/vrgrid1.png", true);
            }
            Vivid.Draw.Render.Begin();
            Vivid.Draw.Render.Image(0, 0, App.AppInfo.W, App.AppInfo.H, White);

            FX.Bind();

            Vivid.Draw.Render.End2D();

            FX.Release();
            //return base.Process(img);//

            return(null);
        }
Esempio n. 5
0
 public virtual Vivid.Tex.Tex2D Process(Vivid.Tex.Tex2D img)
 {
     return(null);
 }