TAStudio - more fixups, current frame always in view, better images for tool buttons, fix read-only toggle, Gui cleanups

This commit is contained in:
andres.delikat 2011-06-11 23:54:35 +00:00
parent b527b91252
commit cd849d9614
11 changed files with 163 additions and 59 deletions

View File

@ -520,6 +520,10 @@
<Content Include="corphawk.ico" />
<None Include="images\FastForward.png" />
<None Include="images\ReadOnly.png" />
<None Include="images\Back.png" />
<None Include="images\BackMore.png" />
<None Include="images\Forward.png" />
<None Include="images\ForwardMore.png" />
<Content Include="output\gamedb.txt" />
<Content Include="output\gamedb_neshomebrew.txt" />
<None Include="images\Refresh.bmp" />

View File

@ -2035,6 +2035,15 @@ namespace BizHawk.MultiClient
Global.RenderPanel.AddMessage("Movie read+write mode");
}
public void SetReadOnly(bool read_only)
{
ReadOnly = read_only;
if (ReadOnly)
Global.RenderPanel.AddMessage("Movie read-only mode");
else
Global.RenderPanel.AddMessage("Movie read+write mode");
}
private void readonlyToolStripMenuItem_Click(object sender, EventArgs e)
{
ToggleReadOnly();

View File

@ -60,6 +60,20 @@ namespace BizHawk.MultiClient.Properties {
}
}
internal static System.Drawing.Bitmap Back {
get {
object obj = ResourceManager.GetObject("Back", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap BackMore {
get {
object obj = ResourceManager.GetObject("BackMore", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap BuilderDialog_delete {
get {
object obj = ResourceManager.GetObject("BuilderDialog_delete", resourceCulture);
@ -123,6 +137,20 @@ namespace BizHawk.MultiClient.Properties {
}
}
internal static System.Drawing.Bitmap Forward {
get {
object obj = ResourceManager.GetObject("Forward", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap ForwardMore {
get {
object obj = ResourceManager.GetObject("ForwardMore", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap GBController {
get {
object obj = ResourceManager.GetObject("GBController", resourceCulture);

View File

@ -651,6 +651,18 @@
<data name="FastForward" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\FastForward.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Back" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Back.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="BackMore" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\BackMore.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Forward" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Forward.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ForwardMore" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\ForwardMore.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ReadOnly" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\ReadOnly.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

View File

@ -45,24 +45,27 @@
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.insertFrameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.restoreWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TASView = new BizHawk.VirtualListView();
this.Frame = new System.Windows.Forms.ColumnHeader();
this.Log = new System.Windows.Forms.ColumnHeader();
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.RewindToBeginning = new System.Windows.Forms.ToolStripButton();
this.RewindButton = new System.Windows.Forms.ToolStripButton();
this.FrameAdvanceButton = new System.Windows.Forms.ToolStripButton();
this.PauseButton = new System.Windows.Forms.ToolStripButton();
this.FrameAdvanceButton = new System.Windows.Forms.ToolStripButton();
this.FastFowardToEnd = new System.Windows.Forms.ToolStripButton();
this.toolStrip2 = new System.Windows.Forms.ToolStrip();
this.StopButton = new System.Windows.Forms.ToolStripButton();
this.PlayMovieFromBeginning = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.ReadOnlyCheckBox = new System.Windows.Forms.CheckBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.Frame = new System.Windows.Forms.ColumnHeader();
this.menuStrip1.SuspendLayout();
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
this.toolStripContainer1.SuspendLayout();
@ -177,9 +180,20 @@
//
// editToolStripMenuItem
//
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.insertFrameToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
this.editToolStripMenuItem.Text = "&Edit";
this.editToolStripMenuItem.DropDownOpened += new System.EventHandler(this.editToolStripMenuItem_DropDownOpened);
//
// insertFrameToolStripMenuItem
//
this.insertFrameToolStripMenuItem.Name = "insertFrameToolStripMenuItem";
this.insertFrameToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
this.insertFrameToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.insertFrameToolStripMenuItem.Text = "Insert Frame";
this.insertFrameToolStripMenuItem.Click += new System.EventHandler(this.insertFrameToolStripMenuItem_Click);
//
// settingsToolStripMenuItem
//
@ -228,6 +242,10 @@
this.TASView.UseCompatibleStateImageBehavior = false;
this.TASView.View = System.Windows.Forms.View.Details;
//
// Frame
//
this.Frame.Text = "Frame";
//
// Log
//
this.Log.Text = "Log";
@ -238,10 +256,10 @@
//
// toolStripContainer1.ContentPanel
//
this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(150, 125);
this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(172, 125);
this.toolStripContainer1.Location = new System.Drawing.Point(427, 38);
this.toolStripContainer1.Name = "toolStripContainer1";
this.toolStripContainer1.Size = new System.Drawing.Size(150, 175);
this.toolStripContainer1.Size = new System.Drawing.Size(172, 175);
this.toolStripContainer1.TabIndex = 2;
this.toolStripContainer1.Text = "toolStripContainer1";
//
@ -254,19 +272,31 @@
//
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButton1,
this.RewindToBeginning,
this.RewindButton,
this.PauseButton,
this.FrameAdvanceButton});
this.FrameAdvanceButton,
this.FastFowardToEnd});
this.toolStrip1.Location = new System.Drawing.Point(3, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(102, 25);
this.toolStrip1.Size = new System.Drawing.Size(125, 25);
this.toolStrip1.TabIndex = 0;
//
// RewindToBeginning
//
this.RewindToBeginning.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.RewindToBeginning.Image = global::BizHawk.MultiClient.Properties.Resources.BackMore;
this.RewindToBeginning.ImageTransparentColor = System.Drawing.Color.Magenta;
this.RewindToBeginning.Name = "RewindToBeginning";
this.RewindToBeginning.Size = new System.Drawing.Size(23, 22);
this.RewindToBeginning.Text = "<<";
this.RewindToBeginning.ToolTipText = "Rewind to Beginning";
this.RewindToBeginning.Click += new System.EventHandler(this.RewindToBeginning_Click);
//
// RewindButton
//
this.RewindButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.RewindButton.Image = ((System.Drawing.Image)(resources.GetObject("RewindButton.Image")));
this.RewindButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.RewindButton.Image = global::BizHawk.MultiClient.Properties.Resources.Back;
this.RewindButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.RewindButton.Name = "RewindButton";
this.RewindButton.Size = new System.Drawing.Size(23, 22);
@ -274,17 +304,6 @@
this.RewindButton.ToolTipText = "Rewind";
this.RewindButton.Click += new System.EventHandler(this.RewindButton_Click);
//
// FrameAdvanceButton
//
this.FrameAdvanceButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.FrameAdvanceButton.Image = global::BizHawk.MultiClient.Properties.Resources.Debugger;
this.FrameAdvanceButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.FrameAdvanceButton.Name = "FrameAdvanceButton";
this.FrameAdvanceButton.Size = new System.Drawing.Size(23, 22);
this.FrameAdvanceButton.Text = ">";
this.FrameAdvanceButton.ToolTipText = "Frame Advance";
this.FrameAdvanceButton.Click += new System.EventHandler(this.FrameAdvanceButton_Click);
//
// PauseButton
//
this.PauseButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -296,15 +315,38 @@
this.PauseButton.ToolTipText = "Pause";
this.PauseButton.Click += new System.EventHandler(this.PauseButton_Click);
//
// FrameAdvanceButton
//
this.FrameAdvanceButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.FrameAdvanceButton.Image = global::BizHawk.MultiClient.Properties.Resources.Forward;
this.FrameAdvanceButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.FrameAdvanceButton.Name = "FrameAdvanceButton";
this.FrameAdvanceButton.Size = new System.Drawing.Size(23, 22);
this.FrameAdvanceButton.Text = ">";
this.FrameAdvanceButton.ToolTipText = "Frame Advance";
this.FrameAdvanceButton.Click += new System.EventHandler(this.FrameAdvanceButton_Click);
//
// FastFowardToEnd
//
this.FastFowardToEnd.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.FastFowardToEnd.Image = global::BizHawk.MultiClient.Properties.Resources.ForwardMore;
this.FastFowardToEnd.ImageTransparentColor = System.Drawing.Color.Magenta;
this.FastFowardToEnd.Name = "FastFowardToEnd";
this.FastFowardToEnd.Size = new System.Drawing.Size(23, 22);
this.FastFowardToEnd.Text = ">>";
this.FastFowardToEnd.ToolTipText = "Fast Foward To End";
this.FastFowardToEnd.Click += new System.EventHandler(this.FastForwardToEnd_Click);
//
// toolStrip2
//
this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None;
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.StopButton,
this.PlayMovieFromBeginning,
this.toolStripSeparator4});
this.toolStrip2.Location = new System.Drawing.Point(3, 25);
this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.Size = new System.Drawing.Size(39, 25);
this.toolStrip2.Size = new System.Drawing.Size(62, 25);
this.toolStrip2.TabIndex = 1;
//
// StopButton
@ -316,6 +358,16 @@
this.StopButton.Size = new System.Drawing.Size(23, 22);
this.StopButton.Text = "Stop Movie";
//
// PlayMovieFromBeginning
//
this.PlayMovieFromBeginning.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.PlayMovieFromBeginning.Image = ((System.Drawing.Image)(resources.GetObject("PlayMovieFromBeginning.Image")));
this.PlayMovieFromBeginning.ImageTransparentColor = System.Drawing.Color.Magenta;
this.PlayMovieFromBeginning.Name = "PlayMovieFromBeginning";
this.PlayMovieFromBeginning.Size = new System.Drawing.Size(23, 22);
this.PlayMovieFromBeginning.Text = "|";
this.PlayMovieFromBeginning.ToolTipText = "Rewind to Beginning";
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
@ -328,7 +380,7 @@
this.ReadOnlyCheckBox.BackColor = System.Drawing.SystemColors.Control;
this.ReadOnlyCheckBox.Image = global::BizHawk.MultiClient.Properties.Resources.ReadOnly;
this.ReadOnlyCheckBox.ImageAlign = System.Drawing.ContentAlignment.BottomRight;
this.ReadOnlyCheckBox.Location = new System.Drawing.Point(583, 38);
this.ReadOnlyCheckBox.Location = new System.Drawing.Point(605, 38);
this.ReadOnlyCheckBox.Name = "ReadOnlyCheckBox";
this.ReadOnlyCheckBox.Size = new System.Drawing.Size(22, 22);
this.ReadOnlyCheckBox.TabIndex = 3;
@ -336,21 +388,6 @@
this.ReadOnlyCheckBox.UseVisualStyleBackColor = false;
this.ReadOnlyCheckBox.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
this.toolStripButton1.Text = "|";
this.toolStripButton1.ToolTipText = "Rewind to Beginning";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// Frame
//
this.Frame.Text = "Frame";
//
// TAStudio
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -413,7 +450,10 @@
private System.Windows.Forms.ToolStripMenuItem autoloadToolStripMenuItem;
private System.Windows.Forms.CheckBox ReadOnlyCheckBox;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.ColumnHeader Frame;
private System.Windows.Forms.ToolStripButton RewindToBeginning;
private System.Windows.Forms.ToolStripButton FastFowardToEnd;
private System.Windows.Forms.ToolStripButton PlayMovieFromBeginning;
private System.Windows.Forms.ToolStripMenuItem insertFrameToolStripMenuItem;
}
}

View File

@ -46,6 +46,7 @@ namespace BizHawk.MultiClient
private void DisplayList()
{
TASView.ItemCount = Global.MainForm.UserMovie.GetMovieLength();
TASView.ensureVisible(Global.Emulator.Frame);
}
private void TAStudio_Load(object sender, EventArgs e)
@ -123,7 +124,7 @@ namespace BizHawk.MultiClient
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
Global.MainForm.ToggleReadOnly();
Global.MainForm.SetReadOnly(ReadOnlyCheckBox.Checked);
if (ReadOnlyCheckBox.Checked)
{
ReadOnlyCheckBox.BackColor = System.Drawing.SystemColors.Control;
@ -140,5 +141,33 @@ namespace BizHawk.MultiClient
{
Global.MainForm.PlayMovieFromBeginning();
}
private void RewindToBeginning_Click(object sender, EventArgs e)
{
}
private void FastForwardToEnd_Click(object sender, EventArgs e)
{
}
private void editToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
{
if (Global.MainForm.ReadOnly)
{
insertFrameToolStripMenuItem.Enabled = false;
}
else
{
insertFrameToolStripMenuItem.Enabled = true;
}
}
private void insertFrameToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Global.MainForm.ReadOnly)
return;
}
}
}

View File

@ -127,7 +127,7 @@
<value>225, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="RewindButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="PlayMovieFromBeginning.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
@ -145,24 +145,6 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>324, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>324, 17</value>
</metadata>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAgxJREFUOE+lkvtL
U2EYx+0PEbtpFwnBKPGKiJImGP0gYhIYs1E5GF5gIxkpA00JRSmMEF0ohMh+GaRWYlqabMVcNdS2QpaI
VqiDIYhk397vA6fXhCjyhYdzeM/5fp7vczkAdeL2cwho7v/wWzT1zcN+Pwhr51uY2/y41PQaF+wzKKiZ
QvaN58g0jyLd5KEUcQbg+84P/Cm2tncQjW3j68YWIqubCC3FcOJc478BAuGoZM6zvoRnakXEruEIjhc4
/g5gZop9c+voGAyLbQIfeBZxLL9BA1jzXvuGbWamuKh+GmmVbswE19A59FEBbmoAG7YbsLtm2mZmiml9
cvabNDwpz6YB7LYBoMXCumkJr7LOmnnHzBQ/9X2Bo2cOibm1GsBREbAQiYmw/8lnuCeWkVzcgnZlnw1j
3HV/wuNXK6i/9x5Hc6wawDlTXHbLJ+LZUBQPRyKwdQdxutwl1h+NLXHh5Ht1ewBHsiwawCW57HyDAfWR
dvl0uhZQ1eqX8aVc7EKLqrum651ATLf9OJx5XQM4KmY0xPzZ0hFAiQJnXB0WwME0E3IsL5B17ZlADqWb
NYDrOepdlcysmTWWOrxqbceRWtaLk0VO1XW72D5Vckd2gMBfq8zdpmUG62NJvKM4+XyziDk24xmfWoGE
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA