Example #1
0
        public void ProgressBarDlg()
        {
            gui.InitDialog(false, false);

            int W  = GuiController.Instance.Panel3d.Width;
            int H  = GuiController.Instance.Panel3d.Height;
            int x0 = -20;
            int y0 = 100;
            int dy = 350;
            int dx = W + 50;

            gui_item frame = gui.InsertFrame("Cargando mision", x0, y0, dx, dy, Color.FromArgb(240, 240, 240), frameBorder.sin_borde);

            frame.c_font = Color.FromArgb(0, 0, 0);
            progress_bar = gui.InsertProgressBar(ID_PROGRESS1, 50, y0 + 150, W - 100, 60);

            Device d3dDevice     = GuiController.Instance.D3dDevice;
            int    cant_textures = 5;

            progress_bar.SetRange(0, cant_textures, "Descargando archivos..");
            progress_bar.SetPos(1);
            for (int i = 0; i < cant_textures; ++i)
            {
                progress_bar.SetPos(i);
                progress_bar.text = "Descargando archivo: " + MyMediaDir + "f1\\piso3.png";

                Texture textura_piso = Texture.FromBitmap(d3dDevice, (Bitmap)Bitmap.FromFile(MyMediaDir + "f1\\piso3.png"), Usage.None, Pool.Managed);
                textura_piso.Dispose();
                MessageLoop();
            }

            gui.EndDialog();            // progress bar dialog
        }
Example #2
0
 public YParser()
 {
     progress_bar = null;
 }