summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2021-10-31 20:22:36 -0500
committerJeff Carr <[email protected]>2021-10-31 20:22:36 -0500
commit9ba768ba991f5fd42c7bf9e1540e3a20a7874ee7 (patch)
treebe20002b381030eeb7fbd868efef125417927672
parent9bd0227844e0b6a6b7e507ea00bff4674a6e3167 (diff)
BOX: remove GuiBox
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--structs.go1
-rw-r--r--table.go12
2 files changed, 7 insertions, 6 deletions
diff --git a/structs.go b/structs.go
index c15f4b7..b298f43 100644
--- a/structs.go
+++ b/structs.go
@@ -256,6 +256,7 @@ type TableData struct {
Human [20]HumanMap
Box *GuiBox
+ n *Node
lastRow int
lastColumn int
diff --git a/table.go b/table.go
index 92ae871..a149450 100644
--- a/table.go
+++ b/table.go
@@ -98,12 +98,11 @@ func InitColumns(mh *TableData, parts []TableColumnData) {
}
func AddTableTab(gw *GuiWindow, name string, rowcount int, parts []TableColumnData) *TableData {
- node := NewWindow()
- b := node.box
- return b.AddTableBox(name, rowcount, parts)
+ n := NewWindow()
+ return n.AddTableBox(name, rowcount, parts)
}
-func (b *GuiBox) AddTableBox(name string, rowcount int, parts []TableColumnData) *TableData {
+func (n *Node) AddTableBox(name string, rowcount int, parts []TableColumnData) *TableData {
mh := new(TableData)
mh.RowCount = rowcount
@@ -142,9 +141,10 @@ func (b *GuiBox) AddTableBox(name string, rowcount int, parts []TableColumnData)
// is this needed?
// gw.BoxMap[name] = box
- mh.Box = b
+ // mh.Box = b
+ mh.n = n
- b.UiBox.Append(table, true)
+ n.uiBox.Append(table, true)
return mh
}