说话时隐藏对话框

This commit is contained in:
ZouJin 2023-09-04 22:56:27 +08:00
parent a286a97e08
commit 83649dd5a1
3 changed files with 27 additions and 22 deletions

View File

@ -61,6 +61,7 @@ namespace VPet_Simulator.Windows.Interface
} }
var cont = tbTalk.Text; var cont = tbTalk.Text;
tbTalk.Text = ""; tbTalk.Text = "";
MainPlugin.MW.Main.ToolBar.Visibility = Visibility.Collapsed;
Task.Run(() => Responded(cont)); Task.Run(() => Responded(cont));
} }
/// <summary> /// <summary>
@ -74,6 +75,7 @@ namespace VPet_Simulator.Windows.Interface
{ {
Send_Click(sender, e); Send_Click(sender, e);
e.Handled = true; e.Handled = true;
MainPlugin.MW.Main.ToolBar.Visibility = Visibility.Collapsed;
return; return;
} }
if (tbTalk.Text.Length > 0) if (tbTalk.Text.Length > 0)

View File

@ -493,27 +493,6 @@ namespace VPet_Simulator.Windows
} }
} }
LoadingText.Content = "正在加载CGPT".Translate();
switch (Set["CGPT"][(gstr)"type"])
{
case "DIY":
TalkAPIIndex = TalkAPI.FindIndex(x => x.APIName == Set["CGPT"][(gstr)"DIY"]);
LoadTalkDIY();
break;
//case "API":
// TalkBox = new TalkBoxAPI(this);
// Main.ToolBar.MainGrid.Children.Add(TalkBox);
// break;
case "LB":
//if (IsSteamUser)
//{
// TalkBox = new TalkSelect(this);
// Main.ToolBar.MainGrid.Children.Add(TalkBox);
//}
TalkBox = new TalkSelect(this);
Main.ToolBar.MainGrid.Children.Add(TalkBox);
break;
}
LoadingText.Content = "正在加载游戏".Translate(); LoadingText.Content = "正在加载游戏".Translate();
var m = new System.Windows.Controls.MenuItem() var m = new System.Windows.Controls.MenuItem()
@ -546,6 +525,27 @@ namespace VPet_Simulator.Windows
Main.TimeHandle += Handle_Steam; Main.TimeHandle += Handle_Steam;
Main.TimeHandle += (x) => DiagnosisUPLoad(); Main.TimeHandle += (x) => DiagnosisUPLoad();
switch (Set["CGPT"][(gstr)"type"])
{
case "DIY":
TalkAPIIndex = TalkAPI.FindIndex(x => x.APIName == Set["CGPT"][(gstr)"DIY"]);
LoadTalkDIY();
break;
//case "API":
// TalkBox = new TalkBoxAPI(this);
// Main.ToolBar.MainGrid.Children.Add(TalkBox);
// break;
case "LB":
//if (IsSteamUser)
//{
// TalkBox = new TalkSelect(this);
// Main.ToolBar.MainGrid.Children.Add(TalkBox);
//}
TalkBox = new TalkSelect(this);
Main.ToolBar.MainGrid.Children.Add(TalkBox);
break;
}
//窗口部件 //窗口部件
winSetting = new winGameSetting(this); winSetting = new winGameSetting(this);
winBetterBuy = new winBetterBuy(this); winBetterBuy = new winBetterBuy(this);

View File

@ -878,7 +878,10 @@ namespace VPet_Simulator.Windows
// new winCGPTSetting(mw).ShowDialog(); // new winCGPTSetting(mw).ShowDialog();
// break; // break;
case "DIY": case "DIY":
mw.TalkBoxCurr?.Setting(); if (mw.TalkBoxCurr != null)
mw.TalkBoxCurr.Setting();
else
ExtensionSetting.StartURL("https://steamcommunity.com/app/1920960/workshop/");
break; break;
case "LB": case "LB":
//Task.Run(() => //Task.Run(() =>