From 3e8617d05c515b7772a35089226c47fb3d27b7c9 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 23 May 2019 14:02:04 -0700 Subject: try to return a nil color Signed-off-by: Jeff Carr --- tableCallbacks.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tableCallbacks.go') diff --git a/tableCallbacks.go b/tableCallbacks.go index b526243..103790a 100644 --- a/tableCallbacks.go +++ b/tableCallbacks.go @@ -29,6 +29,12 @@ func (mh *TableData) ColumnTypes(m *ui.TableModel) []ui.TableValue { } func libuiColorToGOlangColor(rgba color.RGBA) ui.TableColor { + if (rgba.R == 72) { + log.Println("SETTING COLOR TO NIL") + log.Println("SETTING COLOR TO NIL") + log.Println("SETTING COLOR TO NIL") + return ui.TableColor{} + } return ui.TableColor{float64(rgba.R) / 256, float64(rgba.G) / 256, float64(rgba.B) / 256, float64(rgba.A) / 256} } @@ -44,6 +50,7 @@ func (mh *TableData) CellValue(m *ui.TableModel, row, column int) ui.TableValue } if (column == mh.Human[humanID].ColorID) { return libuiColorToGOlangColor(mh.Rows[row].HumanData[humanID].Color) + return libuiColorToGOlangColor(mh.Rows[row].HumanData[humanID].Color) } log.Println("CellValue() FAILURE") log.Println("CellValue() FAILURE") -- cgit v1.2.3