mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
Add fps counter to animation timeline and fix tick speed (layout editor)
This commit is contained in:
parent
b23876416c
commit
5f2dbd1b56
4 changed files with 49 additions and 8 deletions
|
@ -120,4 +120,7 @@
|
|||
<metadata name="stToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="stToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -661,9 +661,9 @@ namespace LayoutBXLYT
|
|||
}
|
||||
}
|
||||
else if (file is BFLAN)
|
||||
{
|
||||
|
||||
}
|
||||
LoadBxlan(((BFLAN)file).BxlanHeader);
|
||||
else if (file is BRLAN)
|
||||
LoadBxlan(((BRLAN)file).BxlanHeader);
|
||||
else if (file is BNTX)
|
||||
{
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
{
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.stLabel1 = new Toolbox.Library.Forms.STLabel();
|
||||
this.frameSpeedUD = new System.Windows.Forms.NumericUpDown();
|
||||
this.loopChkBox = new Toolbox.Library.Forms.STCheckBox();
|
||||
this.totalFrame = new System.Windows.Forms.NumericUpDown();
|
||||
this.currentFrameUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
|
@ -37,6 +39,7 @@
|
|||
this.stPanel1 = new Toolbox.Library.Forms.STPanel();
|
||||
this.animationTrackBar = new Toolbox.Library.Forms.KeyedAnimTimeline();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.frameSpeedUD)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.totalFrame)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.currentFrameUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
|
@ -57,6 +60,8 @@
|
|||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(45)))));
|
||||
this.panel1.Controls.Add(this.stLabel1);
|
||||
this.panel1.Controls.Add(this.frameSpeedUD);
|
||||
this.panel1.Controls.Add(this.loopChkBox);
|
||||
this.panel1.Controls.Add(this.totalFrame);
|
||||
this.panel1.Controls.Add(this.currentFrameUpDown);
|
||||
|
@ -69,6 +74,26 @@
|
|||
this.panel1.TabIndex = 4;
|
||||
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
|
||||
//
|
||||
// stLabel1
|
||||
//
|
||||
this.stLabel1.AutoSize = true;
|
||||
this.stLabel1.Location = new System.Drawing.Point(114, 11);
|
||||
this.stLabel1.Name = "stLabel1";
|
||||
this.stLabel1.Size = new System.Drawing.Size(27, 13);
|
||||
this.stLabel1.TabIndex = 7;
|
||||
this.stLabel1.Text = "FPS";
|
||||
//
|
||||
// frameSpeedUD
|
||||
//
|
||||
this.frameSpeedUD.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.frameSpeedUD.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.frameSpeedUD.ForeColor = System.Drawing.Color.White;
|
||||
this.frameSpeedUD.Location = new System.Drawing.Point(158, 9);
|
||||
this.frameSpeedUD.Name = "frameSpeedUD";
|
||||
this.frameSpeedUD.Size = new System.Drawing.Size(87, 16);
|
||||
this.frameSpeedUD.TabIndex = 6;
|
||||
this.frameSpeedUD.ValueChanged += new System.EventHandler(this.frameSpeedUD_ValueChanged);
|
||||
//
|
||||
// loopChkBox
|
||||
//
|
||||
this.loopChkBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
|
@ -131,24 +156,25 @@
|
|||
//
|
||||
// animationTrackBar
|
||||
//
|
||||
this.animationTrackBar.ActiveAnimation = null;
|
||||
this.animationTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.animationTrackBar.CurrentFrame = 0;
|
||||
this.animationTrackBar.FrameCount = 1000;
|
||||
this.animationTrackBar.CurrentFrame = 0F;
|
||||
this.animationTrackBar.FrameCount = 1002F;
|
||||
this.animationTrackBar.Location = new System.Drawing.Point(0, 14);
|
||||
this.animationTrackBar.Name = "animationTrackBar";
|
||||
this.animationTrackBar.Size = new System.Drawing.Size(631, 149);
|
||||
this.animationTrackBar.TabIndex = 6;
|
||||
//
|
||||
// AnimationPanel
|
||||
// STAnimationPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.animationTrackBar);
|
||||
this.Controls.Add(this.stPanel1);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "AnimationPanel";
|
||||
this.Name = "STAnimationPanel";
|
||||
this.Size = new System.Drawing.Size(631, 194);
|
||||
this.Load += new System.EventHandler(this.AnimationPanel_Load);
|
||||
this.Click += new System.EventHandler(this.AnimationPanel_Click);
|
||||
|
@ -156,6 +182,7 @@
|
|||
this.Leave += new System.EventHandler(this.AnimationPanel_Leave);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.frameSpeedUD)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.totalFrame)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.currentFrameUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
@ -171,5 +198,7 @@
|
|||
private Forms.STPanel stPanel1;
|
||||
private Forms.STCheckBox loopChkBox;
|
||||
private Forms.KeyedAnimTimeline animationTrackBar;
|
||||
private Forms.STLabel stLabel1;
|
||||
private System.Windows.Forms.NumericUpDown frameSpeedUD;
|
||||
}
|
||||
}
|
|
@ -183,6 +183,10 @@ namespace Toolbox.Library
|
|||
currentFrameUpDown.ForeColor = FormThemes.BaseTheme.FormForeColor;
|
||||
currentFrameUpDown.BackColor = FormThemes.BaseTheme.FormBackColor;
|
||||
|
||||
frameSpeedUD.Minimum = 1;
|
||||
frameSpeedUD.Value = 60;
|
||||
frameSpeedUD.Maximum = 120;
|
||||
|
||||
SetupTimer();
|
||||
|
||||
this.LostFocus += new System.EventHandler(AnimationPanel_LostFocus);
|
||||
|
@ -241,7 +245,7 @@ namespace Toolbox.Library
|
|||
{
|
||||
animationTimer = new Timer
|
||||
{
|
||||
Interval = 100 / 60
|
||||
Interval = 1000 / 60
|
||||
};
|
||||
animationTimer.Tick += new EventHandler(animationTimer_Tick);
|
||||
}
|
||||
|
@ -426,5 +430,10 @@ namespace Toolbox.Library
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
private void frameSpeedUD_ValueChanged(object sender, EventArgs e) {
|
||||
if (animationTimer != null)
|
||||
animationTimer.Interval = (int)(1000 / frameSpeedUD.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue