Add option to move properties in image editor vertical
This commit is contained in:
parent
99d7827466
commit
619c1f7ec5
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -169,198 +169,210 @@ namespace FirstPlugin
|
||||
drawables.Remove(skeleton);
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<AbstractGlDrawable> drawables = new List<AbstractGlDrawable>();
|
||||
public void LoadEditors(object SelectedSection)
|
||||
{
|
||||
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.Instance.GetActiveContent(typeof(BfresEditor));
|
||||
bool IsSimpleEditor = PluginRuntime.UseSimpleBfresEditor;
|
||||
|
||||
bool HasModels = BFRESRender.models.Count > 0;
|
||||
|
||||
if (bfresEditor == null)
|
||||
if (IsSimpleEditor)
|
||||
{
|
||||
bfresEditor = new BfresEditor(HasModels);
|
||||
bfresEditor.Dock = DockStyle.Fill;
|
||||
LibraryGUI.Instance.LoadEditor(bfresEditor);
|
||||
|
||||
}
|
||||
|
||||
var toolstrips = new List<ToolStripMenuItem>();
|
||||
var menu = new ToolStripMenuItem("Animation Loader", null, AnimLoader);
|
||||
|
||||
toolstrips.Add(menu);
|
||||
|
||||
bool IsLoaded = drawables.Count != 0;
|
||||
|
||||
bfresEditor.IsLoaded = IsLoaded;
|
||||
|
||||
if (drawables.Count <= 0)
|
||||
else
|
||||
{
|
||||
//Add drawables
|
||||
drawables.Add(BFRESRender);
|
||||
foreach (var mdl in BFRESRender.models)
|
||||
drawables.Add(mdl.Skeleton);
|
||||
}
|
||||
bfresEditor.LoadViewport(drawables, toolstrips);
|
||||
|
||||
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.Instance.GetActiveContent(typeof(BfresEditor));
|
||||
|
||||
if (!IsLoaded)
|
||||
{
|
||||
bfresEditor.OnLoadedTab();
|
||||
}
|
||||
bool HasModels = BFRESRender.models.Count > 0;
|
||||
|
||||
if (SelectedSection is BFRES)
|
||||
{
|
||||
STPropertyGrid editor = (STPropertyGrid)bfresEditor.GetActiveEditor(typeof(STPropertyGrid));
|
||||
if (editor == null)
|
||||
if (bfresEditor == null)
|
||||
{
|
||||
editor = new STPropertyGrid();
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
bfresEditor = new BfresEditor(HasModels);
|
||||
bfresEditor.Dock = DockStyle.Fill;
|
||||
LibraryGUI.Instance.LoadEditor(bfresEditor);
|
||||
}
|
||||
editor.Text = Text;
|
||||
|
||||
if (resFile != null)
|
||||
editor.LoadProperty(resFile, OnPropertyChanged);
|
||||
else
|
||||
editor.LoadProperty(resFileU, OnPropertyChanged);
|
||||
}
|
||||
else if (SelectedSection is BFRESGroupNode)
|
||||
{
|
||||
STPropertyGrid editor = (STPropertyGrid)bfresEditor.GetActiveEditor(typeof(STPropertyGrid));
|
||||
if (editor == null)
|
||||
var toolstrips = new List<ToolStripMenuItem>();
|
||||
var menu = new ToolStripMenuItem("Animation Loader", null, AnimLoader);
|
||||
|
||||
toolstrips.Add(menu);
|
||||
|
||||
bool IsLoaded = drawables.Count != 0;
|
||||
|
||||
bfresEditor.IsLoaded = IsLoaded;
|
||||
|
||||
if (drawables.Count <= 0)
|
||||
{
|
||||
editor = new STPropertyGrid();
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
//Add drawables
|
||||
drawables.Add(BFRESRender);
|
||||
foreach (var mdl in BFRESRender.models)
|
||||
drawables.Add(mdl.Skeleton);
|
||||
}
|
||||
editor.Text = Text;
|
||||
editor.LoadProperty(null, null);
|
||||
}
|
||||
else if(SelectedSection is FSKL.fsklNode)
|
||||
{
|
||||
FSKLEditor editor = (FSKLEditor)bfresEditor.GetActiveEditor(typeof(FSKLEditor));
|
||||
if (editor == null)
|
||||
bfresEditor.LoadViewport(drawables, toolstrips);
|
||||
|
||||
|
||||
if (!IsLoaded)
|
||||
{
|
||||
editor = new FSKLEditor();
|
||||
bfresEditor.OnLoadedTab();
|
||||
}
|
||||
|
||||
if (SelectedSection is BFRES)
|
||||
{
|
||||
STPropertyGrid editor = (STPropertyGrid)bfresEditor.GetActiveEditor(typeof(STPropertyGrid));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new STPropertyGrid();
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.Text = Text;
|
||||
|
||||
if (resFile != null)
|
||||
editor.LoadProperty(resFile, OnPropertyChanged);
|
||||
else
|
||||
editor.LoadProperty(resFileU, OnPropertyChanged);
|
||||
}
|
||||
else if (SelectedSection is BFRESGroupNode)
|
||||
{
|
||||
STPropertyGrid editor = (STPropertyGrid)bfresEditor.GetActiveEditor(typeof(STPropertyGrid));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new STPropertyGrid();
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.Text = Text;
|
||||
editor.LoadProperty(null, null);
|
||||
}
|
||||
else if (SelectedSection is FSKL.fsklNode)
|
||||
{
|
||||
FSKLEditor editor = (FSKLEditor)bfresEditor.GetActiveEditor(typeof(FSKLEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new FSKLEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadSkeleton(((FSKL.fsklNode)SelectedSection).fskl);
|
||||
}
|
||||
else if (SelectedSection is BfresBone)
|
||||
{
|
||||
BfresBoneEditor editor = (BfresBoneEditor)bfresEditor.GetActiveEditor(typeof(BfresBoneEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new BfresBoneEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadBone((BfresBone)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSHP)
|
||||
{
|
||||
BfresShapeEditor editor = (BfresShapeEditor)bfresEditor.GetActiveEditor(typeof(BfresShapeEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new BfresShapeEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadShape((FSHP)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FMAT)
|
||||
{
|
||||
FMATEditor editor = (FMATEditor)bfresEditor.GetActiveEditor(typeof(FMATEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new FMATEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadMaterial((FMAT)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSKA.BoneAnimNode)
|
||||
{
|
||||
BoneAnimEditor editor = (BoneAnimEditor)bfresEditor.GetActiveEditor(typeof(BoneAnimEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new BoneAnimEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadBoneAnim((FSKA.BoneAnimNode)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSCN.BfresCameraAnim)
|
||||
{
|
||||
SceneAnimEditor editor = (SceneAnimEditor)bfresEditor.GetActiveEditor(typeof(SceneAnimEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new SceneAnimEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadCameraAnim((FSCN.BfresCameraAnim)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSCN.BfresLightAnim)
|
||||
{
|
||||
SceneAnimEditor editor = (SceneAnimEditor)bfresEditor.GetActiveEditor(typeof(SceneAnimEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new SceneAnimEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadLightAnim((FSCN.BfresLightAnim)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSCN.BfresFogAnim)
|
||||
{
|
||||
SceneAnimEditor editor = (SceneAnimEditor)bfresEditor.GetActiveEditor(typeof(SceneAnimEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new SceneAnimEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadFogAnim((FSCN.BfresFogAnim)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FMDL)
|
||||
OpenSubFileEditor<FMDL>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FSKA)
|
||||
OpenSubFileEditor<FSKA>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FSHU)
|
||||
OpenSubFileEditor<FSHU>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FSCN)
|
||||
OpenSubFileEditor<FSCN>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FSHA)
|
||||
OpenSubFileEditor<FSHA>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FTXP)
|
||||
OpenSubFileEditor<FTXP>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FMAA)
|
||||
OpenSubFileEditor<FMAA>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FVIS)
|
||||
OpenSubFileEditor<FVIS>(SelectedSection, bfresEditor);
|
||||
|
||||
|
||||
/* else if (SelectedSection is FMAA && ((FMAA)SelectedSection).AnimType == MaterialAnimation.AnimationType.TexturePattern)
|
||||
{
|
||||
BfresTexturePatternEditor editor = (BfresTexturePatternEditor)bfresEditor.GetActiveEditor(typeof(BfresTexturePatternEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new BfresTexturePatternEditor();
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadSkeleton(((FSKL.fsklNode)SelectedSection).fskl);
|
||||
editor.LoadAnim((FMAA)SelectedSection);
|
||||
}*/
|
||||
}
|
||||
else if (SelectedSection is BfresBone)
|
||||
{
|
||||
BfresBoneEditor editor = (BfresBoneEditor)bfresEditor.GetActiveEditor(typeof(BfresBoneEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new BfresBoneEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadBone((BfresBone)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSHP)
|
||||
{
|
||||
BfresShapeEditor editor = (BfresShapeEditor)bfresEditor.GetActiveEditor(typeof(BfresShapeEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new BfresShapeEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadShape((FSHP)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FMAT)
|
||||
{
|
||||
FMATEditor editor = (FMATEditor)bfresEditor.GetActiveEditor(typeof(FMATEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new FMATEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadMaterial((FMAT)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSKA.BoneAnimNode)
|
||||
{
|
||||
BoneAnimEditor editor = (BoneAnimEditor)bfresEditor.GetActiveEditor(typeof(BoneAnimEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new BoneAnimEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadBoneAnim((FSKA.BoneAnimNode)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSCN.BfresCameraAnim)
|
||||
{
|
||||
SceneAnimEditor editor = (SceneAnimEditor)bfresEditor.GetActiveEditor(typeof(SceneAnimEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new SceneAnimEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadCameraAnim((FSCN.BfresCameraAnim)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSCN.BfresLightAnim)
|
||||
{
|
||||
SceneAnimEditor editor = (SceneAnimEditor)bfresEditor.GetActiveEditor(typeof(SceneAnimEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new SceneAnimEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadLightAnim((FSCN.BfresLightAnim)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FSCN.BfresFogAnim)
|
||||
{
|
||||
SceneAnimEditor editor = (SceneAnimEditor)bfresEditor.GetActiveEditor(typeof(SceneAnimEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new SceneAnimEditor();
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.LoadFogAnim((FSCN.BfresFogAnim)SelectedSection);
|
||||
}
|
||||
else if (SelectedSection is FMDL)
|
||||
OpenSubFileEditor<FMDL>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FSKA)
|
||||
OpenSubFileEditor<FSKA>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FSHU)
|
||||
OpenSubFileEditor<FSHU>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FSCN)
|
||||
OpenSubFileEditor<FSCN>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FSHA)
|
||||
OpenSubFileEditor<FSHA>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FTXP)
|
||||
OpenSubFileEditor<FTXP>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FMAA)
|
||||
OpenSubFileEditor<FMAA>(SelectedSection, bfresEditor);
|
||||
else if (SelectedSection is FVIS)
|
||||
OpenSubFileEditor<FVIS>(SelectedSection, bfresEditor);
|
||||
|
||||
|
||||
/* else if (SelectedSection is FMAA && ((FMAA)SelectedSection).AnimType == MaterialAnimation.AnimationType.TexturePattern)
|
||||
{
|
||||
BfresTexturePatternEditor editor = (BfresTexturePatternEditor)bfresEditor.GetActiveEditor(typeof(BfresTexturePatternEditor));
|
||||
if (editor == null)
|
||||
{
|
||||
editor = new BfresTexturePatternEditor();
|
||||
bfresEditor.LoadEditor(editor);
|
||||
}
|
||||
editor.Text = Text;
|
||||
editor.Dock = DockStyle.Fill;
|
||||
editor.LoadAnim((FMAA)SelectedSection);
|
||||
}*/
|
||||
}
|
||||
|
||||
private SubFileEditor OpenSubFileEditor<T>(object node, BfresEditor bfresEditor) where T : STGenericWrapper
|
||||
|
@ -9,6 +9,8 @@ namespace FirstPlugin
|
||||
{
|
||||
public class PluginRuntime
|
||||
{
|
||||
public static bool UseSimpleBfresEditor = false;
|
||||
|
||||
public static Dictionary<string, BFLIM> bflimTextures = new Dictionary<string, BFLIM>();
|
||||
public static List<BNTX> bntxContainers = new List<BNTX>();
|
||||
public static List<BFRESGroupNode> ftexContainers = new List<BFRESGroupNode>();
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -37,6 +37,7 @@
|
||||
this.pictureBoxCustom1 = new Switch_Toolbox.Library.Forms.PictureBoxCustom();
|
||||
this.blueChannelBtn = new Switch_Toolbox.Library.Forms.STButton();
|
||||
this.stPanel3 = new Switch_Toolbox.Library.Forms.STPanel();
|
||||
this.toggleAlphaChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
this.saveBtn = new Switch_Toolbox.Library.Forms.STButton();
|
||||
this.arrayLevelCounterLabel = new Switch_Toolbox.Library.Forms.STLabel();
|
||||
this.BtmMipsLeft = new Switch_Toolbox.Library.Forms.STButton();
|
||||
@ -53,6 +54,7 @@
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.propertyGridToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.channelViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.displayVerticalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.imageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.reEncodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -64,7 +66,6 @@
|
||||
this.adjustmentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.hueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.brightnessContrastToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toggleAlphaChk = new Switch_Toolbox.Library.Forms.STCheckBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
@ -93,7 +94,7 @@
|
||||
//
|
||||
this.splitContainer1.Panel2.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(715, 502);
|
||||
this.splitContainer1.SplitterDistance = 519;
|
||||
this.splitContainer1.SplitterDistance = 520;
|
||||
this.splitContainer1.TabIndex = 5;
|
||||
//
|
||||
// stPanel2
|
||||
@ -102,7 +103,7 @@
|
||||
this.stPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.stPanel2.Location = new System.Drawing.Point(0, 501);
|
||||
this.stPanel2.Name = "stPanel2";
|
||||
this.stPanel2.Size = new System.Drawing.Size(519, 1);
|
||||
this.stPanel2.Size = new System.Drawing.Size(520, 1);
|
||||
this.stPanel2.TabIndex = 1;
|
||||
//
|
||||
// stPanel1
|
||||
@ -118,7 +119,7 @@
|
||||
this.stPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.stPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.stPanel1.Name = "stPanel1";
|
||||
this.stPanel1.Size = new System.Drawing.Size(519, 502);
|
||||
this.stPanel1.Size = new System.Drawing.Size(520, 502);
|
||||
this.stPanel1.TabIndex = 2;
|
||||
//
|
||||
// alphaChannelBtn
|
||||
@ -141,7 +142,7 @@
|
||||
this.stPanel4.Controls.Add(this.pictureBoxCustom1);
|
||||
this.stPanel4.Location = new System.Drawing.Point(3, 74);
|
||||
this.stPanel4.Name = "stPanel4";
|
||||
this.stPanel4.Size = new System.Drawing.Size(513, 425);
|
||||
this.stPanel4.Size = new System.Drawing.Size(514, 425);
|
||||
this.stPanel4.TabIndex = 8;
|
||||
//
|
||||
// pictureBoxCustom1
|
||||
@ -151,7 +152,7 @@
|
||||
this.pictureBoxCustom1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pictureBoxCustom1.Location = new System.Drawing.Point(0, 0);
|
||||
this.pictureBoxCustom1.Name = "pictureBoxCustom1";
|
||||
this.pictureBoxCustom1.Size = new System.Drawing.Size(513, 425);
|
||||
this.pictureBoxCustom1.Size = new System.Drawing.Size(514, 425);
|
||||
this.pictureBoxCustom1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBoxCustom1.TabIndex = 1;
|
||||
this.pictureBoxCustom1.TabStop = false;
|
||||
@ -183,6 +184,19 @@
|
||||
this.stPanel3.Size = new System.Drawing.Size(715, 51);
|
||||
this.stPanel3.TabIndex = 3;
|
||||
//
|
||||
// toggleAlphaChk
|
||||
//
|
||||
this.toggleAlphaChk.AutoSize = true;
|
||||
this.toggleAlphaChk.Checked = true;
|
||||
this.toggleAlphaChk.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.toggleAlphaChk.Location = new System.Drawing.Point(50, 7);
|
||||
this.toggleAlphaChk.Name = "toggleAlphaChk";
|
||||
this.toggleAlphaChk.Size = new System.Drawing.Size(83, 17);
|
||||
this.toggleAlphaChk.TabIndex = 15;
|
||||
this.toggleAlphaChk.Text = "Show Alpha";
|
||||
this.toggleAlphaChk.UseVisualStyleBackColor = true;
|
||||
this.toggleAlphaChk.CheckedChanged += new System.EventHandler(this.toggleAlphaChk_CheckedChanged);
|
||||
//
|
||||
// saveBtn
|
||||
//
|
||||
this.saveBtn.BackColor = System.Drawing.Color.Transparent;
|
||||
@ -307,7 +321,7 @@
|
||||
this.adjustmentsToolStripMenuItem});
|
||||
this.stContextMenuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.stContextMenuStrip1.Name = "stContextMenuStrip1";
|
||||
this.stContextMenuStrip1.Size = new System.Drawing.Size(519, 24);
|
||||
this.stContextMenuStrip1.Size = new System.Drawing.Size(520, 24);
|
||||
this.stContextMenuStrip1.TabIndex = 0;
|
||||
this.stContextMenuStrip1.Text = "stContextMenuStrip1";
|
||||
//
|
||||
@ -330,7 +344,8 @@
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.propertyGridToolStripMenuItem,
|
||||
this.channelViewToolStripMenuItem});
|
||||
this.channelViewToolStripMenuItem,
|
||||
this.displayVerticalToolStripMenuItem});
|
||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
|
||||
this.viewToolStripMenuItem.Text = "View";
|
||||
@ -341,17 +356,24 @@
|
||||
this.propertyGridToolStripMenuItem.CheckOnClick = true;
|
||||
this.propertyGridToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.propertyGridToolStripMenuItem.Name = "propertyGridToolStripMenuItem";
|
||||
this.propertyGridToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.propertyGridToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||||
this.propertyGridToolStripMenuItem.Text = "Property Grid";
|
||||
this.propertyGridToolStripMenuItem.Click += new System.EventHandler(this.propertyGridToolStripMenuItem_Click);
|
||||
//
|
||||
// channelViewToolStripMenuItem
|
||||
//
|
||||
this.channelViewToolStripMenuItem.Name = "channelViewToolStripMenuItem";
|
||||
this.channelViewToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
|
||||
this.channelViewToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||||
this.channelViewToolStripMenuItem.Text = "Channel View";
|
||||
this.channelViewToolStripMenuItem.Click += new System.EventHandler(this.channelViewToolStripMenuItem_Click);
|
||||
//
|
||||
// displayVerticalToolStripMenuItem
|
||||
//
|
||||
this.displayVerticalToolStripMenuItem.Name = "displayVerticalToolStripMenuItem";
|
||||
this.displayVerticalToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||||
this.displayVerticalToolStripMenuItem.Text = "Display Vertical";
|
||||
this.displayVerticalToolStripMenuItem.Click += new System.EventHandler(this.displayVerticalToolStripMenuItem_Click);
|
||||
//
|
||||
// imageToolStripMenuItem
|
||||
//
|
||||
this.imageToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -439,19 +461,6 @@
|
||||
this.brightnessContrastToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
|
||||
this.brightnessContrastToolStripMenuItem.Text = "Brightness / Contrast";
|
||||
//
|
||||
// toggleAlphaChk
|
||||
//
|
||||
this.toggleAlphaChk.AutoSize = true;
|
||||
this.toggleAlphaChk.Checked = true;
|
||||
this.toggleAlphaChk.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.toggleAlphaChk.Location = new System.Drawing.Point(50, 7);
|
||||
this.toggleAlphaChk.Name = "toggleAlphaChk";
|
||||
this.toggleAlphaChk.Size = new System.Drawing.Size(83, 17);
|
||||
this.toggleAlphaChk.TabIndex = 15;
|
||||
this.toggleAlphaChk.Text = "Show Alpha";
|
||||
this.toggleAlphaChk.UseVisualStyleBackColor = true;
|
||||
this.toggleAlphaChk.CheckedChanged += new System.EventHandler(this.toggleAlphaChk_CheckedChanged);
|
||||
//
|
||||
// ImageEditorBase
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -511,5 +520,6 @@
|
||||
private STButton saveBtn;
|
||||
private System.Windows.Forms.ToolStripMenuItem reEncodeToolStripMenuItem;
|
||||
private STCheckBox toggleAlphaChk;
|
||||
private System.Windows.Forms.ToolStripMenuItem displayVerticalToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -114,21 +114,13 @@ namespace Switch_Toolbox.Library.Forms
|
||||
propertiesEditor.Dock = DockStyle.Fill;
|
||||
|
||||
if (!propertyGridToolStripMenuItem.Checked)
|
||||
{
|
||||
splitContainer1.Panel2Collapsed = true;
|
||||
splitContainer1.Panel2.Hide();
|
||||
}
|
||||
HidePropertyGrid(true);
|
||||
else
|
||||
{
|
||||
splitContainer1.Panel2Collapsed = false;
|
||||
splitContainer1.Panel2.Show();
|
||||
}
|
||||
HidePropertyGrid(false);
|
||||
|
||||
if (ShowChannelEditor)
|
||||
{
|
||||
LoadChannelEditor(null);
|
||||
}
|
||||
|
||||
|
||||
if (PropertyShowTop)
|
||||
{
|
||||
splitContainer1.Panel1.Controls.Add(propertiesEditor);
|
||||
@ -681,5 +673,82 @@ namespace Switch_Toolbox.Library.Forms
|
||||
{
|
||||
UpdatePictureBox();
|
||||
}
|
||||
|
||||
private void displayVerticalToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (displayVerticalToolStripMenuItem.Checked)
|
||||
{
|
||||
DisplayHorizontal();
|
||||
displayVerticalToolStripMenuItem.Checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayVertical();
|
||||
displayVerticalToolStripMenuItem.Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void DisplayHorizontal()
|
||||
{
|
||||
var ImagePanel = stPanel1;
|
||||
var PropertiesEditor = propertiesEditor;
|
||||
|
||||
//Swap panels
|
||||
splitContainer1.Panel1.Controls.Clear();
|
||||
splitContainer1.Panel2.Controls.Clear();
|
||||
|
||||
splitContainer1.Orientation = Orientation.Vertical;
|
||||
splitContainer1.Panel1.Controls.Add(ImagePanel);
|
||||
splitContainer1.Panel2.Controls.Add(PropertiesEditor);
|
||||
PropertiesEditor.HideHintPanel(true);
|
||||
|
||||
PropertiesEditor.Width = this.Width / 2;
|
||||
|
||||
splitContainer1.SplitterDistance = this.Width / 2;
|
||||
}
|
||||
|
||||
private void HidePropertyGrid(bool Hide)
|
||||
{
|
||||
if (Hide)
|
||||
{
|
||||
if (splitContainer1.Panel1.Contains(propertiesEditor)) {
|
||||
splitContainer1.Panel1Collapsed = true;
|
||||
splitContainer1.Panel1.Hide();
|
||||
}
|
||||
if (splitContainer1.Panel2.Contains(propertiesEditor)) {
|
||||
splitContainer1.Panel2Collapsed = true;
|
||||
splitContainer1.Panel2.Hide();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (splitContainer1.Panel1.Contains(propertiesEditor)) {
|
||||
splitContainer1.Panel1Collapsed = false;
|
||||
splitContainer1.Panel1.Show();
|
||||
}
|
||||
if (splitContainer1.Panel2.Contains(propertiesEditor)) {
|
||||
splitContainer1.Panel2Collapsed = false;
|
||||
splitContainer1.Panel2.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DisplayVertical()
|
||||
{
|
||||
var ImagePanel = stPanel1;
|
||||
var PropertiesEditor = propertiesEditor;
|
||||
|
||||
//Swap panels
|
||||
splitContainer1.Panel1.Controls.Clear();
|
||||
splitContainer1.Panel2.Controls.Clear();
|
||||
|
||||
splitContainer1.Orientation = Orientation.Horizontal;
|
||||
splitContainer1.Panel2.Controls.Add(ImagePanel);
|
||||
splitContainer1.Panel1.Controls.Add(PropertiesEditor);
|
||||
|
||||
splitContainer1.SplitterDistance = this.Height / 2;
|
||||
|
||||
PropertiesEditor.HideHintPanel(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,9 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="stContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBoxCustom1.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
@ -328,6 +325,9 @@
|
||||
mGk4zW7tt3aFGa0JAhPXKv5Grfv8ckaj93+veSuXxEAIUwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="stContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
</metadata>
|
||||
|
@ -45,6 +45,11 @@ namespace Switch_Toolbox.Library.Forms
|
||||
stTabControl1.TabPages.Add(page);
|
||||
}
|
||||
|
||||
public void HideHintPanel(bool HideHint)
|
||||
{
|
||||
stPropertyGrid1.DisableHintDisplay = HideHint;
|
||||
}
|
||||
|
||||
public UserControl GetActiveTabControl(Type type)
|
||||
{
|
||||
foreach (TabPage pge in stTabControl1.TabPages)
|
||||
|
@ -44,7 +44,7 @@ namespace Switch_Toolbox.Library.Forms
|
||||
}
|
||||
public ActiveTexture activeTexture = new ActiveTexture();
|
||||
|
||||
public float brightness = 0; //To see uv maps easier
|
||||
public float brightness = 0.5f; //To see uv maps easier
|
||||
public int UvChannelIndex = 0;
|
||||
public STGenericMaterial ActiveMaterial;
|
||||
|
||||
@ -55,6 +55,8 @@ namespace Switch_Toolbox.Library.Forms
|
||||
bool IsSRTLoaded = false;
|
||||
public void Reset()
|
||||
{
|
||||
barSlider1.Value = brightness;
|
||||
|
||||
scaleXUD.Value = 1;
|
||||
scaleYUD.Value = 1;
|
||||
transXUD.Value = 0;
|
||||
@ -350,7 +352,7 @@ namespace Switch_Toolbox.Library.Forms
|
||||
private void OnMouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||
{
|
||||
if (e.Delta > 0 && ZoomValue > 0) ZoomValue += 0.1f;
|
||||
if (e.Delta < 0 && ZoomValue < 5 && ZoomValue > 0.1) ZoomValue -= 0.1f;
|
||||
if (e.Delta < 0 && ZoomValue < 30 && ZoomValue > 0.1) ZoomValue -= 0.1f;
|
||||
|
||||
gL_ControlLegacy2D1.Invalidate();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user