PCE Tile Viewer - save screenshot file menu items, autoload and other tool options, add to toolbox

This commit is contained in:
adelikat 2014-04-13 20:33:01 +00:00
parent 471a2f5cf0
commit d3012fe4b6
7 changed files with 221 additions and 7 deletions

View File

@ -349,6 +349,10 @@ namespace BizHawk.Client.Common
public ToolDialogSettings SmsVdpSettings = new ToolDialogSettings();
public bool SmsVdpAutoLoad = false;
// PCE VDP Viewer Settings
public ToolDialogSettings PceVdpSettings = new ToolDialogSettings();
public bool PceVdpAutoLoad = false;
// NESPPU Settings
public ToolDialogSettings NesPPUSettings = new ToolDialogSettings();
public bool AutoLoadNESPPU = false;

View File

@ -349,6 +349,11 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.Tools.Load<PceBgViewer>();
}
if (Global.Config.PceVdpAutoLoad && Global.Emulator is PCEngine)
{
GlobalWin.Tools.Load<PCETileViewer>();
}
if (Global.Config.RecentPceCdlFiles.AutoLoad && Global.Emulator is PCEngine)
{
GlobalWin.Tools.Load<PCECDL>();

View File

@ -37,15 +37,27 @@
this.bmpViewSP = new BizHawk.Client.EmuHawk.BmpView();
this.checkBoxVDC2 = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.menuStrip1 = new MenuStripEx();
this.FileSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.saveBackgroundScreenshotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveSpriteScreenshotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.autoloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.alwaysOnTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.floatingWindowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.bmpViewBGPal);
this.groupBox1.Controls.Add(this.bmpViewBG);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Location = new System.Drawing.Point(12, 25);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(786, 281);
this.groupBox1.TabIndex = 4;
@ -73,7 +85,7 @@
//
this.groupBox2.Controls.Add(this.bmpViewSPPal);
this.groupBox2.Controls.Add(this.bmpViewSP);
this.groupBox2.Location = new System.Drawing.Point(12, 299);
this.groupBox2.Location = new System.Drawing.Point(12, 312);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(786, 281);
this.groupBox2.TabIndex = 5;
@ -100,7 +112,7 @@
// checkBoxVDC2
//
this.checkBoxVDC2.AutoSize = true;
this.checkBoxVDC2.Location = new System.Drawing.Point(12, 586);
this.checkBoxVDC2.Location = new System.Drawing.Point(12, 599);
this.checkBoxVDC2.Name = "checkBoxVDC2";
this.checkBoxVDC2.Size = new System.Drawing.Size(57, 17);
this.checkBoxVDC2.TabIndex = 6;
@ -111,28 +123,123 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(504, 593);
this.label1.Location = new System.Drawing.Point(504, 599);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(294, 13);
this.label1.TabIndex = 7;
this.label1.Text = "CTRL + C copies the pane under the mouse to the clipboard.";
//
// menuStrip1
//
this.menuStrip1.ClickThrough = true;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.FileSubMenu,
this.OptionsSubMenu});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(810, 24);
this.menuStrip1.TabIndex = 8;
this.menuStrip1.Text = "menuStrip1";
//
// FileSubMenu
//
this.FileSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.saveBackgroundScreenshotToolStripMenuItem,
this.saveSpriteScreenshotToolStripMenuItem,
this.toolStripSeparator1,
this.closeToolStripMenuItem});
this.FileSubMenu.Name = "FileSubMenu";
this.FileSubMenu.Size = new System.Drawing.Size(37, 20);
this.FileSubMenu.Text = "&File";
//
// saveBackgroundScreenshotToolStripMenuItem
//
this.saveBackgroundScreenshotToolStripMenuItem.Name = "saveBackgroundScreenshotToolStripMenuItem";
this.saveBackgroundScreenshotToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
this.saveBackgroundScreenshotToolStripMenuItem.Text = "Save BG Screenshot...";
this.saveBackgroundScreenshotToolStripMenuItem.Click += new System.EventHandler(this.saveBackgroundScreenshotToolStripMenuItem_Click);
//
// saveSpriteScreenshotToolStripMenuItem
//
this.saveSpriteScreenshotToolStripMenuItem.Name = "saveSpriteScreenshotToolStripMenuItem";
this.saveSpriteScreenshotToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
this.saveSpriteScreenshotToolStripMenuItem.Text = "Save Sprite Screenshot...";
this.saveSpriteScreenshotToolStripMenuItem.Click += new System.EventHandler(this.saveSpriteScreenshotToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(198, 6);
//
// closeToolStripMenuItem
//
this.closeToolStripMenuItem.Name = "closeToolStripMenuItem";
this.closeToolStripMenuItem.ShortcutKeyDisplayString = "Alt+F4";
this.closeToolStripMenuItem.Size = new System.Drawing.Size(201, 22);
this.closeToolStripMenuItem.Text = "&Close";
this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);
//
// OptionsSubMenu
//
this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.autoloadToolStripMenuItem,
this.saveWindowPositionToolStripMenuItem,
this.alwaysOnTopToolStripMenuItem,
this.floatingWindowToolStripMenuItem});
this.OptionsSubMenu.Name = "OptionsSubMenu";
this.OptionsSubMenu.Size = new System.Drawing.Size(61, 20);
this.OptionsSubMenu.Text = "&Options";
this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened);
//
// autoloadToolStripMenuItem
//
this.autoloadToolStripMenuItem.Name = "autoloadToolStripMenuItem";
this.autoloadToolStripMenuItem.Size = new System.Drawing.Size(191, 22);
this.autoloadToolStripMenuItem.Text = "&Autoload";
this.autoloadToolStripMenuItem.Click += new System.EventHandler(this.autoloadToolStripMenuItem_Click);
//
// saveWindowPositionToolStripMenuItem
//
this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem";
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(191, 22);
this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position";
this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click);
//
// alwaysOnTopToolStripMenuItem
//
this.alwaysOnTopToolStripMenuItem.Name = "alwaysOnTopToolStripMenuItem";
this.alwaysOnTopToolStripMenuItem.Size = new System.Drawing.Size(191, 22);
this.alwaysOnTopToolStripMenuItem.Text = "Always On Top";
this.alwaysOnTopToolStripMenuItem.Click += new System.EventHandler(this.alwaysOnTopToolStripMenuItem_Click);
//
// floatingWindowToolStripMenuItem
//
this.floatingWindowToolStripMenuItem.Name = "floatingWindowToolStripMenuItem";
this.floatingWindowToolStripMenuItem.Size = new System.Drawing.Size(191, 22);
this.floatingWindowToolStripMenuItem.Text = "Floating Window";
this.floatingWindowToolStripMenuItem.Click += new System.EventHandler(this.floatingWindowToolStripMenuItem_Click);
//
// PCETileViewer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(810, 615);
this.ClientSize = new System.Drawing.Size(810, 624);
this.Controls.Add(this.label1);
this.Controls.Add(this.checkBoxVDC2);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.menuStrip1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.MainMenuStrip = this.menuStrip1;
this.Name = "PCETileViewer";
this.Text = "Tile Viewer";
this.Load += new System.EventHandler(this.PCETileViewer_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PCETileViewer_KeyDown);
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@ -148,5 +255,16 @@
private BmpView bmpViewSPPal;
private BmpView bmpViewSP;
private System.Windows.Forms.Label label1;
private MenuStripEx menuStrip1;
private System.Windows.Forms.ToolStripMenuItem FileSubMenu;
private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveBackgroundScreenshotToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveSpriteScreenshotToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem OptionsSubMenu;
private System.Windows.Forms.ToolStripMenuItem autoloadToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem alwaysOnTopToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem floatingWindowToolStripMenuItem;
}
}

View File

@ -219,5 +219,69 @@ namespace BizHawk.Client.EmuHawk
}
}
}
private void closeToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
}
private void saveBackgroundScreenshotToolStripMenuItem_Click(object sender, EventArgs e)
{
bmpViewBG.SaveFile();
}
private void saveSpriteScreenshotToolStripMenuItem_Click(object sender, EventArgs e)
{
bmpViewSP.SaveFile();
}
private void OptionsSubMenu_DropDownOpened(object sender, EventArgs e)
{
autoloadToolStripMenuItem.Checked = Global.Config.PceVdpAutoLoad;
saveWindowPositionToolStripMenuItem.Checked = Global.Config.PceVdpSettings.SaveWindowPosition;
alwaysOnTopToolStripMenuItem.Checked = Global.Config.PceVdpSettings.TopMost;
floatingWindowToolStripMenuItem.Checked = Global.Config.PceVdpSettings.FloatingWindow;
}
private void autoloadToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.PceVdpAutoLoad ^= true;
}
private void saveWindowPositionToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.PceVdpSettings.SaveWindowPosition ^= true;
}
private void alwaysOnTopToolStripMenuItem_Click(object sender, EventArgs e)
{
TopMost = Global.Config.PceVdpSettings.TopMost ^= true;
}
private void floatingWindowToolStripMenuItem_Click(object sender, EventArgs e)
{
Global.Config.PceVdpSettings.FloatingWindow ^= true;
RefreshFloatingWindowControl();
}
private void PCETileViewer_Load(object sender, EventArgs e)
{
TopMost = Global.Config.PceVdpSettings.TopMost;
if (Global.Config.PceVdpSettings.UseWindowPosition)
{
Location = Global.Config.PceVdpSettings.WindowPosition;
}
}
private void RefreshFloatingWindowControl()
{
Owner = Global.Config.PceVdpSettings.FloatingWindow ? null : GlobalWin.MainForm;
}
protected override void OnShown(EventArgs e)
{
RefreshFloatingWindowControl();
base.OnShown(e);
}
}
}

View File

@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@ -52,6 +52,7 @@
this.GbaGpuViewerToolBarItem = new System.Windows.Forms.ToolStripButton();
this.GenesisGameGenieToolBarItem = new System.Windows.Forms.ToolStripButton();
this.SmsVdpToolbarItem = new System.Windows.Forms.ToolStripButton();
this.PceTileToolbarItem = new System.Windows.Forms.ToolStripButton();
this.ToolBoxStrip.SuspendLayout();
this.SuspendLayout();
//
@ -83,6 +84,7 @@
this.GGGameGenieToolbarItem,
this.GbGpuViewerToolBarItem,
this.GBGameGenieToolbarItem,
this.PceTileToolbarItem,
this.PceCdlToolbarItem,
this.PceBgViewerToolbarItem,
this.GbaGpuViewerToolBarItem,
@ -92,7 +94,7 @@
this.ToolBoxStrip.Location = new System.Drawing.Point(2, 2);
this.ToolBoxStrip.Name = "ToolBoxStrip";
this.ToolBoxStrip.Padding = new System.Windows.Forms.Padding(0);
this.ToolBoxStrip.Size = new System.Drawing.Size(137, 175);
this.ToolBoxStrip.Size = new System.Drawing.Size(137, 179);
this.ToolBoxStrip.Stretch = true;
this.ToolBoxStrip.TabIndex = 0;
this.ToolBoxStrip.TabStop = true;
@ -306,13 +308,24 @@
this.SmsVdpToolbarItem.Name = "SmsVdpToolbarItem";
this.SmsVdpToolbarItem.Size = new System.Drawing.Size(49, 20);
this.SmsVdpToolbarItem.Text = "VDP";
this.SmsVdpToolbarItem.ToolTipText = "SMS VDP Viewer";
this.SmsVdpToolbarItem.Click += new System.EventHandler(this.SmsVdpToolbarItem_Click);
//
// PceTileToolbarItem
//
this.PceTileToolbarItem.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.pcejin1;
this.PceTileToolbarItem.ImageTransparentColor = System.Drawing.Color.Magenta;
this.PceTileToolbarItem.Name = "PceTileToolbarItem";
this.PceTileToolbarItem.Size = new System.Drawing.Size(46, 20);
this.PceTileToolbarItem.Text = "Tile";
this.PceTileToolbarItem.ToolTipText = "PC Engine Tile Viewer";
this.PceTileToolbarItem.Click += new System.EventHandler(this.PceTileToolbarItem_Click);
//
// ToolBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(140, 179);
this.ClientSize = new System.Drawing.Size(140, 183);
this.Controls.Add(this.ToolBoxStrip);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximumSize = new System.Drawing.Size(270, 600);
@ -351,6 +364,7 @@
private System.Windows.Forms.ToolStripButton GenesisGameGenieToolBarItem;
private System.Windows.Forms.ToolStripButton PceCdlToolbarItem;
private System.Windows.Forms.ToolStripButton SmsVdpToolbarItem;
private System.Windows.Forms.ToolStripButton PceTileToolbarItem;
}
}

View File

@ -64,6 +64,7 @@ namespace BizHawk.Client.EmuHawk
PceCdlToolbarItem.Visible =
PceBgViewerToolbarItem.Visible =
PceTileToolbarItem.Visible =
Global.Emulator is PCEngine;
GBGameGenieToolbarItem.Visible =
@ -228,6 +229,11 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.Tools.Load<SmsVDPViewer>();
}
private void PceTileToolbarItem_Click(object sender, EventArgs e)
{
GlobalWin.Tools.Load<PCETileViewer>();
}
#endregion
}
}