From ea6d22fc4692e49e1657b9b27f03a5d20fafe56f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 12 May 2019 23:56:53 -0700 Subject: only have one copy of the libUI -> human index mapping Signed-off-by: Jeff Carr --- tableCallbacks.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tableCallbacks.go') diff --git a/tableCallbacks.go b/tableCallbacks.go index cda183a..b36fc4c 100644 --- a/tableCallbacks.go +++ b/tableCallbacks.go @@ -24,11 +24,11 @@ func (mh *TableData) ColumnTypes(m *ui.TableModel) []ui.TableValue { // Nevermind this TODO. Who gives a shit. This is a really smart way to treat the OS toolkits func (mh *TableData) CellValue(m *ui.TableModel, row, column int) ui.TableValue { humanID := mh.Cells[column].HumanID - if (column == mh.Rows[row].Human[humanID].TextID) { - return mh.Rows[row].Human[humanID].Text + if (column == mh.Human[humanID].TextID) { + return mh.Rows[row].HumanData[humanID].Text } - if (column == mh.Rows[row].Human[humanID].ColorID) { - return mh.Rows[row].Human[humanID].Color + if (column == mh.Human[humanID].ColorID) { + return mh.Rows[row].HumanData[humanID].Color } panic("not sure what sort of ui.TableValue to return in CellValue()") return ui.TableString("") @@ -47,8 +47,8 @@ func (mh *TableData) SetCellValue(m *ui.TableModel, row, column int, value ui.Ta // log.Println("mh.Rows[row].Cells[column].HumanID =", mh.Rows[row].Cells[column].HumanID) humanID := mh.Cells[column].HumanID - log.Println("mh.Rows[row].Human[humanID].ColorID =", mh.Rows[row].Human[humanID].ColorID) - log.Println("mh.Rows[row].Human[humanID].TextID =", mh.Rows[row].Human[humanID].TextID) + log.Println("mh.Human[humanID].ColorID =", mh.Human[humanID].ColorID) + log.Println("mh.Human[humanID].TextID =", mh.Human[humanID].TextID) log.Println("SetCellValue() END") } -- cgit v1.2.3