From b6d0f171272c02164b47c8beb809b4f87431b12f Mon Sep 17 00:00:00 2001 From: notify Date: Fri, 29 Sep 2023 21:16:53 +0800 Subject: [PATCH] Tutorial (#272) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 初次启动时的简单引导 --- CHANGELOG.md | 19 ++++++++++ CMakeLists.txt | 2 +- Fk/Config.qml | 4 +++ Fk/Pages/Init.qml | 3 +- Fk/Tutorial.qml | 71 +++++++++++++++++++++++++++++++++++++ Fk/main.qml | 4 +++ android/AndroidManifest.xml | 4 +-- lang/zh_CN.ts | 62 ++++++++++++++++++++++++++++++++ 8 files changed, 164 insertions(+), 5 deletions(-) create mode 100644 Fk/Tutorial.qml diff --git a/CHANGELOG.md b/CHANGELOG.md index 76550506..05f1bcf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,25 @@ ___ +## v0.3.9 + +1. 简易AI框架 +2. askForPoxi +3. 修复trigger函数的bug +4. 增加使用和打出的禁止技提示 +5. 修复卡牌标记,attach主动技显示为蓝色按钮 +6. 增加判断额外回合之法以及fix +7. 修复了询问卡牌时会返回不符合要求的牌的bug +8. 修复了摸牌阶段的skillname(游戏规则) +9. 实装武将牌堆 +10. 剥离身份模式特有常备主逻辑 +11. 为changeProperty添加时机 +12. 分离了改判时的移动 +13. 将canUseGeneral改为Engine所属函数 +14. 新人教程 + +___ + ## v0.3.8 为国战添加专属ui,修复一些bug。 diff --git a/CMakeLists.txt b/CMakeLists.txt index ce6eb7c9..8311db87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) -project(FreeKill VERSION 0.3.8) +project(FreeKill VERSION 0.3.9) add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\") find_package(Qt6 REQUIRED COMPONENTS diff --git a/Fk/Config.qml b/Fk/Config.qml index a48454d7..a506abb7 100644 --- a/Fk/Config.qml +++ b/Fk/Config.qml @@ -30,6 +30,8 @@ QtObject { property int preferredTimeout property int preferredLuckTime + property bool firstRun: true + // Player property of client property string serverAddr property string screenName: "" @@ -82,6 +84,7 @@ QtObject { hideUseless = conf.hideUseless ?? false; preferredTimeout = conf.preferredTimeout ?? 15; preferredLuckTime = conf.preferredLuckTime ?? 0; + firstRun = conf.firstRun ?? true; disabledGenerals = conf.disabledGenerals ?? []; disableGeneralSchemes = conf.disableGeneralSchemes ?? [ disabledGenerals ]; disableSchemeIdx = conf.disableSchemeIdx ?? 0; @@ -109,6 +112,7 @@ QtObject { conf.hideUseless = hideUseless; conf.preferredTimeout = preferredTimeout; conf.preferredLuckTime = preferredLuckTime; + conf.firstRun = firstRun; conf.disabledGenerals = disabledGenerals; conf.disableGeneralSchemes = disableGeneralSchemes; conf.disableSchemeIdx = disableSchemeIdx; diff --git a/Fk/Pages/Init.qml b/Fk/Pages/Init.qml index b940f3f8..88eb55b9 100644 --- a/Fk/Pages/Init.qml +++ b/Fk/Pages/Init.qml @@ -118,8 +118,7 @@ Item { TapHandler { onTapped: { - errDialog.txt = qsTr("$LoginFAQ"); - errDialog.open(); + mainStack.push(Qt.createComponent("../Tutorial.qml").createObject()); } } } diff --git a/Fk/Tutorial.qml b/Fk/Tutorial.qml new file mode 100644 index 00000000..0c0fcbd7 --- /dev/null +++ b/Fk/Tutorial.qml @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +Rectangle { + id: root + color: "#CCEEEEEE" + property int total: 7 + + SwipeView { + id: view + anchors.fill: parent + + Repeater { + model: total + Item { + Text { + text: qsTr("tutor_msg_" + (modelData + 1)) + font.pixelSize: 32 + wrapMode: Text.WordWrap + anchors.centerIn: parent + width: parent.width * 0.7 + horizontalAlignment: Text.AlignHCenter + textFormat: Text.RichText + } + } + } + } + + /* + PageIndicator { + id: indicator + + count: total + currentIndex: view.currentIndex + + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + */ + + Row { + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + anchors.bottomMargin: 20 + spacing: 8 + Text { + text: (view.currentIndex + 1) + "/" + total + font.pixelSize: 36 + } + + Button { + text: qsTr("Skip") + onClicked: mainStack.pop(); + } + + Button { + text: qsTr("Prev") + enabled: view.currentIndex > 0 + onClicked: view.currentIndex-- + } + + Button { + text: qsTr("Next") + enabled: view.currentIndex + 1 < total + onClicked: view.currentIndex++ + } + } +} diff --git a/Fk/main.qml b/Fk/main.qml index 3e703567..02b4f81b 100644 --- a/Fk/main.qml +++ b/Fk/main.qml @@ -204,6 +204,10 @@ Window { Component.onCompleted: { mainStack.push(init); + if (config.firstRun) { + config.firstRun = false; + mainStack.push(Qt.createComponent("Tutorial.qml").createObject()); + } if (!Debugging) { splashLoader.source = "Splash.qml"; splashLoader.item.disappeared.connect(() => { diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index f196d8e8..196018ce 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -3,8 +3,8 @@ + android:versionCode="309" + android:versionName="0.3.9"> diff --git a/lang/zh_CN.ts b/lang/zh_CN.ts index 58b7a2a8..983f457d 100644 --- a/lang/zh_CN.ts +++ b/lang/zh_CN.ts @@ -454,4 +454,66 @@ + + Tutorial + + tutor_msg_1 + 欢迎来到新月杀!<br> + 由于是第一次运行,先来看看说明吧。<br> + 跳过了也没关系,只要点击主界面的“<font color="blue"><u>常见疑问</u></font>”,就能随时查看。 + + + tutor_msg_2 + 新月杀是一款免费三国杀类型游戏,<br> + 使用GPLv3协议进行开源!<br> + 有关项目的详细信息可以在进入大厅后,<br> + 点击右下角“关于”按钮查看。 + + + tutor_msg_3 + 新月杀本身默认只含标准包!<br> + 想要体验更多武将,就要通过联机获取!<br> + 在主界面点击“加入服务器” -> 添加服务器。<br> + (目前推荐的服务器IP是175.178.66.93) + + + tutor_msg_4 + 连接到服务器也可能不是一帆风顺。<br> + 有时候你可能用了别人已注册的用户名,<br> + 或者输错了IP等等。遇到错误不要心急,<br> + 仔细注意一下屏幕底部的提示信息吧。 + + + tutor_msg_5 + 更多指引可以去查阅下载链接附送的pdf。 + 这些pdf都是由开发者们编写的,不仅能让你快速掌握游戏的深入玩法, + 还可以告诉你关于开设私服、制作拓展之类的知识。 + + + tutor_msg_6 + 如果想联系我们,可以用这些方式:<br> + 百度贴吧:新月杀吧<br> + Discord群组:https://discord.gg/tp35GrQR6v<br> + QQ频道:freekill01<br> + QQ群太容易满啦,就不发群号了 + + + tutor_msg_7 + 感谢你能看完这些!<br> + 那么接下来祝你游戏愉快!<br> + (免费联机游戏,还请素质打牌!) + + + Skip + 跳过 + + + Prev + 上一条 + + + Next + 下一条 + +