1
0
mirror of synced 2025-01-19 01:14:08 +01:00

Improve image editor orientation

This commit is contained in:
KillzXGaming 2019-05-17 16:17:48 -04:00
parent 2c265c876d
commit 423aa38414
7 changed files with 10 additions and 13 deletions

Binary file not shown.

View File

@ -312,6 +312,8 @@ namespace FirstPlugin
LibraryGUI.Instance.LoadEditor(bfresEditor);
}
bool ViewportToggled = bfresEditor.DisplayViewport;
if (SelectedSection is FTEX)
{
ImageEditorBase editorFtex = (ImageEditorBase)bfresEditor.GetActiveEditor(typeof(ImageEditorBase));
@ -325,7 +327,7 @@ namespace FirstPlugin
editorFtex.Text = Text;
editorFtex.LoadProperties(((FTEX)SelectedSection).texture);
editorFtex.LoadImage((FTEX)SelectedSection);
if (Runtime.DisplayViewport)
if (Runtime.DisplayViewport && ViewportToggled)
editorFtex.SetEditorOrientation(true);
if (((FTEX)SelectedSection).texture.UserData != null)
@ -364,7 +366,7 @@ namespace FirstPlugin
}
editor.Text = Text;
if (Runtime.DisplayViewport)
if (Runtime.DisplayViewport && ViewportToggled)
editor.SetEditorOrientation(true);
editor.LoadProperties(((TextureData)SelectedSection).Texture);

View File

@ -481,7 +481,6 @@
this.displayVerticalToolStripMenuItem.Name = "displayVerticalToolStripMenuItem";
this.displayVerticalToolStripMenuItem.Size = new System.Drawing.Size(205, 22);
this.displayVerticalToolStripMenuItem.Text = "Display Vertical";
this.displayVerticalToolStripMenuItem.CheckedChanged += new System.EventHandler(this.displayVerticalToolStripMenuItem_CheckedChanged);
this.displayVerticalToolStripMenuItem.Click += new System.EventHandler(this.displayVerticalToolStripMenuItem_Click);
//
// displayAlphaToolStripMenuItem

View File

@ -182,8 +182,6 @@ namespace Switch_Toolbox.Library.Forms
SetEditorOrientation(Runtime.ImageEditor.DisplayVertical);
if (!Runtime.ImageEditor.DisplayVertical)
DisplayHorizontal();
propertyGridToolStripMenuItem.Checked = Runtime.ImageEditor.ShowPropertiesPanel;
@ -213,6 +211,7 @@ namespace Switch_Toolbox.Library.Forms
public void SetEditorOrientation(bool ToVertical)
{
displayVerticalToolStripMenuItem.Checked = ToVertical;
SetOrientation();
}
private void UpdateBackgroundImage()
@ -792,12 +791,6 @@ namespace Switch_Toolbox.Library.Forms
}
private void displayVerticalToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
SetOrientation();
SaveSettings();
}
private void SetOrientation()
{
if (displayVerticalToolStripMenuItem.Checked)
@ -808,8 +801,6 @@ namespace Switch_Toolbox.Library.Forms
{
DisplayHorizontal();
}
Runtime.ImageEditor.DisplayVertical = displayVerticalToolStripMenuItem.Checked;
}
private void displayVerticalToolStripMenuItem_Click(object sender, EventArgs e)
@ -822,6 +813,11 @@ namespace Switch_Toolbox.Library.Forms
{
displayVerticalToolStripMenuItem.Checked = true;
}
Runtime.ImageEditor.DisplayVertical = displayVerticalToolStripMenuItem.Checked;
SetOrientation();
SaveSettings();
}
private void HidePropertyGrid(bool Hide)