Skip to content

Commit 761bccc

Browse files
committed
Make join button go away if host.
1 parent 00c369e commit 761bccc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ebiten-game/game/ui.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ func (g *game) logWindow(ctx *debugui.Context) {
5656
ctx.Button("Host Game").On(func() {
5757
submitOpen()
5858
})
59-
ctx.Button("Join").On(func() {
60-
submitJoin()
61-
})
59+
if !g.isHost {
60+
ctx.Button("Join").On(func() {
61+
submitJoin()
62+
})
63+
}
6264
})
6365
})
6466
}

0 commit comments

Comments
 (0)