diff options
Diffstat (limited to 'tableCallbacks.go')
| -rw-r--r-- | tableCallbacks.go | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/tableCallbacks.go b/tableCallbacks.go index 954a832..f294a9b 100644 --- a/tableCallbacks.go +++ b/tableCallbacks.go @@ -29,20 +29,9 @@ func (mh *TableData) ColumnTypes(m *ui.TableModel) []ui.TableValue { return mh.generatedColumnTypes } -func libuiColorToGOlangColor(rgba color.RGBA) ui.TableColor { - /* a hack to see if colors work differently on macos or windows - 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} -} - // TODO: Figure out why this is being called 1000 times a second (10 times for each row & column) -// Nevermind this TODO. Who gives a shit. This is a really smart way to treat the OS toolkits +// +// Nevermind that 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 { if (Config.DebugTable) { log.Println("CellValue() row, column =", row, column) @@ -106,9 +95,12 @@ func defaultSetCellValue(mh *TableData, row int, column int) { humanID := mh.Cells[column].HumanID log.Println("defaultSetCellValue() FOUND THE TABLE BUTTON ", row, humanID) - button := mh.Rows[row].HumanData[humanID].Button - if (button != nil) { - guiButtonClick(button) + n := mh.Rows[row].HumanData[humanID].N + if (n != nil) { + // TODO: fixme. removed on Oct 31 2021 + if (n.OnChanged != nil) { + n.OnChanged() + } return } log.Println("defaultSetCellValue() ERROR: UNKNOWN BUTTON IN TABLE") |
