Improve image editor orientation
This commit is contained in:
parent
2c265c876d
commit
423aa38414
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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);
|
||||
|
Binary file not shown.
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user