修复了聊天数据异常丢失的bug

This commit is contained in:
2024-10-18 18:15:44 +08:00
parent b27d2b80f7
commit 8a8a6e0bfa
6 changed files with 40 additions and 24 deletions
+5 -2
View File
@@ -53,7 +53,10 @@ func StartGameListen() {
case "/close_game":
g := global.GetGameInfo(msg.GameUuid)
if g != nil {
dialog.ShowInformation("提示", "对方已退出", g.Obj.(*TenGame).w)
dialog.NewConfirm("提示", "对方已退出", func(b bool) {
g.Obj.(*TenGame).w.Close()
}, g.Obj.(*TenGame).w).Show()
//dialog.ShowInformation("提示", "对方已退出", g.Obj.(*TenGame).w)
}
case "/start_game":
g := global.GetGameInfo(msg.GameUuid)
@@ -244,7 +247,7 @@ func (t *TenGame) advance() {
}
func (t *TenGame) setTitle() {
title := fmt.Sprintf("Game %0.f*%0.f win:%d", t.itemX, t.itemY, t.winSum)
title := fmt.Sprintf("让我们来下棋 %0.f*%0.f win:%d", t.itemX, t.itemY, t.winSum)
if t.isNet {
title += fmt.Sprintf(" | 我 vs %s", t.user.Name)
if t.currentRoundPlayer == t.myIndex {