Virtualpad Target screen - cleanup some unneeded code

This commit is contained in:
adelikat 2014-07-04 15:12:14 +00:00
parent 3b9d99f763
commit 5c8cf8b141
6 changed files with 4 additions and 18 deletions

View File

@ -78,7 +78,6 @@ namespace BizHawk.Client.EmuHawk
Location = button.Location,
XName = button.Name,
YName = button.SecondaryNames[0],
FireButton = button.SecondaryNames[1],
Size = button.TargetSize,
RangeX = button.MaxValue,
RangeY = button.MaxValue // TODO: ability to have a different Y than X

View File

@ -18,6 +18,9 @@ namespace BizHawk.Client.EmuHawk
private bool _isDragging;
private bool _readonly;
private bool _isSet; // The tool has to keep track of this because there is currently no way to know if a float button is being autoheld or just held
private int? overrideX = null;
private int? overrideY = null;
public VirtualPadTargetScreen()
{
@ -42,8 +45,6 @@ namespace BizHawk.Client.EmuHawk
Refresh();
}
int? overrideX = null;
int? overrideY = null;
public void Set(IController controller)
{
var newX = controller.GetFloat(XName) / MultiplierX;
@ -146,7 +147,6 @@ namespace BizHawk.Client.EmuHawk
public string XName { get; set; }
public string YName { get; set; }
public string FireButton { get; set; } // Fire, Press, etc
public int X
{
@ -212,14 +212,6 @@ namespace BizHawk.Client.EmuHawk
}
}
public bool Fire
{
get
{
return Global.StickyXORAdapter.IsPressed(FireButton);
}
}
private void UpdatePanelFromNumeric()
{
if (!_isProgrammicallyChangingNumerics)

View File

@ -200,7 +200,6 @@ namespace BizHawk.Client.EmuHawk
SecondaryNames = new []
{
"P" + controller + " HPos",
"P" + controller + " Trigger",
}
},
new PadSchema.ButtonScema

View File

@ -232,7 +232,6 @@ namespace BizHawk.Client.EmuHawk
SecondaryNames = new []
{
"P" + controller + " Lightgun Y",
"P" + controller + " Lightgun Trigger"
}
},
new PadSchema.ButtonScema
@ -271,7 +270,6 @@ namespace BizHawk.Client.EmuHawk
SecondaryNames = new []
{
"P" + controller + " Mouse Y",
"P" + controller + " Mouse Left"
}
},
new PadSchema.ButtonScema

View File

@ -365,7 +365,6 @@ namespace BizHawk.Client.EmuHawk
SecondaryNames = new []
{
"P" + controller + " Zapper Y",
"P" + controller + " Fire"
}
},
new PadSchema.ButtonScema
@ -526,7 +525,6 @@ namespace BizHawk.Client.EmuHawk
SecondaryNames = new []
{
"P" + controller + " Pen Y",
"P" + controller + " Click"
}
},
new PadSchema.ButtonScema

View File

@ -28,7 +28,7 @@ namespace BizHawk.Client.EmuHawk
public Point Location { get; set; }
public Bitmap Icon { get; set; }
public Size TargetSize { get; set; } // Specifically for TargetedPair, specifies the screen size
public string[] SecondaryNames { get; set; } // Any other buttons necessary to operate (such as the Y axis, fire buttons, etc
public string[] SecondaryNames { get; set; } // Any other buttons necessary to operate (such as the Y axis)
public int MaxValue { get; set; } // For non-boolean values, specifies the maximum value the button allows
}
}