From a85c60e7163a85b0960964708160cbe01aec5d4e Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 5 Sep 2015 15:44:08 -0400 Subject: [PATCH] Input Roll - more avoiding calculated fields in loops --- BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs index 2808cb6527..8ddfcef960 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll.Drawing.cs @@ -399,9 +399,11 @@ namespace BizHawk.Client.EmuHawk private void DrawBg(PaintEventArgs e, List visibleColumns) { if (UseCustomBackground && QueryItemBkColor != null) + { DoBackGroundCallback(e, visibleColumns); + } - if (GridLines) + if (GridLines && false) { Gdi.SetSolidPen(SystemColors.ControlLight); if (HorizontalOrientation) @@ -423,6 +425,7 @@ namespace BizHawk.Client.EmuHawk { // Columns int y = ColumnHeight + 1; + int? totalColWidth = TotalColWidth; foreach (var column in visibleColumns) { int x = column.Left.Value - HBar.Value; @@ -431,7 +434,7 @@ namespace BizHawk.Client.EmuHawk if (visibleColumns.Any()) { - Gdi.Line(TotalColWidth.Value - HBar.Value, y, TotalColWidth.Value - HBar.Value, Height - 1); + Gdi.Line(totalColWidth.Value - HBar.Value, y, totalColWidth.Value - HBar.Value, Height - 1); } // Rows