示例#1
0
 private void TextureEventHandler(object sender, TmapInfoEventArgs e)
 {
     UpdatePictureBox(PiggyBitmapUtilities.GetBitmap(piggyFile, palette, e.Value), pbTexPrev);
     //mid transaction, so this is safe. Probably.
     //Make sure the value is clamped in the textbox
     TextureIDTextBox.Text = e.Value.ToString();
 }
示例#2
0
        public void Update(EditorHAMFile datafile, PIGFile piggyFile, int textureID, TMAPInfo info)
        {
            isLocked       = true;
            this.textureID = textureID;
            this.datafile  = datafile;
            this.piggyFile = piggyFile;
            this.info      = info;

            TextureIDTextBox.Text        = datafile.Textures[textureID].ToString();
            txtTexLight.Text             = info.Lighting.ToString();
            txtTexDamage.Text            = info.Damage.ToString();
            cbTexEClip.SelectedIndex     = info.EClipNum + 1;
            txtTexSlideU.Text            = GetFloatFromFixed88(info.SlideU).ToString();
            txtTexSlideV.Text            = GetFloatFromFixed88(info.SlideV).ToString();
            TextureDestroyedTextBox.Text = info.DestroyedID.ToString();
            cbTexLava.Checked            = info.Volatile;
            cbTexWater.Checked           = info.Water;
            cbTexForcefield.Checked      = info.ForceField;
            cbTexRedGoal.Checked         = info.RedGoal;
            cbTexBlueGoal.Checked        = info.BlueGoal;
            cbTexHoardGoal.Checked       = info.HoardGoal;

            UpdatePictureBox(PiggyBitmapUtilities.GetBitmap(piggyFile, palette, datafile.Textures[textureID]), pbTexPrev);
            isLocked = false;
        }
示例#3
0
        private void UpdateEffectFrame(int frame)
        {
            FrameNumTextBox.Text = clip.Clip.Frames[frame].ToString();

            if (pbEffectFramePreview.Image != null)
            {
                Bitmap temp = (Bitmap)pbEffectFramePreview.Image;
                pbEffectFramePreview.Image = null;
                temp.Dispose();
            }
            pbEffectFramePreview.Image = PiggyBitmapUtilities.GetBitmap(piggyFile, palette, clip.Clip.Frames[frame]);
        }
示例#4
0
        private void UpdateWallFrame(int frame)
        {
            FrameTextBox.Text = clip.Frames[frame].ToString();

            if (FramePictureBox.Image != null)
            {
                Bitmap temp = (Bitmap)FramePictureBox.Image;
                FramePictureBox.Image = null;
                temp.Dispose();
            }
            FramePictureBox.Image = PiggyBitmapUtilities.GetBitmap(hamFile.piggyFile, palette, hamFile.Textures[clip.Frames[frame]]);
        }