public PolymodelPreviewer(Polymodel model, StandardUI host) { InitializeComponent(); //moo this.glControl1 = new GLControl(); this.glControl1.BackColor = System.Drawing.Color.Black; this.glControl1.Location = new System.Drawing.Point(63, 12); this.glControl1.Name = "glControl1"; this.glControl1.Size = new System.Drawing.Size(384, 384); this.glControl1.TabIndex = 3; this.glControl1.VSync = false; this.glControl1.Load += new System.EventHandler(this.glControl1_Load); this.glControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint); glControl1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; this.Controls.Add(glControl1); this.PerformLayout(); this.model = model; if (this.model.IsAnimated) { numericUpDown1.Minimum = 0; numericUpDown1.Maximum = Robot.NumAnimationStates - 1; } else { numericUpDown1.Enabled = false; chkAnimation.Enabled = false; } this.host = host; this.renderer = new ModelRenderer(host.DefaultPigFile, host.DefaultPalette); }
public HXMEditor(EditorHXMFile datafile, StandardUI host, SaveHandler saveHandler) { InitializeComponent(); robotPanel = new EditorPanels.RobotPanel(transactionManager, 0); robotPanel.Dock = DockStyle.Fill; RobotTabPage.Controls.Add(robotPanel); components.Add(robotPanel); polymodelPanel = new EditorPanels.PolymodelPanel(transactionManager, 1, host.DefaultPigFile, host.DefaultPalette, datafile); polymodelPanel.Dock = DockStyle.Fill; ModelTabPage.Controls.Add(polymodelPanel); components.Add(polymodelPanel); this.datafile = datafile; this.host = host; palette = host.DefaultPalette; modelRenderer = new ModelRenderer(datafile.BaseHAM, host.DefaultPigFile, palette); string currentFilename = "Untitled"; if (saveHandler != null) { currentFilename = saveHandler.GetUIName(); } this.saveHandler = saveHandler; this.Text = string.Format("{0} - HXM Editor", currentFilename); transactionManager.undoEvent += DoUndoEvent; }
public VHAMEditor(EditorVHAMFile data, StandardUI host) { InitializeComponent(); this.glControl1 = new OpenTK.GLControl(); this.glControl1.BackColor = System.Drawing.Color.Black; this.glControl1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.glControl1.Location = new System.Drawing.Point(452, 61); this.glControl1.Name = "glControl1"; this.glControl1.Size = new System.Drawing.Size(256, 256); this.glControl1.TabIndex = 0; this.glControl1.VSync = false; this.glControl1.Load += new System.EventHandler(this.glControl1_Load); this.glControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint); robotPanel = new RobotPanel(); robotPanel.Dock = DockStyle.Fill; weaponPanel = new WeaponPanel(); weaponPanel.Dock = DockStyle.Fill; components.Add(robotPanel); components.Add(weaponPanel); components.Add(glControl1); RobotTabPage.Controls.Add(robotPanel); WeaponTabPage.Controls.Add(weaponPanel); if (!noPMView) { this.tabPage3.Controls.Add(this.glControl1); } datafile = data; this.host = host; palette = host.DefaultPalette; modelRenderer = new ModelRenderer(datafile.BaseHAM, datafile.BaseHAM.piggyFile, palette); }
public HXMEditor(EditorHXMFile datafile, StandardUI host, string filename) { InitializeComponent(); //can't use GLControls with designer? eh? glControl1 = new GLControl(); glControl1.Location = new System.Drawing.Point(pictureBox3.Location.X, pictureBox3.Location.Y); glControl1.Size = pictureBox3.Size; glControl1.Load += glControl1_Load; glControl1.Paint += glControl1_Paint; glControl1.Visible = true; glControl1.Enabled = true; tabPage7.Controls.Add(glControl1); tabPage7.PerformLayout(); pictureBox3.Enabled = false; pictureBox3.Visible = false; robotPanel = new EditorPanels.RobotPanel(); robotPanel.Dock = DockStyle.Fill; RobotTabPage.Controls.Add(robotPanel); components.Add(robotPanel); this.datafile = datafile; this.host = host; palette = host.DefaultPalette; modelRenderer = new ModelRenderer(datafile.BaseHAM, host.DefaultPigFile, palette); this.Text = string.Format("{0} - HXM Editor", currentFilename); }
public HAMEditor(EditorHAMFile data, StandardUI host, PIGFile piggyFile, Palette palette, string filename) { InitializeComponent(); this.glControl1 = new OpenTK.GLControl(); this.glControl1.BackColor = System.Drawing.Color.Black; this.glControl1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.glControl1.Location = new System.Drawing.Point(452, 61); this.glControl1.Name = "glControl1"; this.glControl1.Size = new System.Drawing.Size(256, 256); this.glControl1.TabIndex = 0; this.glControl1.VSync = false; this.glControl1.Load += new System.EventHandler(this.glControl1_Load); this.glControl1.Paint += new System.Windows.Forms.PaintEventHandler(this.glControl1_Paint); texturePanel = new TMAPInfoPanel(transactionManager); components.Add(texturePanel); texturePanel.Dock = DockStyle.Fill; vclipPanel = new VClipPanel(transactionManager); components.Add(vclipPanel); vclipPanel.Dock = DockStyle.Fill; eclipPanel = new EClipPanel(transactionManager); components.Add(eclipPanel); eclipPanel.Dock = DockStyle.Fill; wclipPanel = new WClipPanel(transactionManager); components.Add(wclipPanel); wclipPanel.Dock = DockStyle.Fill; robotPanel = new RobotPanel(); components.Add(robotPanel); robotPanel.Dock = DockStyle.Fill; weaponPanel = new WeaponPanel(); components.Add(weaponPanel); weaponPanel.Dock = DockStyle.Fill; TextureTabPage.Controls.Add(texturePanel); VClipTabPage.Controls.Add(vclipPanel); EffectsTabPage.Controls.Add(eclipPanel); DoorTabPage.Controls.Add(wclipPanel); RobotTabPage.Controls.Add(robotPanel); WeaponTabPage.Controls.Add(weaponPanel); this.palette = palette; this.piggyFile = piggyFile; if (!noPMView) { this.ModelTabPage.Controls.Add(this.glControl1); } datafile = data; this.host = host; modelRenderer = new ModelRenderer(datafile, piggyFile, palette); currentFilename = filename; this.Text = string.Format("{0} - HAM Editor", currentFilename); transactionManager.undoEvent += DoUndoEvent; }