public HAMEditor(EditorHAMFile data, StandardUI host, PIGFile piggyFile, Palette palette, SaveHandler saveHandler) { InitializeComponent(); this.palette = palette; this.piggyFile = piggyFile; datafile = data; this.host = host; this.saveHandler = saveHandler; 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(transactionManager, 4); components.Add(robotPanel); robotPanel.Dock = DockStyle.Fill; weaponPanel = new WeaponPanel(transactionManager, 5); components.Add(weaponPanel); weaponPanel.Dock = DockStyle.Fill; polymodelPanel = new PolymodelPanel(transactionManager, 6, piggyFile, palette, data); components.Add(polymodelPanel); polymodelPanel.Dock = DockStyle.Fill; soundPanel = new SoundPanel(transactionManager, 7, datafile, host.DefaultSoundFile); components.Add(soundPanel); soundPanel.Dock = DockStyle.Fill; reactorPanel = new ReactorPanel(transactionManager, 8); components.Add(reactorPanel); reactorPanel.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); ModelTabPage.Controls.Add(polymodelPanel); SoundTabPage.Controls.Add(soundPanel); ReactorTabPage.Controls.Add(reactorPanel); string currentFilename = "Untitled"; if (saveHandler != null) { currentFilename = saveHandler.GetUIName(); } this.Text = string.Format("{0} - HAM Editor", currentFilename); transactionManager.undoEvent += DoUndoEvent; datafile.CompatObjBitmaps = StandardUI.options.GetOption("CompatObjBitmaps", bool.FalseString) == bool.TrueString; }
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; }