diff options
| author | Jeff Carr <[email protected]> | 2022-10-08 23:22:47 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-08 23:22:47 -0500 |
| commit | 086986b6b8f55d15d18595bcbf3f76c023365b61 (patch) | |
| tree | 9f1dc4da5b2d125f7a017418d4d9912e16b71039 /tableCallbacks.go | |
| parent | f92a50e2e665a18e2201f1d6714025dcc39301cc (diff) | |
| parent | 45644ef9bc333f5def62d1c7f474dc96274e63fa (diff) | |
Merge branch 'master' into jcarr
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") |
