Enhance the IDriveLight interface so that custom tooltip text can be displayed
This commit is contained in:
parent
0dbc2b0c27
commit
02ecb0ad24
|
@ -2679,6 +2679,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (Emulator.HasDriveLight() && Emulator.AsDriveLight() is { DriveLightEnabled: true } diskLEDCore)
|
||||
{
|
||||
LedLightStatusLabel.Image = diskLEDCore.DriveLightOn ? _statusBarDiskLightOnImage : _statusBarDiskLightOffImage;
|
||||
LedLightStatusLabel.ToolTipText = Emulator.AsDriveLight().DriveLightIconDescription;
|
||||
LedLightStatusLabel.Visible = true;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -15,5 +15,10 @@
|
|||
/// Gets a value indicating whether the light is currently lit
|
||||
/// </summary>
|
||||
bool DriveLightOn { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating the description of the drive light icon (that will be displayed as a ToolTip on MainForm
|
||||
/// </summary>
|
||||
string DriveLightIconDescription { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ namespace BizHawk.Emulation.Cores.Calculators.Emu83
|
|||
{
|
||||
public bool DriveLightEnabled => true;
|
||||
public bool DriveLightOn => LibEmu83.TI83_GetLinkActive(Context);
|
||||
|
||||
public string DriveLightIconDescription => "Link Activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,5 +189,7 @@ namespace BizHawk.Emulation.Cores.Computers.AmstradCPC
|
|||
public bool DriveLightOn =>
|
||||
(_machine?.TapeDevice != null && _machine.TapeDevice.TapeIsPlaying)
|
||||
|| (_machine?.UPDDiskDevice != null && _machine.UPDDiskDevice.DriveLight);
|
||||
|
||||
public string DriveLightIconDescription => "Disc Drive Activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,6 +130,8 @@ namespace BizHawk.Emulation.Cores.Computers.AppleII
|
|||
public bool DriveLightEnabled => true;
|
||||
public bool DriveLightOn => _machine.DiskIIController.DriveLight;
|
||||
|
||||
public string DriveLightIconDescription => "Disk Drive Activity LED";
|
||||
|
||||
private bool _nextPressed;
|
||||
private bool _prevPressed;
|
||||
|
||||
|
|
|
@ -6,5 +6,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
|
|||
{
|
||||
public bool DriveLightEnabled => _board != null && (_board.CartPort.DriveLightEnabled || _board.Serial.DriveLightEnabled);
|
||||
public bool DriveLightOn => _board != null && (_board.CartPort.DriveLightOn || _board.Serial.DriveLightOn);
|
||||
|
||||
public string DriveLightIconDescription => "Cart or Disk Activity LED";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -270,5 +270,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Cartridge
|
|||
get => _driveLightOn;
|
||||
protected set => _driveLightOn = value;
|
||||
}
|
||||
|
||||
public string DriveLightIconDescription => "Cart Activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,5 +135,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Cartridge
|
|||
|
||||
public bool DriveLightEnabled => _connected && _cartridgeDevice.DriveLightEnabled;
|
||||
public bool DriveLightOn => _connected && _cartridgeDevice.DriveLightOn;
|
||||
|
||||
public string DriveLightIconDescription => "Cart Activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,5 +75,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Serial
|
|||
public bool DriveLightEnabled => true;
|
||||
public bool DriveLightOn => ReadDeviceLight();
|
||||
public bool IsConnected => _connected;
|
||||
|
||||
public string DriveLightIconDescription => "Serial Activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -280,5 +280,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
|||
public bool DriveLightOn =>
|
||||
_machine?.TapeDevice?.TapeIsPlaying == true
|
||||
|| _machine?.UPDDiskDevice?.DriveLight == true;
|
||||
|
||||
public string DriveLightIconDescription => "Disc Drive Activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,6 +243,8 @@ namespace BizHawk.Emulation.Cores.Atari.Jaguar
|
|||
public bool DriveLightEnabled => IsJaguarCD;
|
||||
public bool DriveLightOn { get; private set; }
|
||||
|
||||
public string DriveLightIconDescription => "CD Drive Activity";
|
||||
|
||||
private readonly LibVirtualJaguar.CDTOCCallback _cdTocCallback;
|
||||
private readonly LibVirtualJaguar.CDReadCallback _cdReadCallback;
|
||||
|
||||
|
|
|
@ -80,5 +80,7 @@ namespace BizHawk.Emulation.Cores.Consoles.ChannelF
|
|||
public bool DriveLightEnabled => Cartridge.HasActivityLED;
|
||||
|
||||
public bool DriveLightOn => Cartridge.ActivityLED;
|
||||
|
||||
public string DriveLightIconDescription => "Computer thinking activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,5 +7,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
public bool DriveLightEnabled { get; }
|
||||
|
||||
public bool DriveLightOn { get; private set; }
|
||||
|
||||
public string DriveLightIconDescription => "Disk Drive Activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,5 +7,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
public bool DriveLightEnabled { get; } = true;
|
||||
|
||||
public bool DriveLightOn { get; internal set; }
|
||||
|
||||
public string DriveLightIconDescription => "CD Drive Activity";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -281,6 +281,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.PicoDrive
|
|||
public bool DriveLightEnabled { get; }
|
||||
public bool DriveLightOn { get; private set; }
|
||||
|
||||
public string DriveLightIconDescription => "CD Drive Activity";
|
||||
|
||||
public DisplayType Region => _isPal ? DisplayType.PAL : DisplayType.NTSC;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.gpgx
|
|||
public bool DriveLightEnabled { get; }
|
||||
public bool DriveLightOn { get; private set; }
|
||||
|
||||
public string DriveLightIconDescription => "CD Drive Activity";
|
||||
|
||||
private bool _driveLight;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -453,6 +453,7 @@ namespace BizHawk.Emulation.Cores.Sony.PSX
|
|||
|
||||
public bool DriveLightEnabled { get; private set; }
|
||||
public bool DriveLightOn { get; private set; }
|
||||
public string DriveLightIconDescription => "CD Drive Activity";
|
||||
|
||||
private void Attach()
|
||||
{
|
||||
|
|
|
@ -47,5 +47,7 @@ namespace BizHawk.Emulation.Cores.Waterbox
|
|||
|
||||
public bool DriveLightEnabled => _disks?.Length > 0;
|
||||
public bool DriveLightOn { get; private set; }
|
||||
|
||||
public string DriveLightIconDescription => "CD Drive Activity";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue