mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2026-04-22 15:57:15 +08:00
all: update ebitengine/debugui
This commit is contained in:
@@ -364,7 +364,7 @@ func (g *Game) Update() error {
|
||||
default:
|
||||
}
|
||||
|
||||
if err := g.debugUI.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugUI.Update(func(ctx *debugui.Context) error {
|
||||
var uiErr error
|
||||
ctx.Window("Audio", image.Rect(10, 10, 330, 210), func(layout debugui.ContainerLayout) {
|
||||
ctx.Header("Settings", true, func() {
|
||||
|
||||
@@ -65,7 +65,7 @@ type Game struct {
|
||||
}
|
||||
|
||||
func (g *Game) Update() error {
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Font Feature", image.Rect(10, 10, 210, 160), func(layout debugui.ContainerLayout) {
|
||||
var liga bool
|
||||
if g.liga == 1 {
|
||||
|
||||
@@ -78,7 +78,7 @@ func (g *Game) Update() error {
|
||||
maxSlnt = 0
|
||||
)
|
||||
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Font Variation", image.Rect(10, 10, 310, 160), func(layout debugui.ContainerLayout) {
|
||||
ctx.SetGridLayout([]int{-1, -2}, nil)
|
||||
ctx.Text("wght (Weight)")
|
||||
|
||||
@@ -52,7 +52,7 @@ func NewGame() *Game {
|
||||
}
|
||||
|
||||
func (g *Game) Update() error {
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("HSV", image.Rect(10, 10, 260, 160), func(layout debugui.ContainerLayout) {
|
||||
ctx.SetGridLayout([]int{-1, -2}, nil)
|
||||
ctx.Text("Hue")
|
||||
|
||||
@@ -43,7 +43,7 @@ type Game struct {
|
||||
}
|
||||
|
||||
func (g *Game) Update() error {
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Lines", image.Rect(10, 10, 260, 160), func(layout debugui.ContainerLayout) {
|
||||
ctx.Text(fmt.Sprintf("FPS: %0.2f", ebiten.ActualFPS()))
|
||||
ctx.Text(fmt.Sprintf("TPS: %0.2f", ebiten.ActualTPS()))
|
||||
|
||||
@@ -61,7 +61,7 @@ func (g *Game) Update() error {
|
||||
g.scale = 1.5 / math.Pow(1.01, float64(g.counter))
|
||||
}
|
||||
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Control", image.Rect(10, 10, 260, 160), func(layout debugui.ContainerLayout) {
|
||||
ctx.SetGridLayout([]int{-1, -2}, nil)
|
||||
ctx.Text("Rotate")
|
||||
|
||||
@@ -53,7 +53,7 @@ func (g *Game) Update() error {
|
||||
}
|
||||
}
|
||||
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Monitors", image.Rect(10, 10, 410, 410), func(layout debugui.ContainerLayout) {
|
||||
fullscreen := ebiten.IsFullscreen()
|
||||
if ctx.Checkbox(&fullscreen, "Fullscreen") {
|
||||
|
||||
@@ -100,7 +100,7 @@ type Game struct {
|
||||
}
|
||||
|
||||
func (g *Game) Update() error {
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Polygons", image.Rect(10, 10, 210, 110), func(layout debugui.ContainerLayout) {
|
||||
ctx.Text(fmt.Sprintf("TPS: %0.2f", ebiten.ActualTPS()))
|
||||
ctx.Slider(&g.ngon, 1, 40, 1)
|
||||
|
||||
@@ -141,7 +141,7 @@ func (g *Game) Update() error {
|
||||
}
|
||||
}
|
||||
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Shader", image.Rect(10, 10, 210, 110), func(layout debugui.ContainerLayout) {
|
||||
ctx.Text(fmt.Sprintf("%d / %d", g.idx+1, len(shaderSrcs)))
|
||||
ctx.SetGridLayout([]int{-1, -1}, nil)
|
||||
|
||||
@@ -141,7 +141,7 @@ func (g *Game) Update() error {
|
||||
g.init()
|
||||
}
|
||||
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Sprites", image.Rect(10, 10, 210, 110), func(layout debugui.ContainerLayout) {
|
||||
ctx.Text(fmt.Sprintf("TPS: %0.2f", ebiten.ActualTPS()))
|
||||
ctx.Text(fmt.Sprintf("FPS: %0.2f", ebiten.ActualFPS()))
|
||||
|
||||
@@ -139,7 +139,7 @@ func (g *Game) Update() error {
|
||||
g.init()
|
||||
}
|
||||
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
var terminated bool
|
||||
ctx.Window("Sprites", image.Rect(10, 10, 210, 160), func(layout debugui.ContainerLayout) {
|
||||
ctx.SetGridLayout([]int{-1}, []int{0, 0, 0, -1, 0})
|
||||
|
||||
@@ -294,7 +294,7 @@ func (g *Game) setpix(xy vec2, col color.Color) {
|
||||
func (g *Game) Update() error {
|
||||
reset := false
|
||||
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Squirals", image.Rect(10, 10, 210, 160), func(layout debugui.ContainerLayout) {
|
||||
ctx.Text(fmt.Sprintf("TPS: %0.2f", ebiten.ActualTPS()))
|
||||
ctx.Text(fmt.Sprintf("FPS: %0.2f", ebiten.ActualFPS()))
|
||||
|
||||
@@ -229,7 +229,7 @@ func (g *Game) drawWave(screen *ebiten.Image, counter int, aa bool, line bool) {
|
||||
func (g *Game) Update() error {
|
||||
g.counter++
|
||||
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Vector", image.Rect(10, screenHeight-160, 210, screenHeight-10), func(layout debugui.ContainerLayout) {
|
||||
ctx.Text(fmt.Sprintf("TPS: %0.2f", ebiten.ActualTPS()))
|
||||
ctx.Text(fmt.Sprintf("FPS: %0.2f", ebiten.ActualFPS()))
|
||||
|
||||
@@ -91,7 +91,7 @@ func NewGame() (*Game, error) {
|
||||
}
|
||||
|
||||
func (g *Game) Update() error {
|
||||
if err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugui.Update(func(ctx *debugui.Context) error {
|
||||
var outErr error
|
||||
ctx.Window("WAV", image.Rect(10, 10, 210, 110), func(layout debugui.ContainerLayout) {
|
||||
if g.audioPlayer.IsPlaying() {
|
||||
|
||||
@@ -161,7 +161,7 @@ func (g *game) Update() error {
|
||||
toUpdateWindowPosition bool
|
||||
)
|
||||
|
||||
if err := g.debugUI.Update(func(ctx *debugui.Context) error {
|
||||
if _, err := g.debugUI.Update(func(ctx *debugui.Context) error {
|
||||
ctx.Window("Window Size", image.Rect(10, 10, 330, 490), func(layout debugui.ContainerLayout) {
|
||||
ctx.Header("Instructions", false, func() {
|
||||
ctx.SetGridLayout([]int{-1, -1}, nil)
|
||||
|
||||
@@ -3,7 +3,7 @@ module github.com/hajimehoshi/ebiten/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/ebitengine/debugui v0.0.0-20250324151400-ed2a27d811cc
|
||||
github.com/ebitengine/debugui v0.0.0-20250329102959-fee4f8dfdd57
|
||||
github.com/ebitengine/gomobile v0.0.0-20250329061421-6d0a8e981e4c
|
||||
github.com/ebitengine/hideconsole v1.0.0
|
||||
github.com/ebitengine/oto/v3 v3.4.0-alpha.6
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
github.com/ebitengine/debugui v0.0.0-20250324151400-ed2a27d811cc h1:eCDO6qkmYf8Of2ZrEOaAKsWy5bUBBdji7Ij9dw6warg=
|
||||
github.com/ebitengine/debugui v0.0.0-20250324151400-ed2a27d811cc/go.mod h1:I53vUQBR+OkGOn67+koIp/aKDlwaaVh06wGzzszgZ+c=
|
||||
github.com/ebitengine/debugui v0.0.0-20250329102959-fee4f8dfdd57 h1:vRS6HPpp4h5Gs/quNmAq0g1LjgkRGe0HHIqWPPri5q0=
|
||||
github.com/ebitengine/debugui v0.0.0-20250329102959-fee4f8dfdd57/go.mod h1:wIKIq5RvNFb3+nFfJcYqSLvpC1ioD/BglWDtuWFSDz0=
|
||||
github.com/ebitengine/gomobile v0.0.0-20250329061421-6d0a8e981e4c h1:Ccgks2VROTr6bIm1FFxG2jT6P1DaCBMj8g/O9xbOQ08=
|
||||
github.com/ebitengine/gomobile v0.0.0-20250329061421-6d0a8e981e4c/go.mod h1:M6DDA2RbegvWBVv4Dq482lwyFTtMczT1A7UNm1qOYzY=
|
||||
github.com/ebitengine/hideconsole v1.0.0 h1:5J4U0kXF+pv/DhiXt5/lTz0eO5ogJ1iXb8Yj1yReDqE=
|
||||
|
||||
Reference in New Issue
Block a user