rework firmware icons

better tooltip for deal bind
This commit is contained in:
feos 2024-12-15 20:11:05 +03:00
parent ab5d92f319
commit 9e9687f026
9 changed files with 35 additions and 12 deletions

View File

@ -88,6 +88,12 @@ namespace BizHawk.Client.EmuHawk.Properties
internal static readonly Bitmap Erase = ReadEmbeddedBitmap("Erase"); internal static readonly Bitmap Erase = ReadEmbeddedBitmap("Erase");
internal static readonly Bitmap ESE = ReadEmbeddedBitmap("ESE"); internal static readonly Bitmap ESE = ReadEmbeddedBitmap("ESE");
internal static readonly Bitmap ExclamationRed = ReadEmbeddedBitmap("ExclamationRed"); internal static readonly Bitmap ExclamationRed = ReadEmbeddedBitmap("ExclamationRed");
internal static readonly Bitmap FFaccept = ReadEmbeddedBitmap("Farm-Fresh_accept");
internal static readonly Bitmap FFcancel = ReadEmbeddedBitmap("Farm-Fresh_cancel");
internal static readonly Bitmap FFdelete = ReadEmbeddedBitmap("Farm-Fresh_delete");
internal static readonly Bitmap FFexclamation = ReadEmbeddedBitmap("Farm-Fresh_exclamation");
internal static readonly Bitmap FFhelp = ReadEmbeddedBitmap("Farm-Fresh_help");
internal static readonly Bitmap FFstar = ReadEmbeddedBitmap("Farm-Fresh_star");
internal static readonly Bitmap FastForward = ReadEmbeddedBitmap("FastForward"); internal static readonly Bitmap FastForward = ReadEmbeddedBitmap("FastForward");
internal static readonly Bitmap Find = ReadEmbeddedBitmap("FindHS"); internal static readonly Bitmap Find = ReadEmbeddedBitmap("FindHS");
internal static readonly Bitmap Forward = ReadEmbeddedBitmap("Forward"); internal static readonly Bitmap Forward = ReadEmbeddedBitmap("Forward");

View File

@ -36,17 +36,17 @@ namespace BizHawk.Client.EmuHawk
[FirmwareOptionStatus.Unknown] = STATUS_DESC_UNUSED, [FirmwareOptionStatus.Unknown] = STATUS_DESC_UNUSED,
[FirmwareOptionStatus.Unacceptable] = "NO: This doesn't work on the core", [FirmwareOptionStatus.Unacceptable] = "NO: This doesn't work on the core",
[FirmwareOptionStatus.Acceptable] = "OK: This works on the core", [FirmwareOptionStatus.Acceptable] = "OK: This works on the core",
[FirmwareOptionStatus.Ideal] = "PERFECT: Ideal for TASing and anything.", [FirmwareOptionStatus.Ideal] = "PERFECT: Ideal for TASing and anything",
}; };
internal static readonly IReadOnlyDictionary<FirmwareOptionStatus, Image> StatusIcons = new Dictionary<FirmwareOptionStatus, Image> internal static readonly IReadOnlyDictionary<FirmwareOptionStatus, Image> StatusIcons = new Dictionary<FirmwareOptionStatus, Image>
{ {
[FirmwareOptionStatus.Unset] = Properties.Resources.ExclamationRed, [FirmwareOptionStatus.Unset] = Properties.Resources.FFhelp,
[FirmwareOptionStatus.Bad] = Properties.Resources.ThumbsDown, // in this main view, bad dumps use this thumbs down (to differentiate from unset); in a record's info view, they use unset's red '!' (to differentiate from unacceptable) [FirmwareOptionStatus.Bad] = Properties.Resources.FFdelete,
[FirmwareOptionStatus.Unknown] = Properties.Resources.RetroQuestion, [FirmwareOptionStatus.Unknown] = Properties.Resources.FFexclamation,
[FirmwareOptionStatus.Unacceptable] = Properties.Resources.ThumbsDown, [FirmwareOptionStatus.Unacceptable] = Properties.Resources.FFcancel,
[FirmwareOptionStatus.Acceptable] = Properties.Resources.GreenCheck, [FirmwareOptionStatus.Acceptable] = Properties.Resources.FFaccept,
[FirmwareOptionStatus.Ideal] = Properties.Resources.Freeze, [FirmwareOptionStatus.Ideal] = Properties.Resources.FFstar,
}; };
private readonly IDictionary<string, string> _firmwareUserSpecifications; private readonly IDictionary<string, string> _firmwareUserSpecifications;
@ -328,10 +328,19 @@ namespace BizHawk.Client.EmuHawk
else else
{ {
var fo = FirmwareDatabase.FirmwareOptions.FirstOrNull(fo => fo.Hash == hash); var fo = FirmwareDatabase.FirmwareOptions.FirstOrNull(fo => fo.Hash == hash);
lvi.ImageIndex = (int) (fo?.Status ?? FirmwareOptionStatus.Unset); // null here means it's an option for a different record, so use the red '!' like unset lvi.ImageIndex = (int) (fo?.Status ?? FirmwareOptionStatus.Unset);
lvi.ToolTipText = fo?.IsAcceptableOrIdeal == true if (fo?.Status == FirmwareOptionStatus.Ideal)
? "Good! This file has been bound to some kind of a decent choice" {
: "Bad! This file has been bound to a choice which is known to be bad (details in right-click > Info)"; lvi.ToolTipText = "Perfect! This file has been bound to an ideal choice";
}
else if (fo?.Status == FirmwareOptionStatus.Acceptable)
{
lvi.ToolTipText = "Good! This file has been bound to some kind of a decent choice";
}
else
{
lvi.ToolTipText = "Bad! This file has been bound to a choice which is known to be bad (details in right-click -> Info)";
}
lvi.SubItems[4].Text = ri.KnownFirmwareFile.Value.Description; lvi.SubItems[4].Text = ri.KnownFirmwareFile.Value.Description;
} }
@ -545,7 +554,7 @@ namespace BizHawk.Client.EmuHawk
olvi.SubItems.Add(new ListViewItem.ListViewSubItem()); olvi.SubItems.Add(new ListViewItem.ListViewSubItem());
olvi.SubItems.Add(new ListViewItem.ListViewSubItem()); olvi.SubItems.Add(new ListViewItem.ListViewSubItem());
var ff = FirmwareDatabase.FirmwareFilesByOption[o]; var ff = FirmwareDatabase.FirmwareFilesByOption[o];
olvi.ImageIndex = (int) (o.Status is FirmwareOptionStatus.Bad ? FirmwareOptionStatus.Unset : o.Status); // if bad, use unset's red '!' to differentiate from unacceptable olvi.ImageIndex = (int) o.Status;
olvi.ToolTipText = StatusDescs[o.Status]; olvi.ToolTipText = StatusDescs[o.Status];
olvi.SubItems[0].Text = ff.Size.ToString(); olvi.SubItems[0].Text = ff.Size.ToString();
olvi.SubItems[0].Font = Font; // why doesn't this work? olvi.SubItems[0].Font = Font; // why doesn't this work?

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,8 @@
Free FatCow-Farm Fresh Icons
http://www.fatcow.com/free-icons
These icons are licensed under a Creative Commons Attribution 3.0 License
http://creativecommons.org/licenses/by/3.0/us/
Size and colors adjusted by feos
https://github.com/TASEmulators/BizHawk

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB