summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-05-09 17:48:21 -0500
committerJeff Carr <[email protected]>2023-05-09 17:48:21 -0500
commit706bcef867ff2a26ab62a1e3d668ac441575df62 (patch)
treef9655cbf3596de25d7f857a38e983634f2474a4b /structs.go
parente45e4212da86283e2f9592f11c08d798dfd39860 (diff)
start correctly handling grid placement
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/structs.go b/structs.go
index 83a309d..27632aa 100644
--- a/structs.go
+++ b/structs.go
@@ -31,6 +31,8 @@ type GuiArgs struct {
}
type guiConfig struct {
+ initOnce sync.Once
+
// This is the master node. The Binary Tree starts here
rootNode *Node
@@ -54,7 +56,6 @@ type guiConfig struct {
// simply the name and the size of whatever GUI element exists
type Node struct {
id int
- initOnce sync.Once
WidgetType toolkit.WidgetType
@@ -69,9 +70,12 @@ type Node struct {
X int
Y int
- // used for grids and tables
- NextX int
- NextY int
+ // the position of the widget in a grid
+ AtW int
+ AtH int
+ // where the next widget should be put in a grid
+ NextW int
+ NextH int
// used for values
I int