Big Nametable

This commit is contained in:
andres.delikat 2011-03-13 19:23:34 +00:00
parent b186e0ed5d
commit 1d73742000
2 changed files with 21 additions and 9 deletions

View File

@ -58,7 +58,7 @@
this.PatternGroup.Controls.Add(this.Table2PaletteLabel);
this.PatternGroup.Controls.Add(this.Table1PaletteLabel);
this.PatternGroup.Controls.Add(this.PatternView);
this.PatternGroup.Location = new System.Drawing.Point(12, 26);
this.PatternGroup.Location = new System.Drawing.Point(548, 185);
this.PatternGroup.Name = "PatternGroup";
this.PatternGroup.Size = new System.Drawing.Size(272, 169);
this.PatternGroup.TabIndex = 0;
@ -98,7 +98,7 @@
// PalettesGroup
//
this.PalettesGroup.Controls.Add(this.PaletteView);
this.PalettesGroup.Location = new System.Drawing.Point(12, 214);
this.PalettesGroup.Location = new System.Drawing.Point(548, 360);
this.PalettesGroup.Name = "PalettesGroup";
this.PalettesGroup.Size = new System.Drawing.Size(272, 65);
this.PalettesGroup.TabIndex = 1;
@ -122,7 +122,7 @@
this.DetailsBox.Controls.Add(this.ValueLabel);
this.DetailsBox.Controls.Add(this.AddressLabel);
this.DetailsBox.Controls.Add(this.SectionLabel);
this.DetailsBox.Location = new System.Drawing.Point(18, 302);
this.DetailsBox.Location = new System.Drawing.Point(557, 28);
this.DetailsBox.Name = "DetailsBox";
this.DetailsBox.Size = new System.Drawing.Size(177, 129);
this.DetailsBox.TabIndex = 2;
@ -171,7 +171,7 @@
this.toolStripDropDownButton1});
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(620, 25);
this.toolStrip1.Size = new System.Drawing.Size(832, 25);
this.toolStrip1.TabIndex = 3;
this.toolStrip1.Text = "toolStrip1";
//
@ -205,9 +205,9 @@
// NameTableGroup
//
this.NameTableGroup.Controls.Add(this.NameTableView);
this.NameTableGroup.Location = new System.Drawing.Point(302, 28);
this.NameTableGroup.Location = new System.Drawing.Point(12, 28);
this.NameTableGroup.Name = "NameTableGroup";
this.NameTableGroup.Size = new System.Drawing.Size(284, 251);
this.NameTableGroup.Size = new System.Drawing.Size(525, 472);
this.NameTableGroup.TabIndex = 4;
this.NameTableGroup.TabStop = false;
this.NameTableGroup.Text = "Name Tables";
@ -217,14 +217,14 @@
this.NameTableView.BackColor = System.Drawing.Color.White;
this.NameTableView.Location = new System.Drawing.Point(6, 15);
this.NameTableView.Name = "NameTableView";
this.NameTableView.Size = new System.Drawing.Size(256, 224);
this.NameTableView.Size = new System.Drawing.Size(512, 480);
this.NameTableView.TabIndex = 0;
//
// NESPPU
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(620, 480);
this.ClientSize = new System.Drawing.Size(832, 618);
this.Controls.Add(this.NameTableGroup);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.DetailsBox);

View File

@ -10,8 +10,13 @@ namespace BizHawk.MultiClient
{
public class NameTableViewer : Control
{
Size pSize;
public Bitmap nametables;
public NameTableViewer()
{
pSize = new Size(512, 480);
nametables = new Bitmap(pSize.Width, pSize.Height);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
@ -19,6 +24,13 @@ namespace BizHawk.MultiClient
this.BackColor = Color.White;
this.Paint += new System.Windows.Forms.PaintEventHandler(this.NameTableViewer_Paint);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.NameTableViewer_KeyDown);
for (int x = 0; x < nametables.Size.Width; x++)
{
for (int y = 0; y < nametables.Size.Height; y++)
{
nametables.SetPixel(x, y, Color.Black);
}
}
}
private void NameTableViewer_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { }
@ -27,7 +39,7 @@ namespace BizHawk.MultiClient
{
unchecked
{
g.DrawImage(nametables, 1, 1);
}
}