Some fixing up of how pads are added, don't set 0,0 on the TartScreen widget when clearing
This commit is contained in:
parent
140aec6a4d
commit
4b23150d14
|
@ -899,6 +899,7 @@
|
|||
<DependentUpon>VirtualPadTargetScreen.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\VirtualPads\IVirtualPad.cs" />
|
||||
<Compile Include="tools\VirtualPads\schema\IVirtualPadSchema.cs" />
|
||||
<Compile Include="tools\VirtualPads\schema\N64Schema.cs" />
|
||||
<Compile Include="tools\VirtualPads\schema\NesSchema.cs" />
|
||||
<Compile Include="tools\VirtualPads\schema\PadSchema.cs" />
|
||||
|
|
|
@ -83,21 +83,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
switch(Global.Emulator.SystemId)
|
||||
{
|
||||
case "NES":
|
||||
ControllerBox.Controls.Add(new VirtualPad(
|
||||
NesSchema.StandardController(1))
|
||||
{
|
||||
Location = new Point(15, 15)
|
||||
});
|
||||
//ControllerBox.Controls.Add(new VirtualPad(
|
||||
// NesSchema.StandardController(2))
|
||||
// {
|
||||
// Location = new Point(200, 15)
|
||||
// });
|
||||
ControllerBox.Controls.Add(new VirtualPad(
|
||||
NesSchema.Zapper(2))
|
||||
{
|
||||
Location = new Point(200, 15)
|
||||
});
|
||||
ControllerBox.Controls.AddRange(new NesSchema().GetPads().ToArray());
|
||||
break;
|
||||
case "N64":
|
||||
ControllerBox.Controls.Add(new VirtualPad(
|
||||
|
|
|
@ -96,8 +96,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public void Clear()
|
||||
{
|
||||
X = 0;
|
||||
Y = 0;
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
private void UpdatePanelFromNumeric()
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public interface IVirtualPadSchema
|
||||
{
|
||||
IEnumerable<VirtualPad> GetPads();
|
||||
}
|
||||
}
|
|
@ -1,10 +1,24 @@
|
|||
using System.Drawing;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public static class NesSchema
|
||||
public class NesSchema : IVirtualPadSchema
|
||||
{
|
||||
public static PadSchema StandardController(int controller)
|
||||
public IEnumerable<VirtualPad> GetPads()
|
||||
{
|
||||
yield return new VirtualPad(StandardController(1))
|
||||
{
|
||||
Location = new Point(15, 15)
|
||||
};
|
||||
|
||||
yield return new VirtualPad(Zapper(2))
|
||||
{
|
||||
Location = new Point(200, 15)
|
||||
};
|
||||
}
|
||||
|
||||
private static PadSchema StandardController(int controller)
|
||||
{
|
||||
return new PadSchema
|
||||
{
|
||||
|
@ -76,8 +90,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
};
|
||||
}
|
||||
|
||||
// TODO
|
||||
public static PadSchema Zapper(int controller)
|
||||
private static PadSchema Zapper(int controller)
|
||||
{
|
||||
return new PadSchema
|
||||
{
|
||||
|
@ -109,13 +122,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
// TODO
|
||||
public static PadSchema ArkanoidPaddle()
|
||||
private static PadSchema ArkanoidPaddle()
|
||||
{
|
||||
return new PadSchema();
|
||||
}
|
||||
|
||||
// TODO
|
||||
public static PadSchema PowerPad()
|
||||
private static PadSchema PowerPad()
|
||||
{
|
||||
return new PadSchema();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue