TAStudio - make virtualpads load dynamically, load 2 nes pads if an nes controller
This commit is contained in:
parent
15d7148926
commit
45414435b4
|
@ -64,15 +64,13 @@
|
||||||
this.insertFrameToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
this.insertFrameToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
this.ControllerBox = new System.Windows.Forms.GroupBox();
|
||||||
this.Pad1 = new BizHawk.MultiClient.VirtualPadNES();
|
|
||||||
this.TASView = new BizHawk.VirtualListView();
|
this.TASView = new BizHawk.VirtualListView();
|
||||||
this.Frame = new System.Windows.Forms.ColumnHeader();
|
this.Frame = new System.Windows.Forms.ColumnHeader();
|
||||||
this.Log = new System.Windows.Forms.ColumnHeader();
|
this.Log = new System.Windows.Forms.ColumnHeader();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
this.contextMenuStrip1.SuspendLayout();
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
this.groupBox1.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// menuStrip1
|
// menuStrip1
|
||||||
|
@ -143,18 +141,18 @@
|
||||||
// nToolStripMenuItem
|
// nToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.nToolStripMenuItem.Name = "nToolStripMenuItem";
|
this.nToolStripMenuItem.Name = "nToolStripMenuItem";
|
||||||
this.nToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.nToolStripMenuItem.Size = new System.Drawing.Size(110, 22);
|
||||||
this.nToolStripMenuItem.Text = "None";
|
this.nToolStripMenuItem.Text = "None";
|
||||||
//
|
//
|
||||||
// toolStripSeparator3
|
// toolStripSeparator3
|
||||||
//
|
//
|
||||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||||
this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6);
|
this.toolStripSeparator3.Size = new System.Drawing.Size(107, 6);
|
||||||
//
|
//
|
||||||
// clearToolStripMenuItem
|
// clearToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
|
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
|
||||||
this.clearToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
this.clearToolStripMenuItem.Size = new System.Drawing.Size(110, 22);
|
||||||
this.clearToolStripMenuItem.Text = "Clear";
|
this.clearToolStripMenuItem.Text = "Clear";
|
||||||
//
|
//
|
||||||
// toolStripSeparator1
|
// toolStripSeparator1
|
||||||
|
@ -358,23 +356,14 @@
|
||||||
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
|
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
|
||||||
this.selectAllToolStripMenuItem.Text = "Select All";
|
this.selectAllToolStripMenuItem.Text = "Select All";
|
||||||
//
|
//
|
||||||
// groupBox1
|
// ControllerBox
|
||||||
//
|
//
|
||||||
this.groupBox1.Controls.Add(this.Pad1);
|
this.ControllerBox.Location = new System.Drawing.Point(300, 55);
|
||||||
this.groupBox1.Location = new System.Drawing.Point(300, 55);
|
this.ControllerBox.Name = "ControllerBox";
|
||||||
this.groupBox1.Name = "groupBox1";
|
this.ControllerBox.Size = new System.Drawing.Size(367, 197);
|
||||||
this.groupBox1.Size = new System.Drawing.Size(367, 197);
|
this.ControllerBox.TabIndex = 4;
|
||||||
this.groupBox1.TabIndex = 4;
|
this.ControllerBox.TabStop = false;
|
||||||
this.groupBox1.TabStop = false;
|
this.ControllerBox.Text = "Controllers";
|
||||||
this.groupBox1.Text = "Controllers";
|
|
||||||
//
|
|
||||||
// Pad1
|
|
||||||
//
|
|
||||||
this.Pad1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
|
||||||
this.Pad1.Location = new System.Drawing.Point(6, 19);
|
|
||||||
this.Pad1.Name = "Pad1";
|
|
||||||
this.Pad1.Size = new System.Drawing.Size(174, 74);
|
|
||||||
this.Pad1.TabIndex = 0;
|
|
||||||
//
|
//
|
||||||
// TASView
|
// TASView
|
||||||
//
|
//
|
||||||
|
@ -411,7 +400,7 @@
|
||||||
this.Controls.Add(this.menuStrip1);
|
this.Controls.Add(this.menuStrip1);
|
||||||
this.Controls.Add(this.ReadOnlyCheckBox);
|
this.Controls.Add(this.ReadOnlyCheckBox);
|
||||||
this.Controls.Add(this.TASView);
|
this.Controls.Add(this.TASView);
|
||||||
this.Controls.Add(this.groupBox1);
|
this.Controls.Add(this.ControllerBox);
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
this.MainMenuStrip = this.menuStrip1;
|
this.MainMenuStrip = this.menuStrip1;
|
||||||
this.Name = "TAStudio";
|
this.Name = "TAStudio";
|
||||||
|
@ -422,7 +411,6 @@
|
||||||
this.toolStrip1.ResumeLayout(false);
|
this.toolStrip1.ResumeLayout(false);
|
||||||
this.toolStrip1.PerformLayout();
|
this.toolStrip1.PerformLayout();
|
||||||
this.contextMenuStrip1.ResumeLayout(false);
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
this.groupBox1.ResumeLayout(false);
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -465,8 +453,7 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem insertFrameToolStripMenuItem1;
|
private System.Windows.Forms.ToolStripMenuItem insertFrameToolStripMenuItem1;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||||
private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
|
||||||
private System.Windows.Forms.GroupBox groupBox1;
|
private System.Windows.Forms.GroupBox ControllerBox;
|
||||||
private VirtualPadNES Pad1;
|
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
|
||||||
private System.Windows.Forms.ToolStripButton StopButton;
|
private System.Windows.Forms.ToolStripButton StopButton;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace BizHawk.MultiClient
|
||||||
public partial class TAStudio : Form
|
public partial class TAStudio : Form
|
||||||
{
|
{
|
||||||
//TODO:
|
//TODO:
|
||||||
|
//If null emulator do a base virtualpad so getmnemonic doesn't fail
|
||||||
//Right-click - Go to current frame
|
//Right-click - Go to current frame
|
||||||
//Clicking a frame should go there
|
//Clicking a frame should go there
|
||||||
//Multiple timeline system
|
//Multiple timeline system
|
||||||
|
@ -27,6 +28,7 @@ namespace BizHawk.MultiClient
|
||||||
int defaultHeight;
|
int defaultHeight;
|
||||||
|
|
||||||
public bool Engaged; //When engaged the Client will listen to TAStudio for input
|
public bool Engaged; //When engaged the Client will listen to TAStudio for input
|
||||||
|
List<VirtualPad> Pads = new List<VirtualPad>();
|
||||||
|
|
||||||
//Movie header object - to have the main project header data
|
//Movie header object - to have the main project header data
|
||||||
//List<string> MacroFiles - list of .macro files (simply log files)
|
//List<string> MacroFiles - list of .macro files (simply log files)
|
||||||
|
@ -54,7 +56,9 @@ namespace BizHawk.MultiClient
|
||||||
public string GetMnemonic()
|
public string GetMnemonic()
|
||||||
{
|
{
|
||||||
StringBuilder str = new StringBuilder("|0|"); //TODO: Control Command virtual pad
|
StringBuilder str = new StringBuilder("|0|"); //TODO: Control Command virtual pad
|
||||||
str.Append(Pad1.GetMnemonic());
|
|
||||||
|
for (int x = 0; x < Pads.Count; x++)
|
||||||
|
str.Append(Pads[x].GetMnemonic());
|
||||||
return str.ToString();
|
return str.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,11 +89,28 @@ namespace BizHawk.MultiClient
|
||||||
//
|
//
|
||||||
Engaged = true;
|
Engaged = true;
|
||||||
Global.RenderPanel.AddMessage("TAStudio engaged");
|
Global.RenderPanel.AddMessage("TAStudio engaged");
|
||||||
//
|
|
||||||
|
|
||||||
LoadConfigSettings();
|
LoadConfigSettings();
|
||||||
ReadOnlyCheckBox.Checked = Global.MainForm.ReadOnly;
|
ReadOnlyCheckBox.Checked = Global.MainForm.ReadOnly;
|
||||||
DisplayList();
|
DisplayList();
|
||||||
|
|
||||||
|
//Add virtual pads
|
||||||
|
switch (Global.Emulator.SystemId)
|
||||||
|
{
|
||||||
|
case "NULL":
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
case "NES":
|
||||||
|
VirtualPadNES v1 = new VirtualPadNES();
|
||||||
|
v1.Location = new Point(8, 19);
|
||||||
|
VirtualPadNES v2 = new VirtualPadNES();
|
||||||
|
v2.Location = new Point(188, 19);
|
||||||
|
Pads.Add(v1);
|
||||||
|
Pads.Add(v2);
|
||||||
|
ControllerBox.Controls.Add(Pads[0]);
|
||||||
|
ControllerBox.Controls.Add(Pads[1]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadConfigSettings()
|
private void LoadConfigSettings()
|
||||||
|
|
|
@ -154,7 +154,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
public override string GetMnemonic()
|
public override string GetMnemonic()
|
||||||
{
|
{
|
||||||
StringBuilder input = new StringBuilder("|0|"); //TODO: Reset button
|
StringBuilder input = new StringBuilder("");
|
||||||
input.Append(PR.Checked ? "R" : ".");
|
input.Append(PR.Checked ? "R" : ".");
|
||||||
input.Append(PL.Checked ? "L" : ".");
|
input.Append(PL.Checked ? "L" : ".");
|
||||||
input.Append(PD.Checked ? "D" : ".");
|
input.Append(PD.Checked ? "D" : ".");
|
||||||
|
|
Loading…
Reference in New Issue