Added ability to manually select animations in ModelForm

This commit is contained in:
dexy
2019-11-21 19:01:43 +11:00
Unverified
parent 53305c3f12
commit d025f1b8d8
5 changed files with 241 additions and 64 deletions
+12 -13
View File
@@ -76,6 +76,7 @@
this.PedNameComboBox = new System.Windows.Forms.ComboBox();
this.StatsUpdateTimer = new System.Windows.Forms.Timer(this.components);
this.ToolsPedTabPage = new System.Windows.Forms.TabPage();
this.EnableRootMotionCheckBox = new System.Windows.Forms.CheckBox();
this.label23 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.ClipComboBox = new System.Windows.Forms.ComboBox();
@@ -108,7 +109,6 @@
this.label4 = new System.Windows.Forms.Label();
this.ToolsTabControl = new System.Windows.Forms.TabControl();
this.ToolsPanel = new System.Windows.Forms.Panel();
this.EnableRootMotionCheckBox = new System.Windows.Forms.CheckBox();
this.ConsolePanel.SuspendLayout();
this.ToolsOptionsTabPage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.TimeOfDayTrackBar)).BeginInit();
@@ -697,6 +697,17 @@
this.ToolsPedTabPage.Text = "Ped";
this.ToolsPedTabPage.UseVisualStyleBackColor = true;
//
// EnableRootMotionCheckBox
//
this.EnableRootMotionCheckBox.AutoSize = true;
this.EnableRootMotionCheckBox.Location = new System.Drawing.Point(54, 503);
this.EnableRootMotionCheckBox.Name = "EnableRootMotionCheckBox";
this.EnableRootMotionCheckBox.Size = new System.Drawing.Size(114, 17);
this.EnableRootMotionCheckBox.TabIndex = 32;
this.EnableRootMotionCheckBox.Text = "Enable root motion";
this.EnableRootMotionCheckBox.UseVisualStyleBackColor = true;
this.EnableRootMotionCheckBox.CheckedChanged += new System.EventHandler(this.EnableRootMotionCheckBox_CheckedChanged);
//
// label23
//
this.label23.AutoSize = true;
@@ -726,7 +737,6 @@
this.ClipComboBox.Name = "ClipComboBox";
this.ClipComboBox.Size = new System.Drawing.Size(182, 21);
this.ClipComboBox.TabIndex = 29;
this.ClipComboBox.SelectedIndexChanged += new System.EventHandler(this.ClipComboBox_SelectedIndexChanged);
this.ClipComboBox.TextChanged += new System.EventHandler(this.ClipComboBox_TextChanged);
//
// label21
@@ -1066,17 +1076,6 @@
this.ToolsPanel.TabIndex = 7;
this.ToolsPanel.Visible = false;
//
// EnableRootMotionCheckBox
//
this.EnableRootMotionCheckBox.AutoSize = true;
this.EnableRootMotionCheckBox.Location = new System.Drawing.Point(54, 503);
this.EnableRootMotionCheckBox.Name = "EnableRootMotionCheckBox";
this.EnableRootMotionCheckBox.Size = new System.Drawing.Size(114, 17);
this.EnableRootMotionCheckBox.TabIndex = 32;
this.EnableRootMotionCheckBox.Text = "Enable root motion";
this.EnableRootMotionCheckBox.UseVisualStyleBackColor = true;
this.EnableRootMotionCheckBox.CheckedChanged += new System.EventHandler(this.EnableRootMotionCheckBox_CheckedChanged);
//
// PedsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+2 -17
View File
@@ -1007,24 +1007,14 @@ namespace CodeWalker.Peds
}
List<string> items = new List<string>();
foreach (var cme in ycd.ClipMapEntries)
{
var animclip = cme.Clip as ClipAnimation;
if (animclip != null)
if (cme.Clip != null)
{
items.Add(animclip.ShortName);
continue;
}
var animcliplist = cme.Clip as ClipAnimationList;
if (animcliplist?.Animations?.Data != null)
{
items.Add(animcliplist.ShortName);
continue;
items.Add(cme.Clip.ShortName);
}
}
items.Sort();
foreach (var item in items)
{
@@ -1871,11 +1861,6 @@ namespace CodeWalker.Peds
LoadClipDict(ClipDictComboBox.Text);
}
private void ClipComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
SelectClip(ClipComboBox.Text);
}
private void ClipComboBox_TextChanged(object sender, EventArgs e)
{
SelectClip(ClipComboBox.Text);