summaryrefslogtreecommitdiff
path: root/tableCallbacks.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2019-05-21 14:48:15 -0700
committerJeff Carr <[email protected]>2019-05-21 14:48:15 -0700
commitc3ba0117dfaeb2ba74a3abc5146e6cb8fcfac8e1 (patch)
treecae472a486244fc16c79d44d4df4e3aa99e9267c /tableCallbacks.go
parent7d01a72e590cd007129cd2379ccf4cc23a3ca4de (diff)
remove libui dependancy on ui.TableString type
Use standard golang 'string' instead of requiring every external function that manipulates the UI actually need to import the libui toolkit. This hopefully seperates the GUI from the data the GUI displays. The libui code actually scans through the data and updates the cells based on what is stored in memory so this makes this seperation clean. Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'tableCallbacks.go')
-rw-r--r--tableCallbacks.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tableCallbacks.go b/tableCallbacks.go
index 94d174a..59fb8f6 100644
--- a/tableCallbacks.go
+++ b/tableCallbacks.go
@@ -28,7 +28,7 @@ func (mh *TableData) ColumnTypes(m *ui.TableModel) []ui.TableValue {
func (mh *TableData) CellValue(m *ui.TableModel, row, column int) ui.TableValue {
humanID := mh.Cells[column].HumanID
if (column == mh.Human[humanID].TextID) {
- return mh.Rows[row].HumanData[humanID].Text
+ return ui.TableString(mh.Rows[row].HumanData[humanID].Text)
}
if (column == mh.Human[humanID].ColorID) {
return mh.Rows[row].HumanData[humanID].Color