public void LoadEmitter(PTCL.Emitter Emitter) { IsColorsLoaded = false; ActiveEmitter = Emitter; color0TypeCB.SelectedItem = Emitter.Color0Type; color1TypeCB.SelectedItem = Emitter.Color1Type; alpha0TypeCB.SelectedItem = Emitter.Alpha0Type; alpha1TypeCB.SelectedItem = Emitter.Alpha1Type; LoadColors(Emitter.Color0Array, Emitter.Color0Type, 0); LoadColors(Emitter.Color1Array, Emitter.Color1Type, 1); LoadColors(Emitter.Color0AlphaArray, Emitter.Alpha0Type, 2); LoadColors(Emitter.Color1AlphaArray, Emitter.Alpha1Type, 3); stLabel1.Text = $"Color 0 ({Emitter.Color0KeyCount} Keys)"; stLabel2.Text = $"Color 1 ({Emitter.Color1KeyCount} Keys)"; stLabel3.Text = $"Alpha 0 ({Emitter.Alpha0KeyCount} Keys)"; stLabel4.Text = $"Alpha 1 ({Emitter.Alpha1KeyCount} Keys)"; UpdateColorSelector(Color.Black); IsColorsLoaded = true; Console.WriteLine("DrawableTex " + Emitter.DrawableTex.Count); if (Emitter.DrawableTex.Count <= 0) { return; } emitterTexturePanel1.LoadTextures(Emitter); }
private void LoadColors(PTCL.Emitter Emitter) { IsColorsLoaded = false; color0Index0.BackColor = Emitter.Color0s[0]; color0Index1.BackColor = Emitter.Color0s[1]; color0Index2.BackColor = Emitter.Color0s[2]; color0Index3.BackColor = Emitter.Color0s[3]; color0Index4.BackColor = Emitter.Color0s[4]; color0Index5.BackColor = Emitter.Color0s[5]; color0Index6.BackColor = Emitter.Color0s[6]; color0Index7.BackColor = Emitter.Color0s[7]; color1Index0.BackColor = Emitter.Color1s[0]; color1Index1.BackColor = Emitter.Color1s[1]; color1Index2.BackColor = Emitter.Color1s[2]; color1Index3.BackColor = Emitter.Color1s[3]; color1Index4.BackColor = Emitter.Color1s[4]; color1Index5.BackColor = Emitter.Color1s[5]; color1Index6.BackColor = Emitter.Color1s[6]; color1Index7.BackColor = Emitter.Color1s[7]; color0TB.Text = Utils.ColorToHex(Emitter.Color0s[0]); color0TB2.Text = Utils.ColorToHex(Emitter.Color0s[1]); color0TB3.Text = Utils.ColorToHex(Emitter.Color0s[2]); color0TB4.Text = Utils.ColorToHex(Emitter.Color0s[3]); color0TB5.Text = Utils.ColorToHex(Emitter.Color0s[4]); color0TB6.Text = Utils.ColorToHex(Emitter.Color0s[5]); color0TB7.Text = Utils.ColorToHex(Emitter.Color0s[6]); color0TB8.Text = Utils.ColorToHex(Emitter.Color0s[7]); color1TB.Text = Utils.ColorToHex(Emitter.Color1s[0]); color1TB2.Text = Utils.ColorToHex(Emitter.Color1s[1]); color1TB3.Text = Utils.ColorToHex(Emitter.Color1s[2]); color1TB4.Text = Utils.ColorToHex(Emitter.Color1s[3]); color1TB5.Text = Utils.ColorToHex(Emitter.Color1s[4]); color1TB6.Text = Utils.ColorToHex(Emitter.Color1s[5]); color1TB7.Text = Utils.ColorToHex(Emitter.Color1s[6]); color1TB8.Text = Utils.ColorToHex(Emitter.Color1s[7]); IsColorsLoaded = true; }
public void LoadEmitter(PTCL.Emitter Emitter) { ActiveEmitter = Emitter; Reset(); LoadColors(Emitter); if (Emitter.DrawableTex.Count <= 0) { return; } if (Emitter.DrawableTex[0].MipCount > 0) { pictureBox1.Image = Imaging.GetLoadingImage(); pictureBox1.Image = Emitter.DrawableTex[0].GetBitmap(); TBTexture0.Text = Emitter.DrawableTex[0].Text; } if (Emitter.DrawableTex.Count < 2) { return; } if (Emitter.DrawableTex[1].MipCount > 0) { pictureBox2.Image = Imaging.GetLoadingImage(); pictureBox2.Image = Emitter.DrawableTex[1].GetBitmap(); TBTexture1.Text = Emitter.DrawableTex[1].Text; } if (Emitter.DrawableTex.Count < 3) { return; } if (Emitter.DrawableTex[2].MipCount > 0) { pictureBox3.Image = Imaging.GetLoadingImage(); pictureBox3.Image = Emitter.DrawableTex[2].GetBitmap(); TBTexture2.Text = Emitter.DrawableTex[2].Text; } Thread = new Thread((ThreadStart)(() => { })); try { /* Thread Thread2 = new Thread((ThreadStart)(() => * { * pictureBox2.Image = Imaging.GetLoadingImage(); * pictureBox2.Image = Emitter.DrawableTex[1].GetBitmap(); * })); * Thread Thread3 = new Thread((ThreadStart)(() => * { * pictureBox3.Image = Imaging.GetLoadingImage(); * pictureBox3.Image = Emitter.DrawableTex[2].GetBitmap(); * }));*/ } catch { } }
public void LoadEmitter(PTCL.Emitter Emitter) { ActiveEmitter = Emitter; Reset(); for (int i = 0; i < 8; i++) { } color0Index0.BackColor = Emitter.Color0s[0]; color0Index1.BackColor = Emitter.Color0s[1]; color0Index2.BackColor = Emitter.Color0s[2]; color0Index3.BackColor = Emitter.Color0s[3]; color0Index4.BackColor = Emitter.Color0s[4]; color0Index5.BackColor = Emitter.Color0s[5]; color0Index6.BackColor = Emitter.Color0s[6]; color0Index7.BackColor = Emitter.Color0s[7]; color1Index0.BackColor = Emitter.Color1s[0]; color1Index1.BackColor = Emitter.Color1s[1]; color1Index2.BackColor = Emitter.Color1s[2]; color1Index3.BackColor = Emitter.Color1s[3]; color1Index4.BackColor = Emitter.Color1s[4]; color1Index5.BackColor = Emitter.Color1s[5]; color1Index6.BackColor = Emitter.Color1s[6]; color1Index7.BackColor = Emitter.Color1s[7]; color0TB.Text = Utils.ColorToHex(Emitter.Color0s[0]); color0TB2.Text = Utils.ColorToHex(Emitter.Color0s[1]); color0TB3.Text = Utils.ColorToHex(Emitter.Color0s[2]); color0TB4.Text = Utils.ColorToHex(Emitter.Color0s[3]); color0TB5.Text = Utils.ColorToHex(Emitter.Color0s[4]); color0TB6.Text = Utils.ColorToHex(Emitter.Color0s[5]); color0TB7.Text = Utils.ColorToHex(Emitter.Color0s[6]); color0TB8.Text = Utils.ColorToHex(Emitter.Color0s[7]); color1TB.Text = Utils.ColorToHex(Emitter.Color1s[0]); color1TB2.Text = Utils.ColorToHex(Emitter.Color1s[1]); color1TB3.Text = Utils.ColorToHex(Emitter.Color1s[2]); color1TB4.Text = Utils.ColorToHex(Emitter.Color1s[3]); color1TB5.Text = Utils.ColorToHex(Emitter.Color1s[4]); color1TB6.Text = Utils.ColorToHex(Emitter.Color1s[5]); color1TB7.Text = Utils.ColorToHex(Emitter.Color1s[6]); color1TB8.Text = Utils.ColorToHex(Emitter.Color1s[7]); if (Emitter.DrawableTex.Count <= 0) { return; } if (Emitter.DrawableTex[0].MipCount > 0) { var contextMenuStrip1 = new ContextMenuStrip(); contextMenuStrip1.Items.Add("Replace", null, ReplaceImage0); contextMenuStrip1.Items.Add("Export", null, ExportImage0); pictureBox1.Image = Imaging.GetLoadingImage(); pictureBox1.Image = Emitter.DrawableTex[0].GetBitmap(); pictureBox1.ContextMenuStrip = contextMenuStrip1; TBTexture0.Text = Emitter.DrawableTex[0].Text; } if (Emitter.DrawableTex.Count < 2) { return; } if (Emitter.DrawableTex[1].MipCount > 0) { pictureBox2.Image = Imaging.GetLoadingImage(); pictureBox2.Image = Emitter.DrawableTex[1].GetBitmap(); TBTexture1.Text = Emitter.DrawableTex[1].Text; } if (Emitter.DrawableTex.Count < 3) { return; } if (Emitter.DrawableTex[2].MipCount > 0) { pictureBox3.Image = Imaging.GetLoadingImage(); pictureBox3.Image = Emitter.DrawableTex[2].GetBitmap(); TBTexture2.Text = Emitter.DrawableTex[2].Text; } Thread = new Thread((ThreadStart)(() => { })); try { /* Thread Thread2 = new Thread((ThreadStart)(() => * { * pictureBox2.Image = Imaging.GetLoadingImage(); * pictureBox2.Image = Emitter.DrawableTex[1].GetBitmap(); * })); * Thread Thread3 = new Thread((ThreadStart)(() => * { * pictureBox3.Image = Imaging.GetLoadingImage(); * pictureBox3.Image = Emitter.DrawableTex[2].GetBitmap(); * }));*/ } catch { } }