From bd0c81d7913d3b97b264b32e7e61d4f4b86fa6e0 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 19 Oct 2019 14:59:57 -0500 Subject: [PATCH] InputRoll - don't blow up if QueryItemBkColor isn't defined --- BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs index f26d76fe3a..9c453c76e5 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs @@ -481,7 +481,7 @@ namespace BizHawk.Client.EmuHawk } Color cellColor = rowColor; - QueryItemBkColor(cell.RowIndex.Value, cell.Column, ref cellColor); + QueryItemBkColor?.Invoke(cell.RowIndex.Value, cell.Column, ref cellColor); // Alpha layering for cell before selection float alpha = (float)cellColor.A / 255; @@ -566,7 +566,7 @@ namespace BizHawk.Client.EmuHawk for (int j = firstVisibleColumn; j <= lastVisible; j++) { Color itemColor = Color.White; - QueryItemBkColor(f + startIndex, visibleColumns[j], ref itemColor); + QueryItemBkColor?.Invoke(f + startIndex, visibleColumns[j], ref itemColor); if (itemColor == Color.White) { itemColor = rowColor; @@ -603,7 +603,7 @@ namespace BizHawk.Client.EmuHawk for (int j = FirstVisibleColumn; j <= lastVisible; j++) // Horizontal { Color itemColor = Color.White; - QueryItemBkColor(f + startIndex, visibleColumns[j], ref itemColor); + QueryItemBkColor?.Invoke(f + startIndex, visibleColumns[j], ref itemColor); if (itemColor == Color.White) { itemColor = rowColor;