Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public SXXEditor(StandardUI host, SNDFile datafile)
 {
     InitializeComponent();
     this.datafile = datafile;
     this.host     = host;
     Text          = string.Format("{0} - Sound Editor", datafile.filename);
 }
Exemplo n.º 3
0
 public HOGEditor(EditorHOGFile data, StandardUI host)
 {
     InitializeComponent();
     datafile  = data;
     this.host = host;
     this.Text = string.Format("{0} - Hog Editor", datafile.Filename);
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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;
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
 public SXXEditor(StandardUI host, SNDFile datafile, SoundCache cache, string FileName)
 {
     InitializeComponent();
     this.datafile = datafile;
     this.host     = host;
     this.cache    = cache;
     this.fileName = FileName;
     Text          = string.Format("{0} - Sound Editor", FileName);
 }
Exemplo n.º 8
0
        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;
        }
Exemplo n.º 9
0
 public POGEditor(POGFile data, EditorHOGFile hogFile, StandardUI host, string filename)
 {
     datafile      = data;
     this.filename = filename;
     this.hogFile  = hogFile;
     this.host     = host;
     InitializeComponent();
     this.Text             = string.Format("{0} - POG Editor", filename);
     panel                 = new ImageEditorPanel(data, true, host.DefaultPigFile, host.DefaultPalette);
     panel.PaletteChanged += PaletteComboBox_SelectedIndexChanged;
     panel.SetPalette(host.DefaultPalette);
     components.Add(panel);
     Controls.Add(panel);
     panel.Dock = DockStyle.Fill;
 }
Exemplo n.º 10
0
        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;
        }
Exemplo n.º 11
0
        public VHAMEditor(EditorVHAMFile data, StandardUI host)
        {
            InitializeComponent();
            robotPanel          = new RobotPanel(transactionManager, 0);
            robotPanel.Dock     = DockStyle.Fill;
            weaponPanel         = new WeaponPanel(transactionManager, 1);
            weaponPanel.Dock    = DockStyle.Fill;
            polymodelPanel      = new PolymodelPanel(transactionManager, 2, host.DefaultPigFile, host.DefaultPalette, data.BaseHAM);
            polymodelPanel.Dock = DockStyle.Fill;
            components.Add(robotPanel); components.Add(weaponPanel); components.Add(polymodelPanel);

            RobotTabPage.Controls.Add(robotPanel);
            WeaponTabPage.Controls.Add(weaponPanel);
            ModelTabPage.Controls.Add(polymodelPanel);
            datafile  = data;
            this.host = host;
            palette   = host.DefaultPalette;
        }