Example #1
0
        private void UpdateImage(STGenericTexture texture, int arrayLevel = 0)
        {
            ResetChannelEditor();

            HasBeenEdited = false;

            if (texture.CanEdit)
            {
                imageToolStripMenuItem.Enabled       = true;
                adjustmentsToolStripMenuItem.Enabled = true;
            }

            ActiveTexture = texture;

            if (ActiveTexture.CanEdit)
            {
                editBtn.Enabled         = true;
                editBtn.BackgroundImage = Properties.Resources.Edit;
            }
            else
            {
                editBtn.BackgroundImage = BitmapExtension.GrayScale(Properties.Resources.Edit);
            }

            CurMipDisplayLevel   = 0;
            CurArrayDisplayLevel = arrayLevel;
            hasBeenEdited        = false;

            UpdateMipDisplay();
        }
Example #2
0
        public ImageEditorBase()
        {
            InitializeComponent();

            backgroundPB.BackColor = Runtime.CustomPicureBoxBGColor;
            backgroundPB.Visible   = false;

            useComponentSelectorToolStripMenuItem.Checked = Runtime.ImageEditor.UseComponetSelector;
            enableZoomToolStripMenuItem.Checked           = Runtime.ImageEditor.EnableImageZoom;

            displayAlphaToolStripMenuItem.Checked = Runtime.ImageEditor.DisplayAlpha;
            SetAlphaEnableUI(Runtime.ImageEditor.DisplayAlpha);

            propertiesEditor      = new ImagePropertiesEditor();
            propertiesEditor.Dock = DockStyle.Fill;

            saveBtn.Enabled = HasBeenEdited;

            imageToolStripMenuItem.Enabled       = false;
            adjustmentsToolStripMenuItem.Enabled = false;
            editBtn.BackgroundImage = BitmapExtension.GrayScale(Properties.Resources.Edit);

            foreach (var type in Enum.GetValues(typeof(Runtime.PictureBoxBG)).Cast <Runtime.PictureBoxBG>())
            {
                imageBGComboBox.Items.Add(type);
            }

            imageBGComboBox.SelectedItem = Runtime.pictureBoxStyle;
            UpdateBackgroundImage();
            SetZoomSetting();

            SetEditorOrientation(Runtime.ImageEditor.DisplayVertical, true);

            previewGammaFixSmashUltimateToolStripMenuItem.Checked = Runtime.ImageEditor.PreviewGammaFix;
            UpdateLabel();

            propertyGridToolStripMenuItem.Checked = Runtime.ImageEditor.ShowPropertiesPanel;

            if (!propertyGridToolStripMenuItem.Checked)
            {
                HidePropertyGrid(true);
            }
            else
            {
                HidePropertyGrid(false);
            }

            OnDataAcquiredEvent += new DataAcquired(ThreadReportsDataAquiredEvent);

            SetUpFileSystemWatcher();

            undoToolStripMenuItem.Enabled = false;
            redoToolStripMenuItem.Enabled = false;
        }
        private void ToggleOrthMode()
        {
            if (ActiveViewport != null)
            {
                if (!orthographicViewToolStripMenuItem.Checked)
                {
                    toolstripOrthoBtn.Image = BitmapExtension.GrayScale(FirstPlugin.Properties.Resources.OrthoView);
                }
                else
                {
                    toolstripOrthoBtn.Image = FirstPlugin.Properties.Resources.OrthoView;
                }

                Runtime.LayoutEditor.UseOrthographicView = orthographicViewToolStripMenuItem.Checked;
                ActiveViewport.ResetCamera();
                ActiveViewport.UpdateViewport();
            }
        }