Skip to content

Commit 25a433e

Browse files
committed
debugui: rename Division -> GridCell
1 parent 6cf3b4b commit 25a433e

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

control.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func (c *Context) control(id controlID, opt option, f func(bounds image.Rectangl
109109

110110
func (c *Context) Text(text string) {
111111
color := c.style.colors[ColorText]
112-
c.Division(func() {
112+
c.GridCell(func() {
113113
var endIdx, p int
114114
c.SetGridLayout([]int{-1}, []int{lineHeight()})
115115
for endIdx < len(text) {

example/ui.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (g *Game) testWindow(ctx *debugui.Context) {
6060
// tree
6161
ctx.Header("Tree and Text", true, func() {
6262
ctx.SetGridLayout([]int{140, -1}, nil)
63-
ctx.Division(func() {
63+
ctx.GridCell(func() {
6464
ctx.TreeNode("Test 1", func() {
6565
ctx.TreeNode("Test 1a", func() {
6666
ctx.Label("Hello")
@@ -106,7 +106,7 @@ func (g *Game) testWindow(ctx *debugui.Context) {
106106
ctx.Header("Background Color", true, func() {
107107
ctx.SetGridLayout([]int{-1, 78}, []int{74})
108108
// sliders
109-
ctx.Division(func() {
109+
ctx.GridCell(func() {
110110
ctx.SetGridLayout([]int{46, -1}, nil)
111111
ctx.Label("Red:")
112112
ctx.Slider(&g.bg[0], 0, 255, 1, 0)
@@ -158,7 +158,7 @@ func (g *Game) logWindow(ctx *debugui.Context) {
158158
g.logUpdated = false
159159
}
160160
})
161-
ctx.Division(func() {
161+
ctx.GridCell(func() {
162162
// input textbox + submit button
163163
var submitted bool
164164
ctx.SetGridLayout([]int{-1, 70}, nil)

layout.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (c *Context) popLayout() {
6767
c.layoutStack = c.layoutStack[:len(c.layoutStack)-1]
6868
}
6969

70-
func (c *Context) Division(f func()) {
70+
func (c *Context) GridCell(f func()) {
7171
c.control(0, 0, func(bounds image.Rectangle) bool {
7272
c.pushLayout(bounds, image.Pt(0, 0))
7373
defer c.popLayout()

0 commit comments

Comments
 (0)