diff options
Diffstat (limited to 'grid.go')
| -rw-r--r-- | grid.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,8 +1,8 @@ package gui import ( + "go.wit.com/lib/widget" "go.wit.com/log" - "go.wit.com/gui/widget" ) // Grid numbering examples (H) or (W,H) @@ -24,7 +24,7 @@ import ( // ----------------------------- type Grid struct { - Width int + Width int Height int } @@ -53,7 +53,7 @@ func (n *Node) NewGrid(progname string, w int, h int) *Node { // true if the grid already have a child at W,H func (n *Node) gridCollision() bool { for _, child := range n.children { - if ((child.AtW == n.NextW) && (child.AtH == n.NextH)) { + if (child.AtW == n.NextW) && (child.AtH == n.NextH) { return true } } @@ -62,12 +62,12 @@ func (n *Node) gridCollision() bool { // keeps incrementing NextW & NextH until there is not a widget func (n *Node) gridIncrement() { - if ! n.gridCollision() { + if !n.gridCollision() { return } n.NextW += 1 - if (n.NextW > n.W) { + if n.NextW > n.W { n.NextW = 1 n.NextH += 1 } @@ -76,7 +76,7 @@ func (n *Node) gridIncrement() { } func (n *Node) At(w int, h int) *Node { - if (n == nil) { + if n == nil { return n } |
