public void ProgressBarDlg() { gui.InitDialog(false, false); int W = D3DDevice.Instance.Width; int H = D3DDevice.Instance.Height; int x0 = -20; int y0 = 100; int dy = 350; int dx = W + 50; GUIItem 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 = D3DDevice.Instance.Device; 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: " + MediaDir + "Texturas\\f1\\f1piso2.png"; Texture textura_piso = Texture.FromBitmap(d3dDevice, (Bitmap)Bitmap.FromFile(MediaDir + "Texturas\\f1\\f1piso2.png"), Usage.None, Pool.Managed); textura_piso.Dispose(); MessageLoop(); } gui.EndDialog(); // progress bar dialog }