diff --git a/CGAssistant/lang.qm b/CGAssistant/lang.qm index cea2fbc..1566991 100644 Binary files a/CGAssistant/lang.qm and b/CGAssistant/lang.qm differ diff --git a/CGAssistant/lang.ts b/CGAssistant/lang.ts index 69a13d2..3878149 100644 --- a/CGAssistant/lang.ts +++ b/CGAssistant/lang.ts @@ -1000,12 +1000,12 @@ Chat database will not work properly. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Microsoft YaHei UI'; font-size:9pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/logo.png" /></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:160%; font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Liberation Sans,PingFang SC,Microsoft YaHei,Hiragino Sans GB,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,SimSun,WenQuanYi Zen Hei Sharp,sans-serif'; font-size:16px; color:#40485b; background-color:#ffffff;"><br /></p> -<p style=" margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:160%; background-color:#ffffff;"><span style=" font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Liberation Sans,PingFang SC,Microsoft YaHei,Hiragino Sans GB,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,SimSun,WenQuanYi Zen Hei Sharp,sans-serif'; font-size:16px; color:#40485b; background-color:#ffffff;">当前版本:2023-07-18</span></p> +<p style=" margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:160%; background-color:#ffffff;"><span style=" font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Liberation Sans,PingFang SC,Microsoft YaHei,Hiragino Sans GB,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,SimSun,WenQuanYi Zen Hei Sharp,sans-serif'; font-size:16px; color:#40485b; background-color:#ffffff;">当前版本:2023-09-28</span></p> <p style=" margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:160%; background-color:#ffffff;"><span style=" font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Liberation Sans,PingFang SC,Microsoft YaHei,Hiragino Sans GB,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,SimSun,WenQuanYi Zen Hei Sharp,sans-serif'; font-size:16px; color:#40485b; background-color:#ffffff;">下载最新版本:群号 300303705</span></p> <p style=" margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:160%; background-color:#ffffff;"><span style=" font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Liberation Sans,PingFang SC,Microsoft YaHei,Hiragino Sans GB,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,SimSun,WenQuanYi Zen Hei Sharp,sans-serif'; font-size:16px; color:#40485b; background-color:#ffffff;">或 </span><a href="https://github.com/hzqst/CGAssistant/"><span style=" font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Liberation Sans,PingFang SC,Microsoft YaHei,Hiragino Sans GB,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,SimSun,WenQuanYi Zen Hei Sharp,sans-serif'; font-size:16px; text-decoration: underline; color:#005980; background-color:transparent;">https://github.com/hzqst/CGAssistantJS/</span></a></p> <p style=" margin-top:0px; margin-bottom:16px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; line-height:160%; background-color:#ffffff;"><a href="https://github.com/hzqst/CGAssistantJS/issues"><span style=" font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Liberation Sans,PingFang SC,Microsoft YaHei,Hiragino Sans GB,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,SimSun,WenQuanYi Zen Hei Sharp,sans-serif'; font-size:16px; text-decoration: underline; color:#005980; background-color:transparent;">或 </span></a><a href="https://github.com/hzqst/CGAssistant/"><span style=" font-family:'-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Liberation Sans,PingFang SC,Microsoft YaHei,Hiragino Sans GB,Wenquanyi Micro Hei,WenQuanYi Zen Hei,ST Heiti,SimHei,SimSun,WenQuanYi Zen Hei Sharp,sans-serif'; font-size:16px; text-decoration: underline; color:#005980; background-color:transparent;">https://gitee.com/hzqst/CGAssistantJS/</span></a></p></body></html> @@ -1961,5 +1961,9 @@ Check "chrome://inspect" in chrome to debug the node process. Stop script when player freeze. 人物一定时间超过一定时间静止不动时自动停止脚本。 + + Freeze Duration: %1 s + 静止超时时间:%1秒 + diff --git a/CGAssistant/scriptform.cpp b/CGAssistant/scriptform.cpp index 50295df..ce7255f 100644 --- a/CGAssistant/scriptform.cpp +++ b/CGAssistant/scriptform.cpp @@ -43,10 +43,18 @@ ScriptForm::ScriptForm(QWidget *parent) : connect(m_node, &QProcess::errorOccurred, this, &ScriptForm::OnNodeStartError); connect(m_node, SIGNAL(readyRead()), this, SLOT(OnNodeReadyRead())); connect(m_node, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(OnNodeFinish(int, QProcess::ExitStatus))); + connect(ui->horizontalSlider_freezeDuration, SIGNAL(valueChanged(int)), this, SLOT(OnSetFreezeDuration(int))); QTimer *timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(OnAutoRestart())); timer->start(1000); + + ui->label_freezeDuration->setText(tr("Freeze Duration: %1 s").arg( ui->horizontalSlider_freezeDuration->value() )); +} + +void ScriptForm::OnSetFreezeDuration(int value) +{ + ui->label_freezeDuration->setText(tr("Freeze Duration: %1 s").arg(value)); } void ScriptForm::dragEnterEvent(QDragEnterEvent *event) diff --git a/CGAssistant/scriptform.h b/CGAssistant/scriptform.h index e326094..0e35325 100644 --- a/CGAssistant/scriptform.h +++ b/CGAssistant/scriptform.h @@ -43,6 +43,7 @@ private slots: void OnCloseWindow(); void OnAutoRestart(); void on_pushButton_suspend_clicked(); + void OnSetFreezeDuration(int value); private: Ui::ScriptForm *ui;