VirtualPads - implement Set on TargetScreen control
This commit is contained in:
parent
4d9f46c6a1
commit
82d6490532
|
@ -52,7 +52,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Text = button.DisplayName,
|
Text = button.DisplayName,
|
||||||
Location = button.Location,
|
Location = button.Location,
|
||||||
Image = button.Icon,
|
Image = button.Icon,
|
||||||
ReadOnly = true
|
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case PadSchema.PadInputType.AnalogStick:
|
case PadSchema.PadInputType.AnalogStick:
|
||||||
|
|
|
@ -40,7 +40,17 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public void Set(IController controller)
|
public void Set(IController controller)
|
||||||
{
|
{
|
||||||
|
var newX = controller.GetFloat(XName);
|
||||||
|
var newY = controller.GetFloat(YName);
|
||||||
|
var changed = newX != X && newY != Y;
|
||||||
|
|
||||||
|
XNumeric.Value = (int)newX;
|
||||||
|
XNumeric.Value = (int)newY;
|
||||||
|
|
||||||
|
if (changed)
|
||||||
|
{
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ReadOnly
|
public bool ReadOnly
|
||||||
|
|
Loading…
Reference in New Issue