more tweaks to the Analog Stick variable size logic, and positioning fixes to Genesis mouse schema

This commit is contained in:
adelikat 2014-07-06 17:02:35 +00:00
parent 2225811743
commit b9bb1635a1
4 changed files with 9 additions and 8 deletions

View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Windows.Forms;
using BizHawk.Emulation.Common;
using System.Drawing;
namespace BizHawk.Client.EmuHawk
{
@ -69,6 +70,7 @@ namespace BizHawk.Client.EmuHawk
{
Name = button.Name,
Location = button.Location,
Size = new Size(button.MaxValue + 79, button.MaxValue + 9), // TODO: don't use hardcoded values here, at least make them defaults in the AnalogStick object itself
RangeX = button.MaxValue,
RangeY = button.MaxValue // TODO ability to pass in a different Y max
});

View File

@ -24,7 +24,6 @@ namespace BizHawk.Client.EmuHawk
private void VirtualPadAnalogStick_Load(object sender, EventArgs e)
{
this.Size = new System.Drawing.Size(204 + (RangeX - 127), 136 + (RangeY - 127));
AnalogStick.Name = Name;
AnalogStick.XName = Name;
AnalogStick.YName = Name.Replace("X", "Y"); // TODO: allow schema to dictate this but this is a convenient default

View File

@ -158,8 +158,8 @@ namespace BizHawk.Client.EmuHawk
{
// Background
e.Graphics.FillRectangle(GrayBrush, 0, 0, MaxX, MaxY);
e.Graphics.FillEllipse(ReadOnly ? OffWhiteBrush : WhiteBrush, 0, 0, MaxX - 3, MaxY - 3);
e.Graphics.DrawEllipse(BlackPen, 0, 0, MaxX - 3, MaxY - 3);
e.Graphics.FillEllipse(ReadOnly ? OffWhiteBrush : WhiteBrush, 0, 0, MaxX - 1, MaxY - 3);
e.Graphics.DrawEllipse(BlackPen, 0, 0, MaxX - 1, MaxY - 3);
e.Graphics.DrawLine(BlackPen, MidX, 0, MidX, MaxY);
e.Graphics.DrawLine(BlackPen, 0, MidY, MaxX, MidY);

View File

@ -258,7 +258,7 @@ namespace BizHawk.Client.EmuHawk
{
DisplayName = "Mouse",
IsConsole = false,
DefaultSize = new Size(550, 290),
DefaultSize = new Size(418, 290),
Buttons = new[]
{
new PadSchema.ButtonScema
@ -277,28 +277,28 @@ namespace BizHawk.Client.EmuHawk
{
Name = "P" + controller + " Mouse Left",
DisplayName = "Left",
Location = new Point(335, 17),
Location = new Point(365, 17),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "P" + controller + " Mouse Center",
DisplayName = "Center",
Location = new Point(335, 40),
Location = new Point(365, 40),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "P" + controller + " Mouse Right",
DisplayName = "Right",
Location = new Point(335, 63),
Location = new Point(365, 63),
Type = PadSchema.PadInputType.Boolean
},
new PadSchema.ButtonScema
{
Name = "P" + controller + " Mouse Start",
DisplayName = "Start",
Location = new Point(335, 86),
Location = new Point(365, 86),
Type = PadSchema.PadInputType.Boolean
}
}