Add option to always dispay all models
This commit is contained in:
parent
d25d10c22b
commit
976c214799
Binary file not shown.
@ -18,6 +18,18 @@ namespace FirstPlugin.Forms
|
||||
{
|
||||
private bool _displayViewport = true;
|
||||
|
||||
private bool _displayAll = false;
|
||||
public bool DisplayAll
|
||||
{
|
||||
get { return _displayAll; }
|
||||
set
|
||||
{
|
||||
_displayAll = value;
|
||||
if (viewport != null)
|
||||
viewport.DisplayAll = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisplayViewport
|
||||
{
|
||||
get
|
||||
@ -91,6 +103,7 @@ namespace FirstPlugin.Forms
|
||||
{
|
||||
viewport = new Viewport(ObjectEditor.GetDrawableContainers());
|
||||
viewport.Dock = DockStyle.Fill;
|
||||
viewport.DisplayAll = DisplayAll;
|
||||
}
|
||||
|
||||
//If the option is enabled by settings, and it has models display the viewport
|
||||
@ -150,8 +163,11 @@ namespace FirstPlugin.Forms
|
||||
public void UpdateViewport()
|
||||
{
|
||||
if (viewport != null && Runtime.UseOpenGL && Runtime.DisplayViewport)
|
||||
{
|
||||
viewport.DisplayAll = DisplayAll;
|
||||
viewport.UpdateViewport();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsLoaded = false;
|
||||
|
@ -211,6 +211,9 @@ namespace FirstPlugin
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.GetActiveContent(typeof(BfresEditor));
|
||||
bfresEditor.DisplayAll = true;
|
||||
}
|
||||
|
||||
private ObjectEditor editor;
|
||||
|
@ -52,6 +52,9 @@ namespace FirstPlugin
|
||||
TextureSzs = null;
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
BfresEditor bfresEditor = (BfresEditor)LibraryGUI.GetActiveContent(typeof(BfresEditor));
|
||||
bfresEditor.DisplayAll = true;
|
||||
}
|
||||
|
||||
private static void DiableLoadCheck()
|
||||
|
14
Switch_Toolbox_Library/Forms/Viewport.Designer.cs
generated
14
Switch_Toolbox_Library/Forms/Viewport.Designer.cs
generated
@ -53,6 +53,7 @@
|
||||
this.reloadShadersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.stPanel1 = new Toolbox.Library.Forms.STPanel();
|
||||
this.stLabel1 = new Toolbox.Library.Forms.STLabel();
|
||||
this.chkDisplayAllModels = new Toolbox.Library.Forms.STCheckBox();
|
||||
this.stContextMenuStrip1.SuspendLayout();
|
||||
this.stPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
@ -256,6 +257,7 @@
|
||||
//
|
||||
this.stPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.stPanel1.Controls.Add(this.chkDisplayAllModels);
|
||||
this.stPanel1.Controls.Add(this.stLabel1);
|
||||
this.stPanel1.Controls.Add(this.drawContainersCB);
|
||||
this.stPanel1.Location = new System.Drawing.Point(0, 26);
|
||||
@ -272,6 +274,17 @@
|
||||
this.stLabel1.TabIndex = 1;
|
||||
this.stLabel1.Text = "Active Model(s):";
|
||||
//
|
||||
// chkDisplayAllModels
|
||||
//
|
||||
this.chkDisplayAllModels.AutoSize = true;
|
||||
this.chkDisplayAllModels.Location = new System.Drawing.Point(282, 2);
|
||||
this.chkDisplayAllModels.Name = "chkDisplayAllModels";
|
||||
this.chkDisplayAllModels.Size = new System.Drawing.Size(74, 17);
|
||||
this.chkDisplayAllModels.TabIndex = 2;
|
||||
this.chkDisplayAllModels.Text = "Display All";
|
||||
this.chkDisplayAllModels.UseVisualStyleBackColor = true;
|
||||
this.chkDisplayAllModels.CheckedChanged += new System.EventHandler(this.chkDisplayAllModels_CheckedChanged);
|
||||
//
|
||||
// Viewport
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@ -317,5 +330,6 @@
|
||||
private Forms.STComboBox drawContainersCB;
|
||||
private Forms.STPanel stPanel1;
|
||||
private Forms.STLabel stLabel1;
|
||||
private Forms.STCheckBox chkDisplayAllModels;
|
||||
}
|
||||
}
|
@ -18,6 +18,18 @@ namespace Toolbox.Library
|
||||
{
|
||||
public partial class Viewport : UserControl
|
||||
{
|
||||
public bool DisplayAll
|
||||
{
|
||||
get
|
||||
{
|
||||
return chkDisplayAllModels.Checked;
|
||||
}
|
||||
set
|
||||
{
|
||||
chkDisplayAllModels.Checked = value;
|
||||
}
|
||||
}
|
||||
|
||||
public List<DrawableContainer> DrawableContainers;
|
||||
|
||||
public EditorScene scene = new EditorScene();
|
||||
@ -483,6 +495,12 @@ namespace Toolbox.Library
|
||||
|
||||
private void drawContainersCB_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (chkDisplayAllModels.Checked)
|
||||
{
|
||||
DrawAllActive();
|
||||
return;
|
||||
}
|
||||
|
||||
if (drawContainersCB.SelectedIndex == 0)
|
||||
DrawAllActive();
|
||||
else if (drawContainersCB.SelectedIndex > 0)
|
||||
@ -519,5 +537,14 @@ namespace Toolbox.Library
|
||||
{
|
||||
ReloadDrawables();
|
||||
}
|
||||
|
||||
private void chkDisplayAllModels_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (chkDisplayAllModels.Checked)
|
||||
{
|
||||
drawContainersCB.SelectedIndex = 0;
|
||||
DrawAllActive();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user