VirtualPad Analog button - if not in sticky mode, update every frame with the current value, and a slight tweak to read-only view
This commit is contained in:
parent
c3b57a6ddf
commit
e5b5daeaa0
|
@ -64,6 +64,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (_readonly != value)
|
||||
{
|
||||
AnalogTrackBar.Enabled =
|
||||
DisplayNameLabel.Enabled =
|
||||
ValueLabel.Enabled =
|
||||
!value;
|
||||
|
||||
|
@ -166,5 +167,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.StickyXORAdapter.SetFloat(Name, AnalogTrackBar.Value);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
if (!_isSet)
|
||||
{
|
||||
_programmaticallyChangingValue = true;
|
||||
AnalogTrackBar.Value = (int)Global.StickyXORAdapter.GetFloat(Name);
|
||||
ValueLabel.Text = AnalogTrackBar.Value.ToString();
|
||||
_programmaticallyChangingValue = false;
|
||||
}
|
||||
|
||||
base.OnPaint(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue