diff options
| author | Jeff Carr <[email protected]> | 2019-05-12 23:56:53 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-12 23:56:53 -0700 |
| commit | ea6d22fc4692e49e1657b9b27f03a5d20fafe56f (patch) | |
| tree | 5e447c872310d6829e583ff7e8acb0e96b96d9f3 /tableCallbacks.go | |
| parent | f4f430561d5cd572ae766cf5a222aae28d817a1d (diff) | |
only have one copy of the libUI -> human index mapping
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tableCallbacks.go')
| -rw-r--r-- | tableCallbacks.go | 12 |
1 files changed, 6 insertions, 6 deletions
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") } |
