Compare commits
213 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8fbb7f9ae7 | ||
|
|
6067ff139b | ||
|
|
dd70db5c17 | ||
|
|
b2e8799320 | ||
|
|
09a0cb8214 | ||
|
|
36f5dea846 | ||
|
|
f20dfc266c | ||
|
|
ecdcdf57ff | ||
|
|
e8334effc2 | ||
|
|
2ea865cb52 | ||
|
|
50db95a03d | ||
|
|
75eee66c8b | ||
|
|
3bdde71eb7 | ||
|
|
6f9f2dcef0 | ||
|
|
98c2f0511f | ||
|
|
be19447c07 | ||
|
|
eb0bb38e5a | ||
|
|
f083c11b4c | ||
|
|
bf2371854a | ||
|
|
e983639961 | ||
|
|
60ea0b7922 | ||
|
|
abc1e97155 | ||
|
|
eab7c61cc0 | ||
|
|
0d1aee52c0 | ||
|
|
ce50de5550 | ||
|
|
2798186da2 | ||
|
|
e1126b3594 | ||
|
|
1717631307 | ||
|
|
5a06edc5bd | ||
|
|
c1a0e50ffd | ||
|
|
4eedd121c0 | ||
|
|
a9f4f67f9e | ||
|
|
5619043a9e | ||
|
|
bf831fcf05 | ||
|
|
ba77488792 | ||
|
|
f2162796d9 | ||
|
|
fc81b89e86 | ||
|
|
a7b633502a | ||
|
|
5c43ae2909 | ||
|
|
bcd3b9d6ba | ||
|
|
d6e94c0274 | ||
|
|
e7dfbb856b | ||
|
|
0a235eead5 | ||
|
|
49c9158cf1 | ||
|
|
1f972b38a9 | ||
|
|
93f896debf | ||
|
|
bacba3c6e3 | ||
|
|
54211d15a0 | ||
|
|
830d0b55b5 | ||
|
|
efcd7868d5 | ||
|
|
5319dbce67 | ||
|
|
c19a62b761 | ||
|
|
19346b1aca | ||
|
|
d3785c3629 | ||
|
|
59455fb43d | ||
|
|
e5fb1bc197 | ||
|
|
ef207792c6 | ||
|
|
c5157b867c | ||
|
|
0278803293 | ||
|
|
e50b674ed9 | ||
|
|
e44b3a5ed4 | ||
|
|
006de48de6 | ||
|
|
0cf1417ca6 | ||
|
|
95e4ee8546 | ||
|
|
381578cc72 | ||
|
|
86b3442837 | ||
|
|
1c73833d30 | ||
|
|
aeaed550b7 | ||
|
|
4f495c5cc6 | ||
|
|
b724721e61 | ||
|
|
13f239ce44 | ||
|
|
239364ad6f | ||
|
|
9fab1fe3db | ||
|
|
8f60d2a3e5 | ||
|
|
678118ec16 | ||
|
|
2f7ae3f8be | ||
|
|
0d44ed5273 | ||
|
|
90b0962d94 | ||
|
|
839d3fa947 | ||
|
|
244306ef0d | ||
|
|
76b6b85b37 | ||
|
|
13abdb34ad | ||
|
|
af9de48b53 | ||
|
|
bb8458b948 | ||
|
|
18d1c8e670 | ||
|
|
0bafed9c23 | ||
|
|
644368f30a | ||
|
|
90156ce0af | ||
|
|
04bed642f9 | ||
|
|
13173f34a0 | ||
|
|
7db85f24b0 | ||
|
|
402e34ea2b | ||
|
|
dd7da09fb9 | ||
|
|
1443e6ddc5 | ||
|
|
14c137cce2 | ||
|
|
fc36fd5792 | ||
|
|
186e08fdbe | ||
|
|
766bf4cfb0 | ||
|
|
83ec7bd803 | ||
|
|
ee925ccc72 | ||
|
|
fe4263fc0d | ||
|
|
7a658a9291 | ||
|
|
e91a30536e | ||
|
|
ef0b92b7a3 | ||
|
|
c9c957efae | ||
|
|
9619a912a7 | ||
|
|
5db393be2e | ||
|
|
6e5d34c4ec | ||
|
|
0af7dfef95 | ||
|
|
3a3d46539b | ||
|
|
7b5f6fbbf2 | ||
|
|
d3f46df074 | ||
|
|
81cde4b7a2 | ||
|
|
c3b1eb0101 | ||
|
|
bb878c5581 | ||
|
|
05cd1e8692 | ||
|
|
2a1e8a6fac | ||
|
|
43e18fbe60 | ||
|
|
38e59830f0 | ||
|
|
3e8a31f9a2 | ||
|
|
7f7aeab1ea | ||
|
|
bd8a7d0429 | ||
|
|
9f443c01d7 | ||
|
|
2fb30a51bb | ||
|
|
64508c41fb | ||
|
|
3405e8d01b | ||
|
|
d8e8af591d | ||
|
|
5feb691108 | ||
|
|
4caa1e08cc | ||
|
|
5270d46b39 | ||
|
|
5f793165d2 | ||
|
|
276f73887c | ||
|
|
8d22952980 | ||
|
|
ba200fcc3b | ||
|
|
6145094332 | ||
|
|
1fe47af144 | ||
|
|
9fc9aa9383 | ||
|
|
662b1b5b8f | ||
|
|
90764f9ddd | ||
|
|
aecc5683d1 | ||
|
|
4116a387b8 | ||
|
|
e7270bac2a | ||
|
|
6202bfe046 | ||
|
|
70bdb18519 | ||
|
|
94f04bf4be | ||
|
|
ba919201ac | ||
|
|
f7a995a6fc | ||
|
|
6c7abdeec3 | ||
|
|
3c6fbf998f | ||
|
|
6d4f694535 | ||
|
|
dba53ba8aa | ||
|
|
5972f6afef | ||
|
|
6eb6c89cba | ||
|
|
9fa6f03a36 | ||
|
|
605ab7ba1b | ||
|
|
14015d32d1 | ||
|
|
c3e337d8b3 | ||
|
|
0bf2a612c2 | ||
|
|
b6a259b6ce | ||
|
|
1699065b50 | ||
|
|
52df50f618 | ||
|
|
fc0d773cfe | ||
|
|
adb40120b2 | ||
|
|
e031e7206a | ||
|
|
1dedb59383 | ||
|
|
745c7f4553 | ||
|
|
fa45e5b380 | ||
|
|
231726a627 | ||
|
|
2dc3dc776e | ||
|
|
f01999b861 | ||
|
|
05a36fc5f6 | ||
|
|
ded30f266e | ||
|
|
4aa6bc9e5d | ||
|
|
bf9bb40868 | ||
|
|
f70f3ac9eb | ||
|
|
8524a2835a | ||
|
|
b6a0865731 | ||
|
|
051695afe6 | ||
|
|
26ee689227 | ||
|
|
91192550d9 | ||
|
|
f311028dfe | ||
|
|
d609f8d93a | ||
|
|
64cc564759 | ||
|
|
7396e87a28 | ||
|
|
edd6ff08a5 | ||
|
|
191c860c20 | ||
|
|
858710ba2a | ||
|
|
1ceaa898df | ||
|
|
91efbd8f33 | ||
|
|
9d5fc4655b | ||
|
|
480a6e90ab | ||
|
|
c407471e09 | ||
|
|
a08a46eccc | ||
|
|
60c9eae07d | ||
|
|
c987172e63 | ||
|
|
c5a1ac2040 | ||
|
|
a1b910112c | ||
|
|
214fdcc051 | ||
|
|
d591f00b2d | ||
|
|
6e1d3dbca5 | ||
|
|
38b1070cd4 | ||
|
|
a9a82dfeb4 | ||
|
|
52883882b9 | ||
|
|
6688fddbff | ||
|
|
9132a29653 | ||
|
|
ea984627b6 | ||
|
|
754ff3ec65 | ||
|
|
6a364f8f4d | ||
|
|
b35e13f52e | ||
|
|
fba6f91a69 | ||
|
|
d2c2fd0cf6 | ||
|
|
7345ea7afd | ||
|
|
c3f28c7f2a |
60
.github/workflows/sync.yml
vendored
Normal file
60
.github/workflows/sync.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
name: Sync
|
||||||
|
|
||||||
|
on: [ push ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-commit-hash:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
if: github.actor != 'github-actions[bot]'
|
||||||
|
with:
|
||||||
|
persist-credentials: true
|
||||||
|
- name: Update commit hash to gitVersion
|
||||||
|
if: github.actor != 'github-actions[bot]'
|
||||||
|
run: |
|
||||||
|
git show -s --format=%H | awk 'NR == 1 {p = $0} NR > 1 {print p; p = $0} END{printf p}' > gitVersion
|
||||||
|
- name: Push commit
|
||||||
|
uses: EndBug/add-and-commit@v7.1.2
|
||||||
|
if: github.actor != 'github-actions[bot]'
|
||||||
|
with:
|
||||||
|
add: gitVersion
|
||||||
|
author_name: github-actions[bot]
|
||||||
|
author_email: 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
message: Update git tree hash
|
||||||
|
push: true
|
||||||
|
sync-to-gitea:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: update-commit-hash
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
if: github.actor != 'github-actions[bot]'
|
||||||
|
with:
|
||||||
|
persist-credentials: true
|
||||||
|
- name: Sync to Private Git Service
|
||||||
|
uses: wearerequired/git-mirror-action@master
|
||||||
|
if: github.actor != 'github-actions[bot]'
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
with:
|
||||||
|
source-repo: git@github.com:StageGuard/SkyAutoPlayerScript.git
|
||||||
|
destination-repo: ubuntu@81.70.194.140:StageGuard/SkyAutoPlayerScript.git
|
||||||
|
sync-to-gitee:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: update-commit-hash
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
if: github.actor != 'github-actions[bot]'
|
||||||
|
with:
|
||||||
|
persist-credentials: true
|
||||||
|
- name: Sync to Gitee
|
||||||
|
uses: wearerequired/git-mirror-action@master
|
||||||
|
if: github.actor != 'github-actions[bot]'
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
with:
|
||||||
|
source-repo: git@github.com:StageGuard/SkyAutoPlayerScript.git
|
||||||
|
destination-repo: git@gitee.com:stageguard/SkyAutoPlayerScript.git
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,3 +3,6 @@
|
|||||||
rhino.jar
|
rhino.jar
|
||||||
update.sh
|
update.sh
|
||||||
updateSharedSheets.js
|
updateSharedSheets.js
|
||||||
|
stageguard
|
||||||
|
encSheetAndPush.sh
|
||||||
|
encSheetList.js
|
||||||
282
README-en.md
Normal file
282
README-en.md
Normal file
@@ -0,0 +1,282 @@
|
|||||||
|
# SkyAutoPlayerScript
|
||||||
|
|
||||||
|
A script to play Sheets generated by [SkyStudio](https://play.google.com/store/apps/details?id=com.Maple.SkyStudio) automatically in game Sky with accessibility services using AutoX
|
||||||
|
|
||||||
|
[](shared_sheets/) [](#shared-sheets) [](https://www.jsdelivr.com/)
|
||||||
|
|
||||||
|
## [Temporary solution for error `Syntax error script.js#44(eval)#100`](https://github.com/StageGuard/SkyAutoPlayerScript/issues/17#issuecomment-1002640892)
|
||||||
|
|
||||||
|
## Feature
|
||||||
|
|
||||||
|
There are many features in SkyAutoPlayerScript compared to other auto player scripts.
|
||||||
|
|
||||||
|
* Friendly GUI, no code edit, fluent UI animation.
|
||||||
|
* Multi-functional player control panel with **pause**, **progress control** and **speed control**.
|
||||||
|
* Set key coordinates by yourself with guidance, avoiding key offset when playing.
|
||||||
|
* There are many excellent online [shared sheets](https://github.com/StageGuard/SkyAutoPlayerScript/tree/master/shared_sheets).
|
||||||
|
* Automatically update script.
|
||||||
|
* [Multi-language support](#translation).
|
||||||
|
* ...
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. Download AutoX at [Releases · kkevsekk1/AutoX](https://github.com/kkevsekk1/AutoX/releases)。
|
||||||
|
|
||||||
|
> Warning: Please notice that you should check your device arch in advance, or select `universal`。
|
||||||
|
|
||||||
|
2. Turn on **Accessibility service** and allow **Display pop-up window** permission for AutoX
|
||||||
|
|
||||||
|
3. Create a new script file in AutoX. Copy the code below and run!
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
"ui";
|
||||||
|
"use strict";
|
||||||
|
/*
|
||||||
|
SkyAutoPlayer (AutoX script)
|
||||||
|
Copyright © 2020-2021 StageGuard
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||||
|
USA
|
||||||
|
*/
|
||||||
|
(function(emitter) {
|
||||||
|
threads.start(function () {
|
||||||
|
emitter.emit("evaluate", (function () {
|
||||||
|
//Many sources
|
||||||
|
let sources = [
|
||||||
|
"http://cdn.stagex.top:8090/StageGuard/SkyAutoPlayerScript/raw/master/source/SkyAutoplayer.js",
|
||||||
|
"https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript/source/SkyAutoplayer.js",
|
||||||
|
"https://dl.skyautoplayerscript.stageguard.top/source/SkyAutoplayer.js",
|
||||||
|
"https://raw.githubusercontent.com/StageGuard/SkyAutoPlayerScript/master/source/SkyAutoplayer.js"
|
||||||
|
];
|
||||||
|
for (let i in sources) {
|
||||||
|
let resp = http.get(sources[i]);
|
||||||
|
if (resp.statusCode >= 200 && resp.statusCode < 300) {
|
||||||
|
return resp.body.string();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "console.show();console.log(\"Failed to load script\")";
|
||||||
|
}()));
|
||||||
|
});
|
||||||
|
emitter.on('evaluate', function (s) {
|
||||||
|
eval(s);
|
||||||
|
});
|
||||||
|
}(events.emitter(threads.currentThread())));
|
||||||
|
```
|
||||||
|
## Clear data
|
||||||
|
|
||||||
|
`SkyAutoPlayerScript` will store data while running, if you want to delete all data, please run the code below in AutoX
|
||||||
|
|
||||||
|
```
|
||||||
|
storages.remove("StageGuard:SkyAutoPlayer:Config");
|
||||||
|
files.removeDir("/storage/emulated/0/Documents/SkyAutoPlayer/");
|
||||||
|
```
|
||||||
|
|
||||||
|
# Upload sheets
|
||||||
|
|
||||||
|
SkyAutoplayerScript will load online shared sheets from the file `shared_sheets.json` in this repository and it is convenient to download and play.
|
||||||
|
|
||||||
|
If you want to let sheets that transcribed by yourself or permitted to reprint shown on the list, you can do one of the following ways:
|
||||||
|
|
||||||
|
### 1. Pull Request
|
||||||
|
|
||||||
|
You can clone this repository, put your sheet file into `shared_sheets` folder and add a new item in `shared_sheets.json` :
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{
|
||||||
|
//sheet name
|
||||||
|
"name": "Vicetone - Nevada",
|
||||||
|
//sheet file name in shared_sheets folder
|
||||||
|
"file": "Nevada.txt",
|
||||||
|
//transcriber
|
||||||
|
"author": "StageGuard",
|
||||||
|
//short description about this sheet
|
||||||
|
"desc": "Nevada SkyStudio钢琴版。\n内包含<u>比较复杂的和弦</u>,不适合手弹(笑\n你可以在SkyStudio的练习模式试试[狗头]",
|
||||||
|
//BPM in sheet file
|
||||||
|
"bpm": 497,
|
||||||
|
//key count(a 15 key sheet or 8 key sheet)
|
||||||
|
"keyCount": 15,
|
||||||
|
//pitch level in sheet file
|
||||||
|
"pitchLevel": 3,
|
||||||
|
//note count
|
||||||
|
//length of array songNotes in sheet file
|
||||||
|
"noteCount": 1308,
|
||||||
|
//your social link
|
||||||
|
//you can add many links if you want
|
||||||
|
"social": [
|
||||||
|
{
|
||||||
|
//platform code name, currently support github, twitter, douyin(tiktok) and coolapk
|
||||||
|
"platform": "github",
|
||||||
|
//social platform name
|
||||||
|
"name": "GitHub",
|
||||||
|
//social link
|
||||||
|
"link": "https://github.com/StageGuard/"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
After finishing, you need to create a new `pull request` and wait it to be merged.
|
||||||
|
|
||||||
|
> Attention: Before creating a new `pull request` , make sure your local repository is up-to-date!
|
||||||
|
|
||||||
|
### 2. If you are not familiar with Github...
|
||||||
|
|
||||||
|
Just mail your sheet file to [beamiscool@qq.com](mailto:beamiscool@qq.com) and don't forget the sheet description !
|
||||||
|
|
||||||
|
# Attention!
|
||||||
|
|
||||||
|
### Before using this script, you must read the following notes!
|
||||||
|
|
||||||
|
1. SkyAutoplayerScript is not fully tested, if you meet a bug, please PM CoolApk@StageGuard or create a new issue.
|
||||||
|
|
||||||
|
2. **SkyAutoplayerScript is a free and open source project. If you want to use it for commercial purposes, please add the link refers to this repository.**
|
||||||
|
|
||||||
|
3. **Shared sheets is not under the protection of LGPL-2.1, if you want to reprint shared sheets to other platforms, please contact sheet transcriber by yourself!**
|
||||||
|
|
||||||
|
4. The script is just for entertainment and it is not suitable to use it in formal occasion.
|
||||||
|
|
||||||
|
5. Script just gives you a short-time sense of satisfaction and do not make you progress.
|
||||||
|
|
||||||
|
6. This script is just a "player" and no built-in sheets, you must download [SkyStudio](https://play.google.com/store/apps/details?id=com.Maple.SkyStudio) to make sheets.
|
||||||
|
|
||||||
|
7. The script will not support decrypt sheet, including **SkyStudio encrypted sheet** or **encrypted js** etc.....<br>And the repository will also not accept encrypted sheet.
|
||||||
|
|
||||||
|
|
||||||
|
<details> <summary>Issues </summary>
|
||||||
|
|
||||||
|
# Use it to make profits: [#1](https://github.com/StageGuard/SkyAutoPlayerScript/issues/1)
|
||||||
|
|
||||||
|
# Embezzle shared sheets:
|
||||||
|
|
||||||
|
Gitee user [嗨游圈(@vipssp)](https://gitee.com/vipssp) upload all shared sheets in [/shared_sheets](https://github.com/StageGuard/SkyAutoPlayerScript/tree/master/shared_sheets) **without permission** to his [Gitee repository](https://gitee.com/vipssp/SkyAutoPlayerScript/)
|
||||||
|
|
||||||
|
He also doesn't delete these sheets from his repository after [notification](https://gitee.com/vipssp/SkyAutoPlayerScript/commit/197925a71ff9cc6248be682a55406fc5814b12d7#note_3637784).
|
||||||
|
|
||||||
|
I decide to pin him in README.md after communicating with some sheet sharer.
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="center" height="200">
|
||||||
|
<img src="https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/resources/static/2020-12-19_0-8-40.PNG" />
|
||||||
|
</td>
|
||||||
|
<td align="center" height="200">
|
||||||
|
<img src="https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/resources/static/2020-12-19_0-9-57.PNG" />
|
||||||
|
</td>
|
||||||
|
<td align="center" height="200">
|
||||||
|
<img src="https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/resources/static/2020-12-19_0-44-4.PNG" />
|
||||||
|
</td>
|
||||||
|
<td align="center" height="200">
|
||||||
|
<img src="https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/resources/static/Screenshot_2020-12-19-00-10-12-499_com.coolapk.market.jpg" />
|
||||||
|
</td>
|
||||||
|
<td align="center" height="200">
|
||||||
|
<img src="https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/resources/static/Screenshot_2020-12-19-00-11-23-671_com.coolapk.market.jpg" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
# Contribution
|
||||||
|
|
||||||
|
Welcome everyone to contribute this project, including pull request, issue, new feature request or translation.
|
||||||
|
|
||||||
|
### ⚠️WARNING
|
||||||
|
CodeFactor Evaluation: [](https://www.codefactor.io/repository/github/stageguard/skyautoplayerscript)
|
||||||
|
|
||||||
|
This program is a single-file project which means all modules are in a single file. Also, my coding skill is poor, so it is `a little hard` to understand source code.
|
||||||
|
|
||||||
|
## Contributor
|
||||||
|
|
||||||
|
### SkyAutoPlayerScript
|
||||||
|
|
||||||
|
[@tiaod](https://github.com/tiaod)
|
||||||
|
|
||||||
|
### Shared sheets
|
||||||
|
|
||||||
|
CoolApk [@Aex技术总监](http://www.coolapk.com/u/1286879)<br>
|
||||||
|
CoolApk [@夏卡卡卡](http://www.coolapk.com/u/2313452)<br>
|
||||||
|
CoolApk [@深空失忆か](http://www.coolapk.com/u/3005974)<br>
|
||||||
|
Douyin [@子哲啊🌈(zizhe1880689503)](https://v.douyin.com/J9gUaVE/)<br>
|
||||||
|
CoolApk [@你们很有趣呢](http://www.coolapk.com/u/2416229)<br>
|
||||||
|
CoolApk [@情如风雪无常](http://www.coolapk.com/u/643670)<br>
|
||||||
|
CoolApk [@慕疵](http://www.coolapk.com/u/3286967)<br>
|
||||||
|
CoolApk [@社区最弱萌新](http://www.coolapk.com/u/3291313)<br>
|
||||||
|
CoolApk [@九方辰](http://www.coolapk.com/u/634078)<br>
|
||||||
|
CoolApk [@北极马可罗尼](http://www.coolapk.com/u/463478)<br>
|
||||||
|
Bilibili [@UTF16](https://space.bilibili.com/623364258)<br>
|
||||||
|
CoolApk [@Syngenex](http://www.coolapk.com/u/1093421)<br>
|
||||||
|
Twitter [Phoebe@huunhut1217](https://mobile.twitter.com/huunhut1217)<br>
|
||||||
|
CoolApk [@终究是错付了](http://www.coolapk.com/u/2293899)<br>
|
||||||
|
CoolApk [@DesperatU](http://www.coolapk.com/u/1075889)<br>
|
||||||
|
CoolApk [@明明酱](http://www.coolapk.com/u/1706128)<br>
|
||||||
|
CoolApk [@cxk的篮球](http://www.coolapk.com/u/1090769)<br>
|
||||||
|
CoolApk [@头条乀](http://www.coolapk.com/u/1192320)<br>
|
||||||
|
CoolApk [@Alusias](http://www.coolapk.com/u/808787)<br>
|
||||||
|
[chikin](mailto:2869826936@qq.com)<br>
|
||||||
|
CoolApk [@温茶予君](http://www.coolapk.com/u/1212499)<br>
|
||||||
|
CoolApk [@落红难相聚](http://www.coolapk.com/u/2082465)<br>
|
||||||
|
CoolApk [@bugjump233](http://www.coolapk.com/u/3294062)<br>
|
||||||
|
CoolApk [@阿基米德的船](http://www.coolapk.com/u/3283016)<br>
|
||||||
|
[2087131113@qq.com](mailto:2087131113@qq.com)<br>
|
||||||
|
CoolApk [@皮皮小猪猪](http://www.coolapk.com/u/5352224)<br>
|
||||||
|
CoolApk [@DoubleGGe](http://www.coolapk.com/u/7728656)<br>
|
||||||
|
[恋上猫的鱼~](mailto:shi1177121232@foxmail.com)<br>
|
||||||
|
[依稀(濒死动物)](mailto:3423451308@qq.com)<br>
|
||||||
|
[zhangjinteng](mailto:zhangjinteng@foxmail.com)<br>
|
||||||
|
Bilibili [@次卡安](https://space.bilibili.com/68420360)<br>
|
||||||
|
CoolApk [@ZyaIreZ](http://www.coolapk.com/u/1376183)<br>
|
||||||
|
CoolApk [@星释槐](http://www.coolapk.com/u/2168596)<br>
|
||||||
|
[KingXKK](mailto:fjjiangdonghan@outlook.com)<br>
|
||||||
|
CoolApk [@Leotoast](http://www.coolapk.com/u/2260385)<br>
|
||||||
|
[小柒不会玩红石](mailto:2126859202@qq.com)<br>
|
||||||
|
[我睡着的时候不困0v0](mailto:31610766@qq.com)<br>
|
||||||
|
[心酸的邂逅](mailto:3200546245@qq.com)<br>
|
||||||
|
|
||||||
|
## Translation
|
||||||
|
|
||||||
|
SkyAutoplayerScript version 21 has supported multi-language and can also fetch online language list, follow [contribute-translation.md](contribute-translation.md) (English) guide to contribute translation.
|
||||||
|
|
||||||
|
### Contributor
|
||||||
|
|
||||||
|
None
|
||||||
|
|
||||||
|
# Icon from:
|
||||||
|
|
||||||
|
[Iconfont-阿里巴巴矢量图标库](https://www.iconfont.cn/)
|
||||||
|
|
||||||
|
# Thanks to:
|
||||||
|
|
||||||
|
[projectXero](https://gitee.com/projectXero) (Provide `ListAdapter` used in Rhino)
|
||||||
|
|
||||||
|
# LICENSE
|
||||||
|
|
||||||
|
```
|
||||||
|
SkyAutoPlayer (AutoX script)
|
||||||
|
Copyright © 2020-2021 StageGuard
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||||
|
USA
|
||||||
|
```
|
||||||
330
README.md
330
README.md
@@ -1,8 +1,182 @@
|
|||||||
|
# SkyAutoPlayerScript
|
||||||
|
|
||||||
|
English: [README-en.md](README-en.md)
|
||||||
|
|
||||||
|
使用 [AutoX](https://github.com/kkevsekk1/AutoX) 提供的无障碍权限实现在 Sky光遇 中自动弹奏 [SkyStudio](https://play.google.com/store/apps/details?id=com.Maple.SkyStudio) 导出的曲谱
|
||||||
|
|
||||||
|
[](shared_sheets/) [](#共享乐谱) [](https://www.jsdelivr.com/)
|
||||||
|
|
||||||
|
~~不会进一步支持原神的21键琴和上传21键位的共享乐谱,反正15键又不是不能弹。~~
|
||||||
|
|
||||||
|
## [暂时解决 `Syntax error script.js#44(eval)#100` 的方法](https://github.com/StageGuard/SkyAutoPlayerScript/issues/17#issuecomment-1002640892)
|
||||||
|
|
||||||
|
## 特性
|
||||||
|
|
||||||
|
相比于其他脚本,SkyAutoPlayerScript 拥有以下优势
|
||||||
|
|
||||||
|
* 全 GUI 操作,无需编辑任何代码,流畅的UI动画。
|
||||||
|
* 多功能的弹奏控制面板,支持**暂停**, **进度控制**, **倍速控制**等。
|
||||||
|
* 通过引导自设定键位坐标,避免按压琴键的偏移问题。
|
||||||
|
* 在线[共享乐谱](https://github.com/StageGuard/SkyAutoPlayerScript/tree/master/shared_sheets),有许多优质乐谱。
|
||||||
|
* 自动更新,及时修复 BUG,无需担心版本过时问题。
|
||||||
|
* [多语言支持](#翻译)。
|
||||||
|
* ...
|
||||||
|
|
||||||
|
## 使用
|
||||||
|
|
||||||
|
以下两种方式仅需选择一种
|
||||||
|
|
||||||
|
<details> <summary>拷贝脚本(推荐)</summary>
|
||||||
|
|
||||||
|
1. 在 [Releases · kkevsekk1/AutoX](https://github.com/kkevsekk1/AutoX/releases) 中下载 AutoX。
|
||||||
|
|
||||||
|
> 注意:请提前悉知设备架构选择 `arm64-v8a` 或 `armeabi-v7a`,否则选择 `universal`。
|
||||||
|
|
||||||
|
2. 为 AutoX 开启**无障碍服务**和**悬浮窗权限**和**存储权限**。
|
||||||
|
|
||||||
|
3. 在 AutoX 中新建一个脚本并粘贴以下代码并运行:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
"ui";
|
||||||
|
"use strict";
|
||||||
|
const okhttp3 = Packages["okhttp3"];
|
||||||
|
(function(emitter) {
|
||||||
|
const client = (new okhttp3.OkHttpClient.Builder())
|
||||||
|
.connectTimeout(3, java.util.concurrent.TimeUnit.SECONDS)
|
||||||
|
.writeTimeout(3, java.util.concurrent.TimeUnit.SECONDS)
|
||||||
|
.readTimeout(3, java.util.concurrent.TimeUnit.SECONDS)
|
||||||
|
.build();
|
||||||
|
threads.start(function () {
|
||||||
|
emitter.emit("evaluate", (function () {
|
||||||
|
//Many sources
|
||||||
|
let sources = [
|
||||||
|
"https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript/source/SkyAutoplayer.js",
|
||||||
|
"http://cdn.stagex.top:8090/StageGuard/SkyAutoPlayerScript/raw/master/source/SkyAutoplayer.js",
|
||||||
|
"https://dl.skyautoplayerscript.stageguard.top/source/SkyAutoplayer.js",
|
||||||
|
"https://raw.githubusercontent.com/StageGuard/SkyAutoPlayerScript/master/source/SkyAutoplayer.js"
|
||||||
|
];
|
||||||
|
for (let i in sources) {
|
||||||
|
try {
|
||||||
|
let resp = client.newCall(
|
||||||
|
(new okhttp3.Request.Builder()).url(sources[i]).build()
|
||||||
|
).execute();
|
||||||
|
if (resp.code() == 200) return resp.body().string();
|
||||||
|
} catch(e) {
|
||||||
|
let err = "Failed on source " + sources[i] + " : " + e;
|
||||||
|
console.log(err); toast(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.show();
|
||||||
|
return null;
|
||||||
|
}()));
|
||||||
|
});
|
||||||
|
emitter.on('evaluate', s => { if(s != null) eval(s); });
|
||||||
|
}(events.emitter(threads.currentThread())));
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details> <summary>安装独立程序(仅 <code>arm64-v8a</code> 可用)</summary>
|
||||||
|
|
||||||
|
在 [Releases · StageGuard/SkyAutoPlayerScript](https://github.com/StageGuard/SkyAutoPlayerScript/releases) 中下载脚本独立打包程序,安装后即可使用。
|
||||||
|
|
||||||
|
首次启动时请同意程序申请的权限:**无障碍服务**和**悬浮窗权限**和**存储权限**。
|
||||||
|
|
||||||
|
> 注意:本程序申请的权限为 AutoX 打包程序自动控制,且仅申请使脚本运行的必要权限。
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## 兼容性
|
||||||
|
|
||||||
|
在 AutoX 版本 `6.3.6` 中测试通过。
|
||||||
|
|
||||||
|
## 清除数据
|
||||||
|
|
||||||
|
`SkyAutoPlayerScript` 在使用过程中会产生本地数据存储,若想全部删除,请使用 AutoX 执行以下代码
|
||||||
|
|
||||||
|
```
|
||||||
|
storages.remove("StageGuard:SkyAutoPlayer:Config");
|
||||||
|
files.removeDir("/storage/emulated/0/Documents/SkyAutoPlayer/");
|
||||||
|
```
|
||||||
|
|
||||||
|
# 上传乐谱
|
||||||
|
|
||||||
|
SkyAutoplayerScript 可以从这个仓库中的 `shared_sheets.json` 读取在线共享乐谱列表并可以方便地下载和弹奏。
|
||||||
|
|
||||||
|
你可以通过以下两种方式的任意一种方式来让你自制或经过原作者授权转载的乐谱在这个列表显示:
|
||||||
|
|
||||||
|
### 1. Pull Request
|
||||||
|
|
||||||
|
你可以克隆这个仓库,将你的乐谱添加到 `shared_sheets` 文件夹中,并按照以下要求在 `shared_sheets.json` 中添加新的项目:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{
|
||||||
|
//乐谱名称
|
||||||
|
"name": "Vicetone - Nevada",
|
||||||
|
//文件名
|
||||||
|
"file": "Nevada.txt",
|
||||||
|
//乐谱作者
|
||||||
|
"author": "StageGuard",
|
||||||
|
//乐谱简介
|
||||||
|
"desc": "Nevada SkyStudio钢琴版。\n内包含<u>比较复杂的和弦</u>,不适合手弹(笑\n你可以在SkyStudio的练习模式试试[狗头]",
|
||||||
|
//乐谱文件中的BPM
|
||||||
|
"bpm": 497,
|
||||||
|
//乐谱的键位数目(它是一个 15 键位乐谱还是 8 键位乐谱)
|
||||||
|
"keyCount": 15,
|
||||||
|
//乐谱文件中的音高
|
||||||
|
"pitchLevel": 3,
|
||||||
|
//键的数目
|
||||||
|
//乐谱文件中数组 songNotes 的长度
|
||||||
|
"noteCount": 1308,
|
||||||
|
//你的社交链接
|
||||||
|
//你可以添加多个
|
||||||
|
"social": [
|
||||||
|
{
|
||||||
|
//社交平台名称代号,现在支持 github, twitter, douyin(tiktok) and coolapk
|
||||||
|
"platform": "github",
|
||||||
|
//社交平台名称
|
||||||
|
"name": "GitHub",
|
||||||
|
//社交连接
|
||||||
|
"link": "https://github.com/StageGuard/"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
修改完成后,申请 `Pull Request` ,等待 merge 即可。
|
||||||
|
|
||||||
|
> 请注意:在申请`Pull Request`之前请确保你本地的 仓库已同步至最新,以免出现意外问题!
|
||||||
|
|
||||||
|
### 2. 如果你不是很懂 Github...
|
||||||
|
|
||||||
|
只需要把乐谱发送到邮箱 [beamiscool@qq.com](mailto:beamiscool@qq.com) 来交给我就行啦!别忘了附带乐谱简介!
|
||||||
|
|
||||||
|
# 注意!
|
||||||
|
|
||||||
|
### 请仔细阅读以下使用须知!
|
||||||
|
|
||||||
|
1. 未充分测试,若遇到 BUG ,请酷安私信 [@StageGuard](http://www.coolapk.com/u/1790774) 或新建 Issue 来反馈 BUG!
|
||||||
|
|
||||||
|
2. **SkyAutoplayerScript 是完全免费且开源的软件/脚本([https://github.com/StageGuard/SkyAutoPlayerScript](https://github.com/StageGuard/SkyAutoPlayerScript)),使用 SkyAutoplayerScript 盈利的同时请标注源项目链接。**
|
||||||
|
|
||||||
|
3. **共享乐谱不遵守 LGPL-2.1 协议,如您想在 SkyAutoPlayer 以外使用这些乐谱,请自行找乐谱作者授权!**
|
||||||
|
|
||||||
|
4. 本脚本仅可用作娱乐用途,请不要在正规场合使用本脚本(请自行体会\"正规场合\"是什么意思),若因使用本脚本所出现了一些不友好的问题,与脚本作者 StageGuard 无关。
|
||||||
|
|
||||||
|
5. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。
|
||||||
|
|
||||||
|
6. 本脚本只是一个"弹奏机",并不内置曲谱,请在 GooglePlay 下载 [SkyStudio](https://play.google.com/store/apps/details?id=com.Maple.SkyStudio) 编谱。
|
||||||
|
|
||||||
|
7. 本脚本不会增加解密乐谱功能,包括但不限于**加密的 SkyStudio 乐谱**,**加密的 JS** 等,也不接受加密乐谱的共享。
|
||||||
|
|
||||||
|
|
||||||
|
<details> <summary>针对上述第2, 3条出现的问题:</summary>
|
||||||
|
|
||||||
# 关于脚本倒卖的问题: [#1](https://github.com/StageGuard/SkyAutoPlayerScript/issues/1)
|
# 关于脚本倒卖的问题: [#1](https://github.com/StageGuard/SkyAutoPlayerScript/issues/1)
|
||||||
|
|
||||||
# 耻辱柱
|
# 耻辱柱
|
||||||
|
|
||||||
Gitee 用户[嗨游圈(@vipssp)](https://gitee.com/vipssp)在未经乐谱上传者的同意下私自盗用 SkyAutoplayerScript 与 Gitee 的[同步镜像](https://gitee.com/stageguard/SkyAutoPlayerScript)。
|
Gitee 用户[嗨游圈(@vipssp)](https://gitee.com/vipssp)在**未经乐谱上传者的同意下私自盗用** SkyAutoplayerScript 于 Gitee 的[同步镜像](https://gitee.com/stageguard/SkyAutoPlayerScript)到它的 [Gitee 仓库](https://gitee.com/vipssp/SkyAutoPlayerScript/)。
|
||||||
|
|
||||||
在经过[通知](https://gitee.com/vipssp/SkyAutoPlayerScript/commit/197925a71ff9cc6248be682a55406fc5814b12d7#note_3637784)后仍未及时删除盗用的乐谱,在于一些乐谱原作者沟通后,决定将其挂在此 README.md 首部,以告示。
|
在经过[通知](https://gitee.com/vipssp/SkyAutoPlayerScript/commit/197925a71ff9cc6248be682a55406fc5814b12d7#note_3637784)后仍未及时删除盗用的乐谱,在于一些乐谱原作者沟通后,决定将其挂在此 README.md 首部,以告示。
|
||||||
|
|
||||||
@@ -25,138 +199,29 @@ Gitee 用户[嗨游圈(@vipssp)](https://gitee.com/vipssp)在未经乐谱上传
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
# SkyAutoPlayerScript
|
|
||||||
|
|
||||||
A script to play Sheets generated by SkyStudio automatically in game Sky with accessibility services using Auto.js
|
|
||||||
</br>使用Auto.js提供的无障碍权限实现在Sky光遇中自动弹奏[SkyStudio](https://play.google.com/store/apps/details?id=com.Maple.SkyStudio)导出的曲谱
|
|
||||||
|
|
||||||
## 特性
|
|
||||||
|
|
||||||
相比于其他脚本,SkyAutoPlayerScript拥有以下优势
|
|
||||||
|
|
||||||
* 全GUI操作,无需编辑任何代码,流畅的UI动画。
|
|
||||||
* 完整的弹奏控制面板,支持**暂停**, **进度控制**, **倍速控制**等
|
|
||||||
* 自设定键位坐标,避免按压琴键的偏移问题
|
|
||||||
* 在线[共享乐谱](https://github.com/StageGuard/SkyAutoPlayerScript/tree/master/shared_sheets),有许多优质乐谱。</br>~~(甚至有的乐谱复杂到根本无法手弹)~~
|
|
||||||
* 自动更新,及时修复BUG,无需担心版本过时问题。
|
|
||||||
* ...
|
|
||||||
|
|
||||||
## 使用(Usage)
|
|
||||||
|
|
||||||
<br>①Auto.js`4.1.1 Alpha2 (461)`版本下载: [`Ericwyn/Auto.js/releases@V4.1.1.Alpha2`](https://github.com/Ericwyn/Auto.js/releases/tag/V4.1.1.Alpha2)
|
|
||||||
<br>Download `Auto.js`[`Ericwyn/Auto.js/releases@V4.1.1.Alpha2`](https://github.com/Ericwyn/Auto.js/releases/tag/V4.1.1.Alpha2)
|
|
||||||
<br>手机请下载`autoJs-V4.1.1.Alpha2-common-armeabi-v7a-debug.apk`
|
|
||||||
<br>Please download `autoJs-V4.1.1.Alpha2-common-armeabi-v7a-debug.apk`
|
|
||||||
<br>②为Auto.js开启**无障碍服务**和**悬浮窗权限**。
|
|
||||||
<br>Turn on **Accessibility service** and allow **Display pop-up window** permission for Auto.js
|
|
||||||
<br>③在Auto.js中新建一个脚本并粘贴以下代码并运行:
|
|
||||||
<br>Create a new script file in Auto.js. Copy the code below and run!
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
"ui";
|
|
||||||
"use strict";
|
|
||||||
var emitter = events.emitter(threads.currentThread());
|
|
||||||
threads.start(function() {
|
|
||||||
emitter.emit("evaluate", (function(){
|
|
||||||
var resp = http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/source/SkyAutoplayer.js");
|
|
||||||
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
|
||||||
return resp.body.string();
|
|
||||||
} else {
|
|
||||||
resp = http.get("https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/gitVersion").body.string() + "/source/SkyAutoplayer.js");
|
|
||||||
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
|
||||||
return resp.body.string();
|
|
||||||
} else {
|
|
||||||
return "console.show();console.log(\"Failed to load script\")";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}()));
|
|
||||||
});
|
|
||||||
emitter.on('evaluate', function(s){
|
|
||||||
eval(s);
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
在Auto.js版本`4.1.1 Alpha2 (461)`中测试通过,不保证其他版本的兼容性(取决于其他版本相对于此版本的API是否有`breaking changes`)
|
|
||||||
|
|
||||||
## 清除数据(Clear data)
|
|
||||||
|
|
||||||
`SkyAutoPlayerScript`在使用过程中会产生本地数据存储,若想全部删除,请使用Auto.js执行以下代码
|
|
||||||
<br>`SkyAutoPlayerScript` will store some data while using, if you want to delete all data, please run the code below in Auto.js
|
|
||||||
|
|
||||||
```
|
|
||||||
storages.remove("StageGuard:SkyAutoPlayer:Config");
|
|
||||||
files.removeDir("/storage/emulated/0/Documents/SkyAutoPlayer/");
|
|
||||||
```
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
# 上传乐谱
|
|
||||||
|
|
||||||
你可以fork本仓库,将你要上传的乐谱添加至`shared_sheets`文件夹,并按照以下要求在`shared_sheets.json`添加项目
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
{
|
|
||||||
//乐谱名称
|
|
||||||
"name": "SheetName",
|
|
||||||
//乐谱文件名(于shared_sheets文件夹中)
|
|
||||||
"file": "SheetName.txt",
|
|
||||||
//你的id
|
|
||||||
"author": "Author",
|
|
||||||
//乐谱简介
|
|
||||||
"desc": "This is a description about my sheet",
|
|
||||||
//乐谱BPM
|
|
||||||
"bpm" : 320,
|
|
||||||
//暂时没用
|
|
||||||
"suggested_instrument": 1,
|
|
||||||
//乐谱键位数(8键或15键)
|
|
||||||
"keyCount": 15,
|
|
||||||
//乐谱音高
|
|
||||||
"pitchLevel": 0
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
修改完成后,申请`Pull Request`,等待merge即可。
|
|
||||||
|
|
||||||
> 请注意:在申请`Pull Request`之前请确保你的SkyAutoPlayerScript仓库已同步至最新,以免出现意外问题!
|
|
||||||
|
|
||||||
或通过发送乐谱到邮箱[beamiscool@qq.com](mailto:beamiscool@qq.com)
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
# 注意
|
|
||||||
|
|
||||||
### 请仔细阅读以下使用须知!
|
|
||||||
|
|
||||||
1. 未充分测试,若遇到BUG,请酷安私信@StageGuard或新建Issue来反馈BUG!
|
|
||||||
2. **SkyAutoPlayer是完全免费且开源的软件/脚本([https://github.com/StageGuard/SkyAutoPlayerScript](https://github.com/StageGuard/SkyAutoPlayerScript)),使用SkyAutoPlayer盈利的同时请标注源项目链接。**
|
|
||||||
3. **共享乐谱不遵守LGPL-2.1协议,如您想在SkyAutoPlayer以外使用这些乐谱,请自行找乐谱作者授权!**
|
|
||||||
4. 本脚本仅可用作娱乐用途,请不要在正规场合使用本脚本(请自行体会\"正规场合\"是什么意思),若因使用本脚本所出现了一些不友好的问题,与脚本作者StageGuard无关。
|
|
||||||
5. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。
|
|
||||||
6. 本脚本只是一个"弹奏机",并不内置曲谱,请在GooglePlay下载[SkyStudio](https://play.google.com/store/apps/details?id=com.Maple.SkyStudio)编谱。
|
|
||||||
7. 本脚本不会增加解密乐谱功能,包括但不限于**加密的SkyStudio乐谱**,**加密的JS**等,也不接受加密乐谱的共享。
|
|
||||||
|
|
||||||
# 贡献
|
# 贡献
|
||||||
|
|
||||||
欢迎任何人贡献本项目,包括但不限于 Pull Request,Issue,New feature request 或者贡献翻译。
|
欢迎任何人贡献本项目,包括但不限于 Pull Request,Issue,New feature request 或者贡献翻译。
|
||||||
|
|
||||||
|
### ⚠️警告
|
||||||
|
CodeFactor 代码评估: [](https://www.codefactor.io/repository/github/stageguard/skyautoplayerscript)
|
||||||
|
|
||||||
|
由于项目为单脚本文件,未将不同模块分离至文件,即所有功能均在一个文件实现;再加上我糟糕的代码技能,源码会非常难读。
|
||||||
|
|
||||||
## 贡献者名单(按照首次贡献时间排序)
|
## 贡献者
|
||||||
|
|
||||||
### SkyAutoPlayerScript
|
### SkyAutoPlayerScript
|
||||||
|
|
||||||
[@tiaod](https://github.com/tiaod)<br>
|
[@tiaod](https://github.com/tiaod)
|
||||||
<br>
|
|
||||||
|
|
||||||
### 共享乐谱
|
### 共享乐谱
|
||||||
|
|
||||||
酷安[@Aex技术总监](http://www.coolapk.com/u/1286879)<br>
|
酷安[@Aex技术总监](http://www.coolapk.com/u/1286879)<br>
|
||||||
酷安[@夏卡卡卡](http://www.coolapk.com/u/2313452)<br>
|
酷安[@夏卡卡卡](http://www.coolapk.com/u/2313452)<br>
|
||||||
酷安[@深空失忆か](http://www.coolapk.com/u/3005974)<br>
|
酷安[@深空失忆か](http://www.coolapk.com/u/3005974)<br>
|
||||||
抖音@子哲啊🌈(zizhe1880689503)<br>
|
抖音[@子哲啊🌈(zizhe1880689503)](https://v.douyin.com/J9gUaVE/)<br>
|
||||||
酷安[@你们很有趣呢](http://www.coolapk.com/u/2416229)<br>
|
酷安[@你们很有趣呢](http://www.coolapk.com/u/2416229)<br>
|
||||||
酷安[@情如风雪无常](http://www.coolapk.com/u/643670)<br>
|
酷安[@情如风雪无常](http://www.coolapk.com/u/643670)<br>
|
||||||
酷安[@慕疵](http://www.coolapk.com/u/3286967)<br>
|
酷安[@慕疵](http://www.coolapk.com/u/3286967)<br>
|
||||||
@@ -171,33 +236,48 @@ Twitter[Phoebe@huunhut1217](https://mobile.twitter.com/huunhut1217)<br>
|
|||||||
酷安[@明明酱](http://www.coolapk.com/u/1706128)<br>
|
酷安[@明明酱](http://www.coolapk.com/u/1706128)<br>
|
||||||
酷安[@cxk的篮球](http://www.coolapk.com/u/1090769)<br>
|
酷安[@cxk的篮球](http://www.coolapk.com/u/1090769)<br>
|
||||||
酷安[@头条乀](http://www.coolapk.com/u/1192320)<br>
|
酷安[@头条乀](http://www.coolapk.com/u/1192320)<br>
|
||||||
<br>
|
酷安[@Alusias](http://www.coolapk.com/u/808787)<br>
|
||||||
|
[chikin](mailto:2869826936@qq.com)<br>
|
||||||
|
酷安[@温茶予君](http://www.coolapk.com/u/1212499)<br>
|
||||||
|
酷安[@落红难相聚](http://www.coolapk.com/u/2082465)<br>
|
||||||
|
酷安[@bugjump233](http://www.coolapk.com/u/3294062)<br>
|
||||||
|
酷安[@阿基米德的船](http://www.coolapk.com/u/3283016)<br>
|
||||||
|
[2087131113@qq.com](mailto:2087131113@qq.com)<br>
|
||||||
|
酷安[@皮皮小猪猪](http://www.coolapk.com/u/5352224)<br>
|
||||||
|
酷安[@DoubleGGe](http://www.coolapk.com/u/7728656)<br>
|
||||||
|
[恋上猫的鱼~](mailto:shi1177121232@foxmail.com)<br>
|
||||||
|
[依稀(濒死动物)](mailto:3423451308@qq.com)<br>
|
||||||
|
[zhangjinteng](mailto:zhangjinteng@foxmail.com)<br>
|
||||||
|
哔哩哔哩[@次卡安](https://space.bilibili.com/68420360)<br>
|
||||||
|
酷安[@ZyaIreZ](http://www.coolapk.com/u/1376183)<br>
|
||||||
|
酷安[@星释槐](http://www.coolapk.com/u/2168596)<br>
|
||||||
|
[KingXKK](mailto:fjjiangdonghan@outlook.com)<br>
|
||||||
|
酷安[@Leotoast](http://www.coolapk.com/u/2260385)<br>
|
||||||
|
[小柒不会玩红石](mailto:2126859202@qq.com)<br>
|
||||||
|
[我睡着的时候不困0v0](mailto:31610766@qq.com)<br>
|
||||||
|
[心酸的邂逅](mailto:3200546245@qq.com)<br>
|
||||||
|
|
||||||
## 翻译
|
## 翻译
|
||||||
|
|
||||||
SkyAutoplayerScript 在版本 21 已支持多语言并可以在线获取语言列表,你可以查看 [contribute-translation.md](contribute-translation.md) (English) 来了解如何贡献翻译。
|
SkyAutoplayerScript 在版本 21 已支持多语言并可以在线获取语言列表,你可以查看 [contribute-translation.md](contribute-translation.md) (English) 来了解如何贡献翻译。
|
||||||
|
|
||||||
SkyAutoplayerScript version 21 has supported multi-language and can also fetch online language list, follow [contribute-translation.md](contribute-translation.md) (English) guide to contribute translation.
|
### 贡献者
|
||||||
|
|
||||||
### 贡献者:
|
|
||||||
|
|
||||||
无
|
无
|
||||||
|
|
||||||
# 图标来源
|
# 图标来源
|
||||||
|
|
||||||
[Iconfont-阿里巴巴矢量图标库](https://www.iconfont.cn/)
|
[Iconfont-阿里巴巴矢量图标库](https://www.iconfont.cn/)
|
||||||
<br>
|
|
||||||
|
|
||||||
# 鸣谢
|
# 鸣谢
|
||||||
|
|
||||||
[projectXero](https://gitee.com/projectXero) (提供适用于Rhino的`ListAdapter`)
|
[projectXero](https://gitee.com/projectXero) (提供适用于Rhino的`ListAdapter`)
|
||||||
<br>
|
|
||||||
|
|
||||||
# 许可证协议
|
# 许可证协议
|
||||||
|
|
||||||
```
|
```
|
||||||
SkyAutoPlayer (Auto.js script)
|
SkyAutoPlayer (AutoX script)
|
||||||
Copyright © 2020 StageGuard
|
Copyright © 2020-2021 StageGuard
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Lesser General Public
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ Follow [Issue#4](https://github.com/StageGuard/SkyAutoPlayerScript/issues/4) req
|
|||||||
|
|
||||||
It can also fetch online language list [source/language_list.json](https://github.com/StageGuard/SkyAutoPlayerScript/blob/master/source/language_list.json). So if you want to translate SkyAutoplayerScript into another language, please follow the steps below.
|
It can also fetch online language list [source/language_list.json](https://github.com/StageGuard/SkyAutoPlayerScript/blob/master/source/language_list.json). So if you want to translate SkyAutoplayerScript into another language, please follow the steps below.
|
||||||
|
|
||||||
|
## Translate to a new language
|
||||||
|
|
||||||
- Clone this repository.
|
- Clone this repository.
|
||||||
- Create a new file in **resources/language_pack/xx_XX.json**, the file name must be standard language code (e.g. zh_CN or en_US).
|
- Create a new file in **resources/language_pack/xx_XX.json**, the file name must be standard language code (e.g. zh_CN or en_US).
|
||||||
- You can refer to **resources/language_pack/en_US.json** to translate.
|
- You can refer to [resources/language_pack/en_US.json](https://github.com/StageGuard/SkyAutoPlayerScript/blob/master/resources/language_pack/en_US.json) to translate.
|
||||||
- Modify **source/language_list.json**:
|
- Modify **source/language_list.json**:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@@ -27,4 +29,13 @@ It can also fetch online language list [source/language_list.json](https://githu
|
|||||||
|
|
||||||
After merging, your language will be shown in Setting-Language list.
|
After merging, your language will be shown in Setting-Language list.
|
||||||
|
|
||||||
|
## Fix a wrong translation
|
||||||
|
|
||||||
|
- Clone this repository.
|
||||||
|
- Correct wrong translations.
|
||||||
|
- Update `version` number(+1) of target language in language file and [source/language_list.json](https://github.com/StageGuard/SkyAutoPlayerScript/blob/master/source/language_list.json).
|
||||||
|
- Create a new pull request.
|
||||||
|
|
||||||
|
After merging, SkyAutoplayerScript will notify users who uses this language to update.
|
||||||
|
|
||||||
I would appreciate it if you could contribute translation!
|
I would appreciate it if you could contribute translation!
|
||||||
@@ -1 +1 @@
|
|||||||
2429897df58cc98ee3e9803ecc021fb1d43a02ac
|
6067ff139bc0bd3c7542535ecacc83e4d1831b1a
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "English (US)",
|
"name": "English (US)",
|
||||||
"code": "en_US",
|
"code": "en_US",
|
||||||
|
"version": 5,
|
||||||
"content": {
|
"content": {
|
||||||
"launch_tip_in_content": "If you can't see a diamond popup dialog,<br>make sure that Auto.js is allowed to <u><b>display pop-up window</u></b><br><br><br>Version <b>4.1.1 Alpha2</b> is recommended.<br><b>4.1.1 Alpha2</b> Download: <a href=https://github.com/Ericwyn/Auto.js/releases/tag/V4.1.1.Alpha2>https://github.com/Ericwyn/Auto.js/releases/tag/V4.1.1.Alpha2</a>",
|
"launch_tip_in_content": "If you can't see a diamond popup dialog,<br>make sure that AutoX is allowed to <u><b>display pop-up window</u></b>",
|
||||||
"launch_tip_force_exit": "FORCE EXIT",
|
"launch_tip_force_exit": "FORCE EXIT",
|
||||||
"launch_tip_storage_on_android11": "In Android R, access private data folder of other apps is forbidden, sheet folder has set to {0}",
|
"launch_tip_storage_on_android11": "In Android R, access private data folder of other apps is forbidden, sheet folder has set to {0}",
|
||||||
|
|
||||||
@@ -40,14 +41,14 @@
|
|||||||
"page_lc_load_failed_r3": "Are any syntax error in this sheet.",
|
"page_lc_load_failed_r3": "Are any syntax error in this sheet.",
|
||||||
"page_lc_loading_sheet": "Loading: {0} total({1} failed)",
|
"page_lc_loading_sheet": "Loading: {0} total({1} failed)",
|
||||||
|
|
||||||
"page_sc_title": "Shared heet",
|
"page_sc_title": "Shared sheet",
|
||||||
"page_sc_navigation_title": "SHARED",
|
"page_sc_navigation_title": "SHARED",
|
||||||
"page_sc_downloading": "Downloading...",
|
"page_sc_downloading": "Downloading...",
|
||||||
"page_sc_analyzing": "Parsing...",
|
"page_sc_analyzing": "Parsing...",
|
||||||
"page_sc_download_success": "Download successful: {0}\nPlease press refresh button in local sheet page.",
|
"page_sc_download_success": "Download successful: {0}\nPlease press refresh button in local sheet page.",
|
||||||
"page_sc_download_failed": "Failed to download {0}: {1}",
|
"page_sc_download_failed": "Failed to download {0}: {1}",
|
||||||
"page_sc_upload_title": "How to upload your local sheet",
|
"page_sc_upload_title": "How to upload your local sheet",
|
||||||
"page_sc_upload_desc": "There are two ways:\n\n①Mail to beamiscool@qq.com with attachment file.\n(Sheet description is optional.)\n\n②Pull request to StageGuard/SkyAutoplayerScript\n\n③PM to @StageGuard in CoolApk with sheet link.\nPut your sheet file to shared_sheets folder and modify shared_sheets.json\n\nWarning: If the sheet is not translated or composed by yourself, you must gain the permission of original composer or translator.\n\nWelcome to expand the shared sheet list!",
|
"page_sc_upload_desc": "There are three ways:\n\n1. Mail to beamiscool@qq.com with attachment file.\n(Sheet description is optional.)\n\n2. Create a pull request to StageGuard/SkyAutoplayerScript\n\n3. PM to @StageGuard in CoolApk with sheet link.\nPut your sheet file to shared_sheets folder and modify shared_sheets.json\n\nWarning: If the sheet is not translated or composed by yourself, you must gain the permission of original composer or translator.\n\nWelcome to expand the shared sheet list!",
|
||||||
"page_sc_upload_open_coolapk": "Open CoolApk",
|
"page_sc_upload_open_coolapk": "Open CoolApk",
|
||||||
"page_sc_upload_open_github": "Open GitHub",
|
"page_sc_upload_open_github": "Open GitHub",
|
||||||
"page_sc_upload_ca_not_exist": "Application CookApk is not installed on your device",
|
"page_sc_upload_ca_not_exist": "Application CookApk is not installed on your device",
|
||||||
@@ -77,6 +78,7 @@
|
|||||||
"page_setting_changelog_title": "Changelog",
|
"page_setting_changelog_title": "Changelog",
|
||||||
"page_setting_exit_script": "Exit",
|
"page_setting_exit_script": "Exit",
|
||||||
"page_setting_language": "Language",
|
"page_setting_language": "Language",
|
||||||
|
"page_setting_chord_delay": "Delay of each chord key",
|
||||||
|
|
||||||
"gui_player_panel_tip": "Drag the title text of the title bar to move the suspension window of the performance control panel.",
|
"gui_player_panel_tip": "Drag the title text of the title bar to move the suspension window of the performance control panel.",
|
||||||
"gui_player_penel_analyzing": "Parsing...",
|
"gui_player_penel_analyzing": "Parsing...",
|
||||||
@@ -102,7 +104,14 @@
|
|||||||
"res_use_language": "Use language: {0}",
|
"res_use_language": "Use language: {0}",
|
||||||
"res_language_dialog_title": "Choose language",
|
"res_language_dialog_title": "Choose language",
|
||||||
"res_language_download_failed": "Failed to download language pack: {0}",
|
"res_language_download_failed": "Failed to download language pack: {0}",
|
||||||
"res_language_dialog_tip": "Your language is not on the list?<br>Welcome to translate the script:<br><a href=>https://github.com/StageGuard/SkyAutoPlayerScript</a>",
|
"res_language_dialog_tip": "Your language is not on the list?<br>Welcome to translate the script:<br><a href=>https://github.com/StageGuard/SkyAutoPlayerScript/blob/master/contribute-translation.md</a>",
|
||||||
"res_language_failed_fetch_online_list": "Failed to fetch online language list"
|
"res_language_failed_fetch_online_list": "Failed to fetch online language list",
|
||||||
|
"res_language_update_needed": "Language pack need to be updated, please go to setting->language and click current language again to upgrade.",
|
||||||
|
|
||||||
|
"page_setting_no_popup_play": "Close panel in playing",
|
||||||
|
"page_setting_no_popup_play_interval": "Interval to play when close panel",
|
||||||
|
"no_popup_play_warning_title": "WARNING",
|
||||||
|
"no_popup_play_warning": "You have enabled \"Close panel in playing\" opinion!\nPlay without control panel is <b>extremely dangerous</b>.\n\nWhen popup notification or bubble chat appears, script may touch these popup window by mistake. At this time, script is still running(or playing) and is <b>uninterrupted</b>. You have no way to stop playing but wait.\n<b>Script touch in other pages may causes irreparable harm.</b>\n\nBesides, record play process is uesless and doesn't give you sense of satisfaction.\n\nI have already warned you that if there is any loss or dispute caused by using this function, it has nothing to do with the SkyAutoplayer script and the script author StageGuard.\nIf continue, please click the confirm button, or otherwise click the Cancel button.\n\nps. \"Random and continuate play\" will not work.",
|
||||||
|
"no_popup_play_tip": "Script will start playing in {0} seconds."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "简体中文",
|
"name": "简体中文",
|
||||||
"code": "zh_CN",
|
"code": "zh_CN",
|
||||||
|
"version": 5,
|
||||||
"content": {
|
"content": {
|
||||||
"launch_tip_in_content": "当你发现什么事情都没有发生时<br>也许你应该看看是否授予了Auto.js<u><b>悬浮窗权限</u></b><br><br><br>建议使用 <b>4.1.1 Alpha2</b> 版本!<br><b>4.1.1 Alpha2</b> 版本下载: <a href=https://github.com/Ericwyn/Auto.js/releases/tag/V4.1.1.Alpha2>https://github.com/Ericwyn/Auto.js/releases/tag/V4.1.1.Alpha2</a>",
|
"launch_tip_in_content": "当你发现什么事情都没有发生时<br>也许你应该看看是否授予了 AutoX<u><b>悬浮窗权限</u></b>",
|
||||||
"launch_tip_force_exit": "强制退出",
|
"launch_tip_force_exit": "强制退出",
|
||||||
"launch_tip_storage_on_android11": "安卓11不允许外部应用读取应用私有文件夹,乐谱文件夹移至 {0}",
|
"launch_tip_storage_on_android11": "安卓11不允许外部应用读取应用私有文件夹,乐谱文件夹移至 {0}",
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@
|
|||||||
"page_sc_download_success": "下载完成: {0}\n请在本地曲谱页面刷新",
|
"page_sc_download_success": "下载完成: {0}\n请在本地曲谱页面刷新",
|
||||||
"page_sc_download_failed": "下载 {0} 失败: {1}",
|
"page_sc_download_failed": "下载 {0} 失败: {1}",
|
||||||
"page_sc_upload_title": "如何上传乐谱",
|
"page_sc_upload_title": "如何上传乐谱",
|
||||||
"page_sc_upload_desc": "共有两种方式可以上传乐谱:\n\n①酷安私信@StageGuard,发送时请附带简介,曲谱链接(百度云或其他云盘都可)\n②在github fork StageGuard/SkyAutoplayerScript\n在shared_sheets文件夹添加你的曲谱,并按照格式修改shared_sheets.json\n并提出 Pull Request 合并申请\n\n注:若是转载转载请注明原作者同意\n\n如果所有人都白嫖,那么这个列表将永远也不会扩充",
|
"page_sc_upload_desc": "共有三种方式可以上传乐谱:\n\n1. 酷安私信@StageGuard,发送时请附带简介,曲谱链接(百度云或其他云盘都可)\n2. 在github fork StageGuard/SkyAutoplayerScript\n在shared_sheets文件夹添加你的曲谱,并按照格式修改shared_sheets.json\n并提出 Pull Request 合并申请。\n\n3. 发送乐谱文件到 beamiscool@qq.com\n\n注:若是转载转载请注明原作者同意\n\n如果所有人都白嫖,那么这个列表将永远也不会扩充",
|
||||||
"page_sc_upload_open_coolapk": "打开酷安",
|
"page_sc_upload_open_coolapk": "打开酷安",
|
||||||
"page_sc_upload_open_github": "打开 Github",
|
"page_sc_upload_open_github": "打开 Github",
|
||||||
"page_sc_upload_ca_not_exist": "无法打开酷安,应用不存在!",
|
"page_sc_upload_ca_not_exist": "无法打开酷安,应用不存在!",
|
||||||
@@ -77,6 +78,7 @@
|
|||||||
"page_setting_changelog_title": "更新日志",
|
"page_setting_changelog_title": "更新日志",
|
||||||
"page_setting_exit_script": "结束脚本运行",
|
"page_setting_exit_script": "结束脚本运行",
|
||||||
"page_setting_language": "语言",
|
"page_setting_language": "语言",
|
||||||
|
"page_setting_chord_delay": "和弦按压延迟",
|
||||||
|
|
||||||
"gui_player_panel_tip": "拖动标题栏的标题文字来移动弹奏控制面板悬浮窗。",
|
"gui_player_panel_tip": "拖动标题栏的标题文字来移动弹奏控制面板悬浮窗。",
|
||||||
"gui_player_penel_analyzing": "解析中...",
|
"gui_player_penel_analyzing": "解析中...",
|
||||||
@@ -102,7 +104,14 @@
|
|||||||
"res_use_language": "使用语言: {0}",
|
"res_use_language": "使用语言: {0}",
|
||||||
"res_language_dialog_title": "选择语言",
|
"res_language_dialog_title": "选择语言",
|
||||||
"res_language_download_failed": "语言下载失败:{0}",
|
"res_language_download_failed": "语言下载失败:{0}",
|
||||||
"res_language_dialog_tip": "找不到你的语言?欢迎贡献翻译:<br><a href=>https://github.com/StageGuard/SkyAutoPlayerScript</a>",
|
"res_language_dialog_tip": "找不到你的语言?欢迎贡献翻译:<br><a href=>https://github.com/StageGuard/SkyAutoPlayerScript/blob/master/contribute-translation.md</a>",
|
||||||
"res_language_failed_fetch_online_list": "无法获取在线语言列表"
|
"res_language_failed_fetch_online_list": "无法获取在线语言列表",
|
||||||
|
"res_language_update_needed": "语言需要更新,请前往设置界面重新点击当前语言来更新",
|
||||||
|
|
||||||
|
"page_setting_no_popup_play": "弹奏不显示悬浮窗",
|
||||||
|
"page_setting_no_popup_play_interval": "无悬浮窗弹奏开始间隔",
|
||||||
|
"no_popup_play_warning_title": "警告",
|
||||||
|
"no_popup_play_warning": "您已经开启\"弹奏不显示悬浮窗\"选项!\n弹奏不受弹奏面板控制是<b>非常危险的</b>。\n\n当出现顶部悬浮通知(例如QQ消息)或气泡对话时,脚本可能会误触消息并开启其他软件,此时脚本依旧在运行中(弹奏中)且<b>无法被打断</b>。也就是说除了等待弹奏完成以外,没有任何办法终止弹奏。\n<b>脚本在其他界面的误触可能会对您造成不可挽回的损失!</b>\n\n另外,使用此功能且录屏不会使你获得任何成就感。\n\n我已经警告过你了,若因使用此功能造成了损失或纠纷,与 SkyAutoPlayer 脚本和脚本作者 StageGuard 无关,请悉知。\n若继续使用,请点击确认按钮,否则请点击取消按钮。\n\n注意:使用此功能时,\"连续随机播放\"功能将不会生效。",
|
||||||
|
"no_popup_play_tip": "将在 {0} 秒后开始弹奏。"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
resources/mail.png
Normal file
BIN
resources/mail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
1311
shared_sheets.json
1311
shared_sheets.json
File diff suppressed because it is too large
Load Diff
BIN
shared_sheets/-遠い空へ.txt
Normal file
BIN
shared_sheets/-遠い空へ.txt
Normal file
Binary file not shown.
BIN
shared_sheets/Arrietty's_Song.txt
Normal file
BIN
shared_sheets/Arrietty's_Song.txt
Normal file
Binary file not shown.
BIN
shared_sheets/Bad_Apple.txt
Normal file
BIN
shared_sheets/Bad_Apple.txt
Normal file
Binary file not shown.
BIN
shared_sheets/Happy Birthday to You.txt
Normal file
BIN
shared_sheets/Happy Birthday to You.txt
Normal file
Binary file not shown.
BIN
shared_sheets/Lemon(C调).txt
Normal file
BIN
shared_sheets/Lemon(C调).txt
Normal file
Binary file not shown.
BIN
shared_sheets/Never_Gonna_Give_You_Up.txt
Normal file
BIN
shared_sheets/Never_Gonna_Give_You_Up.txt
Normal file
Binary file not shown.
BIN
shared_sheets/Pachelbel's Canon(D大调卡农).txt
Normal file
BIN
shared_sheets/Pachelbel's Canon(D大调卡农).txt
Normal file
Binary file not shown.
BIN
shared_sheets/Silhouette.txt
Normal file
BIN
shared_sheets/Silhouette.txt
Normal file
Binary file not shown.
BIN
shared_sheets/Take me hand.txt
Normal file
BIN
shared_sheets/Take me hand.txt
Normal file
Binary file not shown.
BIN
shared_sheets/TheWorldRevolving.txt
Normal file
BIN
shared_sheets/TheWorldRevolving.txt
Normal file
Binary file not shown.
BIN
shared_sheets/old memory.txt
Normal file
BIN
shared_sheets/old memory.txt
Normal file
Binary file not shown.
BIN
shared_sheets/rush e.txt
Normal file
BIN
shared_sheets/rush e.txt
Normal file
Binary file not shown.
BIN
shared_sheets/いつも何度でも_F.txt
Normal file
BIN
shared_sheets/いつも何度でも_F.txt
Normal file
Binary file not shown.
BIN
shared_sheets/リテラチュア(双手简谱).txt
Normal file
BIN
shared_sheets/リテラチュア(双手简谱).txt
Normal file
Binary file not shown.
BIN
shared_sheets/リテラチュア.txt
Normal file
BIN
shared_sheets/リテラチュア.txt
Normal file
Binary file not shown.
BIN
shared_sheets/万疆.txt
Normal file
BIN
shared_sheets/万疆.txt
Normal file
Binary file not shown.
BIN
shared_sheets/三葉のテーマ.txt
Normal file
BIN
shared_sheets/三葉のテーマ.txt
Normal file
Binary file not shown.
BIN
shared_sheets/不能说的秘密.txt
Normal file
BIN
shared_sheets/不能说的秘密.txt
Normal file
Binary file not shown.
BIN
shared_sheets/两只老虎爱跳舞.txt
Normal file
BIN
shared_sheets/两只老虎爱跳舞.txt
Normal file
Binary file not shown.
BIN
shared_sheets/人鱼的眼泪.txt
Normal file
BIN
shared_sheets/人鱼的眼泪.txt
Normal file
Binary file not shown.
BIN
shared_sheets/仙剑问情.txt
Normal file
BIN
shared_sheets/仙剑问情.txt
Normal file
Binary file not shown.
BIN
shared_sheets/修炼爱情.txt
Normal file
BIN
shared_sheets/修炼爱情.txt
Normal file
Binary file not shown.
BIN
shared_sheets/养云的猫.txt
Normal file
BIN
shared_sheets/养云的猫.txt
Normal file
Binary file not shown.
BIN
shared_sheets/冬日恋歌(My Memory).txt
Normal file
BIN
shared_sheets/冬日恋歌(My Memory).txt
Normal file
Binary file not shown.
BIN
shared_sheets/冬眠.txt
Normal file
BIN
shared_sheets/冬眠.txt
Normal file
Binary file not shown.
BIN
shared_sheets/北京东路的日子.txt
Normal file
BIN
shared_sheets/北京东路的日子.txt
Normal file
Binary file not shown.
BIN
shared_sheets/告白气球.txt
Normal file
BIN
shared_sheets/告白气球.txt
Normal file
Binary file not shown.
BIN
shared_sheets/外婆的澎湖湾.txt
Normal file
BIN
shared_sheets/外婆的澎湖湾.txt
Normal file
Binary file not shown.
BIN
shared_sheets/多情种.txt
Normal file
BIN
shared_sheets/多情种.txt
Normal file
Binary file not shown.
BIN
shared_sheets/夜空中最亮的星.txt
Normal file
BIN
shared_sheets/夜空中最亮的星.txt
Normal file
Binary file not shown.
BIN
shared_sheets/她说.txt
Normal file
BIN
shared_sheets/她说.txt
Normal file
Binary file not shown.
BIN
shared_sheets/宾克斯的美酒.txt
Normal file
BIN
shared_sheets/宾克斯的美酒.txt
Normal file
Binary file not shown.
BIN
shared_sheets/慢慢喜欢你.txt
Normal file
BIN
shared_sheets/慢慢喜欢你.txt
Normal file
Binary file not shown.
BIN
shared_sheets/成龙 - 国家.txt
Normal file
BIN
shared_sheets/成龙 - 国家.txt
Normal file
Binary file not shown.
BIN
shared_sheets/我和我的祖国.txt
Normal file
BIN
shared_sheets/我和我的祖国.txt
Normal file
Binary file not shown.
BIN
shared_sheets/所念皆星河.txt
Normal file
BIN
shared_sheets/所念皆星河.txt
Normal file
Binary file not shown.
BIN
shared_sheets/所念皆星河(和弦).txt
Normal file
BIN
shared_sheets/所念皆星河(和弦).txt
Normal file
Binary file not shown.
BIN
shared_sheets/所念皆星河(无和弦).txt
Normal file
BIN
shared_sheets/所念皆星河(无和弦).txt
Normal file
Binary file not shown.
BIN
shared_sheets/打上花火.txt
Normal file
BIN
shared_sheets/打上花火.txt
Normal file
Binary file not shown.
BIN
shared_sheets/新年好.txt
Normal file
BIN
shared_sheets/新年好.txt
Normal file
Binary file not shown.
BIN
shared_sheets/新闻联播ED.txt
Normal file
BIN
shared_sheets/新闻联播ED.txt
Normal file
Binary file not shown.
BIN
shared_sheets/星月神话.txt
Normal file
BIN
shared_sheets/星月神话.txt
Normal file
Binary file not shown.
BIN
shared_sheets/星茶会(高音钢琴C调).txt
Normal file
BIN
shared_sheets/星茶会(高音钢琴C调).txt
Normal file
Binary file not shown.
BIN
shared_sheets/晴天.txt
Normal file
BIN
shared_sheets/晴天.txt
Normal file
Binary file not shown.
BIN
shared_sheets/月亮代表我的心.txt
Normal file
BIN
shared_sheets/月亮代表我的心.txt
Normal file
Binary file not shown.
BIN
shared_sheets/月光传说.txt
Normal file
BIN
shared_sheets/月光传说.txt
Normal file
Binary file not shown.
BIN
shared_sheets/李香兰(和弦版).txt
Normal file
BIN
shared_sheets/李香兰(和弦版).txt
Normal file
Binary file not shown.
BIN
shared_sheets/梦中的婚礼.txt
Normal file
BIN
shared_sheets/梦中的婚礼.txt
Normal file
Binary file not shown.
BIN
shared_sheets/気ままな天使ーたち.txt
Normal file
BIN
shared_sheets/気ままな天使ーたち.txt
Normal file
Binary file not shown.
BIN
shared_sheets/水星记.txt
Normal file
BIN
shared_sheets/水星记.txt
Normal file
Binary file not shown.
BIN
shared_sheets/永不失联的爱.txt
Normal file
BIN
shared_sheets/永不失联的爱.txt
Normal file
Binary file not shown.
BIN
shared_sheets/江南.txt
Normal file
BIN
shared_sheets/江南.txt
Normal file
Binary file not shown.
BIN
shared_sheets/浪流连.txt
Normal file
BIN
shared_sheets/浪流连.txt
Normal file
Binary file not shown.
BIN
shared_sheets/海の見える街.txt
Normal file
BIN
shared_sheets/海の見える街.txt
Normal file
Binary file not shown.
BIN
shared_sheets/溯.txt
Normal file
BIN
shared_sheets/溯.txt
Normal file
Binary file not shown.
BIN
shared_sheets/漠河舞厅.txt
Normal file
BIN
shared_sheets/漠河舞厅.txt
Normal file
Binary file not shown.
BIN
shared_sheets/烟斗斜桥.txt
Normal file
BIN
shared_sheets/烟斗斜桥.txt
Normal file
Binary file not shown.
BIN
shared_sheets/琴师.txt
Normal file
BIN
shared_sheets/琴师.txt
Normal file
Binary file not shown.
BIN
shared_sheets/病变.txt
Normal file
BIN
shared_sheets/病变.txt
Normal file
Binary file not shown.
BIN
shared_sheets/白月光与朱砂痣.txt
Normal file
BIN
shared_sheets/白月光与朱砂痣.txt
Normal file
Binary file not shown.
BIN
shared_sheets/相思(无和弦).txt
Normal file
BIN
shared_sheets/相思(无和弦).txt
Normal file
Binary file not shown.
BIN
shared_sheets/穿越时空的思念-ZyaIreZ.txt
Normal file
BIN
shared_sheets/穿越时空的思念-ZyaIreZ.txt
Normal file
Binary file not shown.
BIN
shared_sheets/等你下课.txt
Normal file
BIN
shared_sheets/等你下课.txt
Normal file
Binary file not shown.
BIN
shared_sheets/粉刷匠.txt
Normal file
BIN
shared_sheets/粉刷匠.txt
Normal file
Binary file not shown.
BIN
shared_sheets/花海.txt
Normal file
BIN
shared_sheets/花海.txt
Normal file
Binary file not shown.
BIN
shared_sheets/莫失莫忘.txt
Normal file
BIN
shared_sheets/莫失莫忘.txt
Normal file
Binary file not shown.
BIN
shared_sheets/莫斯科郊外的晚上(和弦降音高).txt
Normal file
BIN
shared_sheets/莫斯科郊外的晚上(和弦降音高).txt
Normal file
Binary file not shown.
BIN
shared_sheets/莫斯科郊外的晚上.txt
Normal file
BIN
shared_sheets/莫斯科郊外的晚上.txt
Normal file
Binary file not shown.
BIN
shared_sheets/虹之间.txt
Normal file
BIN
shared_sheets/虹之间.txt
Normal file
Binary file not shown.
BIN
shared_sheets/踩到猫儿.txt
Normal file
BIN
shared_sheets/踩到猫儿.txt
Normal file
Binary file not shown.
BIN
shared_sheets/这世界那么多人.txt
Normal file
BIN
shared_sheets/这世界那么多人.txt
Normal file
Binary file not shown.
BIN
shared_sheets/那女孩对我说(完整版).txt
Normal file
BIN
shared_sheets/那女孩对我说(完整版).txt
Normal file
Binary file not shown.
BIN
shared_sheets/阿拉斯加海湾.txt
Normal file
BIN
shared_sheets/阿拉斯加海湾.txt
Normal file
Binary file not shown.
BIN
shared_sheets/雨之歌.txt
Normal file
BIN
shared_sheets/雨之歌.txt
Normal file
Binary file not shown.
BIN
shared_sheets/青花瓷.txt
Normal file
BIN
shared_sheets/青花瓷.txt
Normal file
Binary file not shown.
BIN
shared_sheets/高洁的教皇.txt
Normal file
BIN
shared_sheets/高洁的教皇.txt
Normal file
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
"ui";
|
"ui";
|
||||||
"use strict";
|
"use strict";
|
||||||
/*
|
/*
|
||||||
SkyAutoPlayer (Auto.js script)
|
SkyAutoPlayer (AutoX script)
|
||||||
Copyright © 2020 StageGuard
|
Copyright © 2020-2021 StageGuard
|
||||||
Contact :
|
Contact :
|
||||||
(QQ: 1355416608)
|
(QQ: 1355416608)
|
||||||
(Email: beamiscool@qq.com)
|
(Email: beamiscool@qq.com)
|
||||||
@@ -29,13 +29,13 @@
|
|||||||
|
|
||||||
const user_agreements =
|
const user_agreements =
|
||||||
"请仔细阅读以下使用须知!\n\n" +
|
"请仔细阅读以下使用须知!\n\n" +
|
||||||
"未充分测试,若遇到BUG,请酷安私信@StageGuard或在github中的StageGuard/SkyAutoPlayerScript新建Issue来反馈BUG!\n\n" +
|
"1. 未充分测试,若遇到 BUG,请酷安私信 @StageGuard 或新建 Issue 来反馈 BUG!\n\n" +
|
||||||
"1. SkyAutoPlayer(以下简称\"本脚本\")是完全免费且开源的软件/脚本(https://github.com/StageGuard/SkyAutoPlayerScript),禁止使用本脚本作为盈利用途!\n若你是从其他渠道购买获得的本脚本,那么就说明你被骗了!\n\n" +
|
"2. SkyAutoplayerScript 是完全免费且开源的软件/脚本(https://github.com/StageGuard/SkyAutoPlayerScript),使用 SkyAutoplayerScript 盈利的同时请标注源项目链接。\n\n" +
|
||||||
"2. 本脚本仅可用作娱乐用途,请不要在正规场合使用本脚本(请自行体会\"正规场合\"是什么意思),若因使用本脚本所出现了一些不友好的问题,与脚本作者StageGuard(以下简称\"作者\")无关。\n\n" +
|
"3. 共享乐谱不遵守 LGPL-2.1 协议,如您想在SkyAutoPlayer以外使用这些乐谱,请自行找乐谱作者授权!\n\n" +
|
||||||
"3. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。\n\n" +
|
"4. 本脚本仅可用作娱乐用途,请不要在正规场合使用本脚本(请自行体会\"正规场合\"是什么意思),若因使用本脚本所出现了一些不友好的问题,与脚本作者 StageGuard 无关。\n\n" +
|
||||||
"4. 本脚本只是一个\"弹奏机\",并不内置曲谱,请在GooglePlay下载SkyStudio编谱。\n\n" +
|
"5. 脚本只能给你一时满足感而不能使你进步,请适当使用,只有真正的技术才是王道,才能使你感到快乐。\n\n" +
|
||||||
"5. 本脚本不会增加解密乐谱功能,包括但不限于加密的SkyStudio乐谱,加密的JS等,也不接受加密乐谱的共享。\n\n" +
|
"6. 本脚本只是一个\"弹奏机\",并不内置曲谱,请在 GooglePlay 下载 SkyStudio 编谱。\n\n" +
|
||||||
"6. 本脚本的发行遵守LGPL-2.1协议,若你不了解协议内容,请访问 https://www.gnu.org/licenses 查看"
|
"7. 本脚本的发行遵守 LGPL-2.1 协议,若你不了解协议内容,请访问 https://www.gnu.org/licenses 查看"
|
||||||
;
|
;
|
||||||
|
|
||||||
//Script global scope
|
//Script global scope
|
||||||
@@ -58,7 +58,7 @@ scope.dp = context.getResources().getDisplayMetrics().density;
|
|||||||
//show error;
|
//show error;
|
||||||
const error = function(text) {
|
const error = function(text) {
|
||||||
console.show();
|
console.show();
|
||||||
console.error("SkyAutoPlayer发生了一个错误,请酷安私信@StageGuard或在github中的StageGuard/SkyAutoPlayerScript新建Issue来反馈这个BUG!\n详细信息:" + text);
|
console.error("SkyAutoPlayer发生了一个错误,请酷安私信 @StageGuard 或在 Github 中的 StageGuard/SkyAutoPlayerScript 新建 Issue 来反馈这个 BUG!\n详细信息:" + text);
|
||||||
};
|
};
|
||||||
|
|
||||||
String.format = function() {
|
String.format = function() {
|
||||||
@@ -88,6 +88,15 @@ sheetmgr = {
|
|||||||
}
|
}
|
||||||
return this.cachedLocalSheetList;
|
return this.cachedLocalSheetList;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
filterLocalSheet: function(filterBlock, listener) {
|
||||||
|
var resultList = [];
|
||||||
|
this.getLocalSheetList(listener).map(function(element, index) {
|
||||||
|
if(filterBlock(element)) resultList.push(element);
|
||||||
|
});
|
||||||
|
return resultList;
|
||||||
|
},
|
||||||
|
|
||||||
getOnlineSharedSheetInfoList: function(forceRefresh) {
|
getOnlineSharedSheetInfoList: function(forceRefresh) {
|
||||||
if(this.cachedOnlineSharedSheetInfoList.length == 0 || forceRefresh) {
|
if(this.cachedOnlineSharedSheetInfoList.length == 0 || forceRefresh) {
|
||||||
this.__internal_fetchOnlineSharedSheets();
|
this.__internal_fetchOnlineSharedSheets();
|
||||||
@@ -105,7 +114,7 @@ sheetmgr = {
|
|||||||
|
|
||||||
downloadAndLoad: function(file, extraData, listener) {
|
downloadAndLoad: function(file, extraData, listener) {
|
||||||
listener({status:1});
|
listener({status:1});
|
||||||
config.fetchRepoFile("shared_sheets/" + file, null, function(body) {
|
config.fetchRepoFile("shared_sheets/" + file, function(body) {
|
||||||
var sheet = files.join(sheetmgr.rootDir, files.getNameWithoutExtension(file) + (function(length) {
|
var sheet = files.join(sheetmgr.rootDir, files.getNameWithoutExtension(file) + (function(length) {
|
||||||
var string = "0123456789abcde";
|
var string = "0123456789abcde";
|
||||||
var stringBuffer = new java.lang.StringBuffer();
|
var stringBuffer = new java.lang.StringBuffer();
|
||||||
@@ -121,6 +130,7 @@ sheetmgr = {
|
|||||||
listener({status:2});
|
listener({status:2});
|
||||||
data.author = extraData.author;
|
data.author = extraData.author;
|
||||||
data.keyCount = extraData.keyCount;
|
data.keyCount = extraData.keyCount;
|
||||||
|
data.name = extraData.name;
|
||||||
return "[" + JSON.stringify(data) + "]";
|
return "[" + JSON.stringify(data) + "]";
|
||||||
}()), sheetmgr.encoding);
|
}()), sheetmgr.encoding);
|
||||||
parsed = eval(parsed)[0];
|
parsed = eval(parsed)[0];
|
||||||
@@ -128,7 +138,7 @@ sheetmgr = {
|
|||||||
sheetmgr.cachedLocalSheetList.push(parsed);
|
sheetmgr.cachedLocalSheetList.push(parsed);
|
||||||
listener({status:3});
|
listener({status:3});
|
||||||
}, function (msg) {
|
}, function (msg) {
|
||||||
listener({status:-1, msg: "获取 " + remoteHost + " 失败,原因:" + resp.statusMessage});
|
listener({status:-1, msg: "获取 " + extraData.name + " 失败,原因:" + resp.statusMessage});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -161,7 +171,7 @@ sheetmgr = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
__internal_fetchOnlineSharedSheets: function() {
|
__internal_fetchOnlineSharedSheets: function() {
|
||||||
config.fetchRepoFile("shared_sheets.json", config.values.gitVersion, function(body) {
|
config.fetchRepoFile("shared_sheets.json", function(body) {
|
||||||
sheetmgr.cachedOnlineSharedSheetInfoList = body.json().sheets;
|
sheetmgr.cachedOnlineSharedSheetInfoList = body.json().sheets;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -170,9 +180,9 @@ sheetmgr = {
|
|||||||
var r = [];
|
var r = [];
|
||||||
var t_time = 0;
|
var t_time = 0;
|
||||||
var t_sets = [];
|
var t_sets = [];
|
||||||
const regexp = /^(\d)Key(\d{1,})$/;
|
const regexp = /^(?:\d)?Key(\d{1,})$/;
|
||||||
for(var i in raw) {
|
for(var i in raw) {
|
||||||
var key = Number(raw[i].key.replace(regexp, "$2"));
|
var key = Number(raw[i].key.replace(regexp, "$1"));
|
||||||
if(raw[i].time != t_time) {
|
if(raw[i].time != t_time) {
|
||||||
r.push({time: t_time, keys: t_sets});
|
r.push({time: t_time, keys: t_sets});
|
||||||
t_sets = [];
|
t_sets = [];
|
||||||
@@ -276,13 +286,13 @@ sheetplayer = {
|
|||||||
var executor = java.util.concurrent.Executors.newCachedThreadPool();
|
var executor = java.util.concurrent.Executors.newCachedThreadPool();
|
||||||
var tragetRunnable = new java.lang.Runnable({
|
var tragetRunnable = new java.lang.Runnable({
|
||||||
run: function() {
|
run: function() {
|
||||||
var gestureMap = [];
|
var gestureMap = [], delay = 0;
|
||||||
sheetplayer.notes[sheetplayer.currentNote].keys.map(function(e, i) {
|
sheetplayer.notes[sheetplayer.currentNote].keys.map(function(e, i) {
|
||||||
var keyCoordinates = sheetplayer.keyCount == 15 ? [config.values.key_coordinates15[e][0], config.values.key_coordinates15[e][1]] : [config.values.key_coordinates8[e][0], config.values.key_coordinates8[e][1]];
|
var keyCoordinates = sheetplayer.keyCount == 15 ? [config.values.key_coordinates15[e][0], config.values.key_coordinates15[e][1]] : [config.values.key_coordinates8[e][0], config.values.key_coordinates8[e][1]];
|
||||||
gestureMap.push([0, 25, keyCoordinates, keyCoordinates]);
|
delay += config.values.chordDelay;
|
||||||
|
gestureMap.push([delay, 25, keyCoordinates, keyCoordinates]);
|
||||||
});
|
});
|
||||||
gestureMap = sheetplayer.toSource(gestureMap);
|
gestures.apply(null, gestureMap);
|
||||||
eval("gestures(" + gestureMap.slice(1, gestureMap.length - 1) + ");");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
while(sheetplayer.playing && sheetplayer.currentNote < sheetplayer.noteCount) {
|
while(sheetplayer.playing && sheetplayer.currentNote < sheetplayer.noteCount) {
|
||||||
@@ -299,6 +309,7 @@ sheetplayer = {
|
|||||||
// 播放完自动下一首
|
// 播放完自动下一首
|
||||||
|
|
||||||
if(!(sheetplayer.currentNote < sheetplayer.noteCount)) {
|
if(!(sheetplayer.currentNote < sheetplayer.noteCount)) {
|
||||||
|
if(!config.values.noPopupPlay) {
|
||||||
if(config.values.autoPlay && gui.player_panel.isShowing) {
|
if(config.values.autoPlay && gui.player_panel.isShowing) {
|
||||||
gui.player_panel.__internal_dismiss();
|
gui.player_panel.__internal_dismiss();
|
||||||
sheetplayer.stop();
|
sheetplayer.stop();
|
||||||
@@ -319,6 +330,12 @@ sheetplayer = {
|
|||||||
} else {
|
} else {
|
||||||
sheetplayer.stop();
|
sheetplayer.stop();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
sheetplayer.stop();
|
||||||
|
setTimeout(function(){
|
||||||
|
gui.main.show(0);
|
||||||
|
}, config.values.intervalSecondsPlayInNoPopupMode * 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -357,24 +374,7 @@ sheetplayer = {
|
|||||||
this.bpm = j.bpm;
|
this.bpm = j.bpm;
|
||||||
this.noteCount = this.notes.length;
|
this.noteCount = this.notes.length;
|
||||||
this.keyCount = j.keyCount;
|
this.keyCount = j.keyCount;
|
||||||
},
|
|
||||||
|
|
||||||
toSource: function(obj) {
|
|
||||||
var _toJSON = function toJSON(x, lev) {
|
|
||||||
var p = "", r, i;
|
|
||||||
if (typeof x == "string") {
|
|
||||||
return x;
|
|
||||||
} else if (Array.isArray(x)) {
|
|
||||||
r = new Array();
|
|
||||||
for (i = 0; i < x.length; i++) r.push(toJSON(x[i], lev - 1));
|
|
||||||
p = "[" + r.join(",") + "]";
|
|
||||||
} else {
|
|
||||||
p = String(x);
|
|
||||||
}
|
}
|
||||||
return p;
|
|
||||||
}
|
|
||||||
return _toJSON(obj, 32);
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
@@ -382,7 +382,7 @@ config = {
|
|||||||
_global_storage: null,
|
_global_storage: null,
|
||||||
|
|
||||||
values: {
|
values: {
|
||||||
currentVersion: 21,
|
currentVersion: 24,
|
||||||
gitVersion: "",
|
gitVersion: "",
|
||||||
|
|
||||||
key_coordinates15: [],
|
key_coordinates15: [],
|
||||||
@@ -398,14 +398,18 @@ config = {
|
|||||||
tipOnAndroidR: true,
|
tipOnAndroidR: true,
|
||||||
theme: "dark",
|
theme: "dark",
|
||||||
autoPlay: false,
|
autoPlay: false,
|
||||||
lang: "zh_CN"
|
lang: "zh_CN",
|
||||||
|
chordDelay: 0,
|
||||||
|
noPopupPlay: false,
|
||||||
|
noPopupPlayWarning: true,
|
||||||
|
intervalSecondsPlayInNoPopupMode: 5,
|
||||||
},
|
},
|
||||||
|
|
||||||
bitmaps: {},
|
bitmaps: {},
|
||||||
|
|
||||||
languages: {
|
languages: {
|
||||||
zh_CN: {
|
zh_CN: {
|
||||||
launch_tip_in_content: "当你发现什么事情都没有发生时<br>也许你应该看看是否授予了Auto.js<u><b>悬浮窗权限</u></b><br><br><br>建议使用 <b>4.1.1 Alpha2</b> 版本!<br><b>4.1.1 Alpha2</b> 版本下载: <a href=https://github.com/Ericwyn/Auto.js/releases/tag/V4.1.1.Alpha2>https://github.com/Ericwyn/Auto.js/releases/tag/V4.1.1.Alpha2</a>",
|
launch_tip_in_content: "当你发现什么事情都没有发生时<br>也许你应该看看是否授予了 AutoX <u><b>悬浮窗权限</u></b>",
|
||||||
launch_tip_force_exit: "强制退出",
|
launch_tip_force_exit: "强制退出",
|
||||||
launch_tip_storage_on_android11: "安卓11不允许外部应用读取应用私有文件夹,乐谱文件夹移至 {0}",
|
launch_tip_storage_on_android11: "安卓11不允许外部应用读取应用私有文件夹,乐谱文件夹移至 {0}",
|
||||||
|
|
||||||
@@ -460,11 +464,12 @@ config = {
|
|||||||
page_sc_download_success: "下载完成: {0}\n请在本地曲谱页面刷新",
|
page_sc_download_success: "下载完成: {0}\n请在本地曲谱页面刷新",
|
||||||
page_sc_download_failed: "下载 {0} 失败: {1}",
|
page_sc_download_failed: "下载 {0} 失败: {1}",
|
||||||
page_sc_upload_title: "如何上传乐谱",
|
page_sc_upload_title: "如何上传乐谱",
|
||||||
page_sc_upload_desc: "共有两种方式可以上传乐谱:\n\n" +
|
page_sc_upload_desc: "共有三种方式可以上传乐谱:\n\n" +
|
||||||
"①酷安私信@StageGuard,发送时请附带简介,曲谱链接(百度云或其他云盘都可)\n" +
|
"1. 酷安私信@StageGuard,发送时请附带简介,曲谱链接(百度云或其他云盘都可)\n" +
|
||||||
"②在github fork StageGuard/SkyAutoplayerScript\n" +
|
"2. 在github fork StageGuard/SkyAutoplayerScript\n" +
|
||||||
"在shared_sheets文件夹添加你的曲谱,并按照格式修改shared_sheets.json\n" +
|
"在shared_sheets文件夹添加你的曲谱,并按照格式修改shared_sheets.json\n" +
|
||||||
"并提出 Pull Request 合并申请\n\n" +
|
"并提出 Pull Request 合并申请\n\n" +
|
||||||
|
"3. 发送乐谱文件到 beamiscool@qq.com\n\n" +
|
||||||
"注:若是转载转载请注明原作者同意\n\n" +
|
"注:若是转载转载请注明原作者同意\n\n" +
|
||||||
"如果所有人都白嫖,那么这个列表将永远也不会扩充",
|
"如果所有人都白嫖,那么这个列表将永远也不会扩充",
|
||||||
page_sc_upload_open_coolapk: "打开酷安",
|
page_sc_upload_open_coolapk: "打开酷安",
|
||||||
@@ -489,6 +494,8 @@ config = {
|
|||||||
page_setting_set_15key_coordinate: "设置15键盘键位坐标",
|
page_setting_set_15key_coordinate: "设置15键盘键位坐标",
|
||||||
page_setting_key_coordinate_saved: "坐标设置已保存至存储!",
|
page_setting_key_coordinate_saved: "坐标设置已保存至存储!",
|
||||||
page_setting_random_and_continuate_play: "连续随机播放",
|
page_setting_random_and_continuate_play: "连续随机播放",
|
||||||
|
page_setting_no_popup_play: "弹奏不显示悬浮窗",
|
||||||
|
page_setting_no_popup_play_interval: "无悬浮窗弹奏开始间隔",
|
||||||
page_setting_show_broken_sheet: "显示加载失败的乐谱",
|
page_setting_show_broken_sheet: "显示加载失败的乐谱",
|
||||||
page_setting_show_storage_tip_on_android11: "启动脚本时显示存储提示",
|
page_setting_show_storage_tip_on_android11: "启动脚本时显示存储提示",
|
||||||
page_setting_set_theme: "设置主题色",
|
page_setting_set_theme: "设置主题色",
|
||||||
@@ -502,6 +509,7 @@ config = {
|
|||||||
page_setting_changelog_title: "更新日志",
|
page_setting_changelog_title: "更新日志",
|
||||||
page_setting_exit_script: "结束脚本运行",
|
page_setting_exit_script: "结束脚本运行",
|
||||||
page_setting_language: "语言",
|
page_setting_language: "语言",
|
||||||
|
page_setting_chord_delay: "和弦按压延迟",
|
||||||
|
|
||||||
gui_player_panel_tip: "拖动标题栏的标题文字来移动弹奏控制面板悬浮窗。",
|
gui_player_panel_tip: "拖动标题栏的标题文字来移动弹奏控制面板悬浮窗。",
|
||||||
gui_player_penel_analyzing: "解析中...",
|
gui_player_penel_analyzing: "解析中...",
|
||||||
@@ -528,7 +536,19 @@ config = {
|
|||||||
res_language_download_failed: "语言下载失败:{0}",
|
res_language_download_failed: "语言下载失败:{0}",
|
||||||
res_language_dialog_tip: "找不到你的语言?欢迎贡献翻译:<br><a href=>https://github.com/StageGuard/SkyAutoPlayerScript</a>",
|
res_language_dialog_tip: "找不到你的语言?欢迎贡献翻译:<br><a href=>https://github.com/StageGuard/SkyAutoPlayerScript</a>",
|
||||||
res_language_failed_fetch_online_list: "无法获取在线语言列表",
|
res_language_failed_fetch_online_list: "无法获取在线语言列表",
|
||||||
res_language_dialog_title: "选择语言"
|
res_language_dialog_title: "选择语言",
|
||||||
|
res_language_update_needed: "语言需要更新,请前往设置界面重新点击当前语言来更新",
|
||||||
|
|
||||||
|
no_popup_play_warning_title: "警告",
|
||||||
|
no_popup_play_warning: "您已经开启\"弹奏不显示悬浮窗\"选项!\n" +
|
||||||
|
"弹奏不受弹奏面板控制是<b>非常危险的</b>。\n\n" +
|
||||||
|
"当出现顶部悬浮通知(例如QQ消息)或气泡对话时,脚本可能会误触消息并开启其他软件,此时脚本依旧在运行中(弹奏中)且<b>无法被打断</b>。也就是说除了等待弹奏完成以外,没有任何办法终止弹奏。\n" +
|
||||||
|
"<b>脚本在其他界面的误触可能会对您造成不可挽回的损失!</b>\n\n" +
|
||||||
|
"另外,使用此功能且录屏不会使你获得任何成就感。\n\n" +
|
||||||
|
"我已经警告过你了,若因使用此功能造成了损失或纠纷,与 SkyAutoPlayer 脚本和脚本作者 StageGuard 无关,请悉知。\n" +
|
||||||
|
"若继续使用,请点击确认按钮,否则请点击取消按钮。\n\n" +
|
||||||
|
"注意:使用此功能时,\"连续随机播放\"功能将不会生效。",
|
||||||
|
no_popup_play_tip: "将在 {0} 秒后开始弹奏。"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -538,11 +558,24 @@ config = {
|
|||||||
var langs = files.listDir(langPath)
|
var langs = files.listDir(langPath)
|
||||||
for(var i in langs) {
|
for(var i in langs) {
|
||||||
var code = files.getNameWithoutExtension(langs[i]);
|
var code = files.getNameWithoutExtension(langs[i]);
|
||||||
if(code == this.values.lang) {
|
if(code == this.values.lang && code != "zh_CN") {
|
||||||
try {
|
try {
|
||||||
var content = JSON.parse(files.read(langPath + langs[i]));
|
var content = JSON.parse(files.read(langPath + langs[i]));
|
||||||
this.languages[content.code] = content.content;
|
this.languages[content.code] = content.content;
|
||||||
listener(String.format(this.languages[content.code].res_use_language, content.name));
|
listener(String.format(this.languages[content.code].res_use_language, content.name));
|
||||||
|
threads.start(function() {
|
||||||
|
config.fetchRepoFile("source/language_list.json", function(body) {
|
||||||
|
var onlineList = JSON.parse(body.string()).list;
|
||||||
|
for(var i in onlineList) {
|
||||||
|
if(onlineList[i].code == content.code) {
|
||||||
|
if(onlineList[i].version > content.version) {
|
||||||
|
toast(config.languages[config.values.lang].res_language_update_needed);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, null);
|
||||||
|
})
|
||||||
return;
|
return;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
listener(new Error("加载 " + code + " 语言时出错:" + e))
|
listener(new Error("加载 " + code + " 语言时出错:" + e))
|
||||||
@@ -561,12 +594,12 @@ config = {
|
|||||||
|
|
||||||
updateStaticUIText: function() {
|
updateStaticUIText: function() {
|
||||||
//一些静态文字的修改(我最会写垃圾代码了.jpg)
|
//一些静态文字的修改(我最会写垃圾代码了.jpg)
|
||||||
gui.main.views[0].title = config.languages[config.values.lang].page_lc_title,
|
gui.main.views[0].title = config.languages[config.values.lang].page_lc_title;
|
||||||
gui.main.views[0].navigation_title = config.languages[config.values.lang].page_lc_navigation_title
|
gui.main.views[0].navigation_title = config.languages[config.values.lang].page_lc_navigation_title;
|
||||||
gui.main.views[1].title = config.languages[config.values.lang].page_sc_title,
|
gui.main.views[1].title = config.languages[config.values.lang].page_sc_title;
|
||||||
gui.main.views[1].navigation_title = config.languages[config.values.lang].page_sc_navigation_title
|
gui.main.views[1].navigation_title = config.languages[config.values.lang].page_sc_navigation_title;
|
||||||
gui.main.views[2].title = config.languages[config.values.lang].page_lc_title,
|
gui.main.views[2].title = config.languages[config.values.lang].page_lc_title;
|
||||||
gui.main.views[2].navigation_title = config.languages[config.values.lang].page_setting_navigation_title
|
gui.main.views[2].navigation_title = config.languages[config.values.lang].page_setting_navigation_title;
|
||||||
gui.run(function(){
|
gui.run(function(){
|
||||||
global_prompt_contentView.setText(android.text.Html.fromHtml(config.languages[config.values.lang].launch_tip_in_content));
|
global_prompt_contentView.setText(android.text.Html.fromHtml(config.languages[config.values.lang].launch_tip_in_content));
|
||||||
});
|
});
|
||||||
@@ -589,6 +622,10 @@ config = {
|
|||||||
this.values.theme = this._global_storage.get("theme", this.values.theme);
|
this.values.theme = this._global_storage.get("theme", this.values.theme);
|
||||||
this.values.autoPlay = this._global_storage.get("auto_play", this.values.autoPlay);
|
this.values.autoPlay = this._global_storage.get("auto_play", this.values.autoPlay);
|
||||||
this.values.lang = this._global_storage.get("language", this.values.lang)
|
this.values.lang = this._global_storage.get("language", this.values.lang)
|
||||||
|
this.values.chordDelay = this._global_storage.get("chordDelay", this.values.chordDelay)
|
||||||
|
this.values.noPopupPlay = this._global_storage.get("no_popup_play", this.values.noPopupPlay)
|
||||||
|
this.values.noPopupPlayWarning = this._global_storage.get("no_popup_play_warning", this.values.noPopupPlayWarning)
|
||||||
|
this.values.intervalSecondsPlayInNoPopupMode = this._global_storage.get("interval_seconds_play", this.values.intervalSecondsPlayInNoPopupMode)
|
||||||
try {
|
try {
|
||||||
android.os.Build.VERSION_CODES.R
|
android.os.Build.VERSION_CODES.R
|
||||||
sheetmgr.rootDir = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/sheets/";
|
sheetmgr.rootDir = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/sheets/";
|
||||||
@@ -606,11 +643,11 @@ config = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
checkVersion: function() {
|
checkVersion: function() {
|
||||||
this.values.gitVersion = http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/gitVersion").body.string();
|
this.values.gitVersion = http.get("https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript/gitVersion").body.string();
|
||||||
var periodVersion = this._global_storage.get("version", this.values.currentVersion);
|
var periodVersion = this._global_storage.get("version", this.values.currentVersion);
|
||||||
var currentVersion = this.values.currentVersion;
|
var currentVersion = this.values.currentVersion;
|
||||||
if(periodVersion < currentVersion) {
|
if(periodVersion < currentVersion) {
|
||||||
config.fetchRepoFile("update_log.txt", this.values.gitVersion, function(body) {
|
config.fetchRepoFile("update_log.txt", function(body) {
|
||||||
gui.dialogs.showConfirmDialog({
|
gui.dialogs.showConfirmDialog({
|
||||||
title: config.languages[config.values.lang].res_updated,
|
title: config.languages[config.values.lang].res_updated,
|
||||||
text: String.format(config.languages[config.values.lang].res_updated_detail, currentVersion, periodVersion, body.string()),
|
text: String.format(config.languages[config.values.lang].res_updated_detail, currentVersion, periodVersion, body.string()),
|
||||||
@@ -625,8 +662,7 @@ config = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
fetchResources: function(listener) {
|
fetchResources: function(listener) {
|
||||||
var remoteHost = "https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + this.values.gitVersion + "/resources/";
|
var resourceList = ["local.png", "online.png", "play.png", "pause.png", "refresh.png", "settings.png", "info.png", "download.png", "bin.png", "speedup.png", "search.png", "note.png", "user.png", "piano.png", "clock.png"/*, "filter.png"*/, "coolapk.png", "douyin.png", "github.png", "twitter.png", "bilibili.png", "mail.png"];
|
||||||
var resourceList = ["local.png", "online.png", "play.png", "pause.png", "refresh.png", "settings.png", "info.png", "download.png", "bin.png", "speedup.png", "search.png", "note.png", "user.png", "piano.png", "clock.png"/*, "filter.png"*/, "coolapk.png", "douyin.png", "github.png", "twitter.png", "bilibili.png"];
|
|
||||||
var localRootDir = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/bitmaps/";
|
var localRootDir = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/bitmaps/";
|
||||||
var downloadQueue = [];
|
var downloadQueue = [];
|
||||||
var tryCount = 1;
|
var tryCount = 1;
|
||||||
@@ -661,7 +697,7 @@ config = {
|
|||||||
var iterator = 0;
|
var iterator = 0;
|
||||||
tmpQueue.map(function(element, i) {
|
tmpQueue.map(function(element, i) {
|
||||||
listener(String.format(config.languages[config.values.lang].res_downloading, element));
|
listener(String.format(config.languages[config.values.lang].res_downloading, element));
|
||||||
config.fetchRepoFile("resources/" + element, config.values.gitVersion, function(body) {
|
config.fetchRepoFile("resources/" + element, function(body) {
|
||||||
var absolutePath = files.join(localRootDir, element);
|
var absolutePath = files.join(localRootDir, element);
|
||||||
files.create(absolutePath);
|
files.create(absolutePath);
|
||||||
files.writeBytes(absolutePath, body.bytes());
|
files.writeBytes(absolutePath, body.bytes());
|
||||||
@@ -683,42 +719,29 @@ config = {
|
|||||||
listener(config.languages[config.values.lang].res_download_successful);
|
listener(config.languages[config.values.lang].res_download_successful);
|
||||||
java.lang.Thread.sleep(1000); //为了方便看清
|
java.lang.Thread.sleep(1000); //为了方便看清
|
||||||
}
|
}
|
||||||
} catch(error) {
|
} catch (e) {
|
||||||
listener(new Error(String.format(config.languages[config.values.lang].res_error_while_downloading, error)));
|
listener(new Error(String.format(config.languages[config.values.lang].res_error_while_downloading, e)));
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//jsdelivr cdn需要指定repo版本, gitee和github则不用
|
fetchRepoFile: function(path, successCbk, failCbk) {
|
||||||
//fetch顺序为 gitee raw content → jsdelivr cdn → github raw content
|
var repos = [
|
||||||
fetchRepoFile: function(path, gitVersion, successCbk, failCbk) {
|
"https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + config.values.gitVersion + "/" + path,
|
||||||
//就用最蠢的if来判断吧
|
"https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/" + path,
|
||||||
|
"https://raw.githubusercontent.com/StageGuard/SkyAutoPlayerScript/master/" + path
|
||||||
|
];
|
||||||
|
var errorCollector = new String();
|
||||||
|
for(var i in repos) {
|
||||||
try {
|
try {
|
||||||
var resp = http.get(encodeURI("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/" + path));
|
var resp = http.get(encodeURI(repos[i]));
|
||||||
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
||||||
successCbk(resp.body);
|
successCbk(resp.body);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else errorCollector += "Failed on " + repo[i] + ": " + resp.statusCode + ": " + resp.statusMessage + "\n";
|
||||||
var errorCollector = resp.statusCode + ": " + resp.statusMessage + "\n";
|
} catch (e) { errorCollector += "Failed on " + repos[i] + ": " + e + "\n"; }
|
||||||
resp = http.get(encodeURI("https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript" + (gitVersion == null ? "" : ("@" + gitVersion)) + "/" + path));
|
}
|
||||||
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
|
||||||
successCbk(resp.body);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
errorCollector += resp.statusCode + ": " + resp.statusMessage + "\n";
|
|
||||||
resp = http.get(encodeURI("https://raw.githubusercontent.com/StageGuard/SkyAutoPlayerScript/master/" + path));
|
|
||||||
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
|
||||||
successCbk(resp.body);
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
errorCollector += resp.statusCode + ": " + resp.statusMessage + "\n";
|
|
||||||
if(failCbk != null) failCbk(errorCollector);
|
if(failCbk != null) failCbk(errorCollector);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch(e) {
|
|
||||||
if(failCbk != null) failCbk(e);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
updateBitmapTheme: function() {
|
updateBitmapTheme: function() {
|
||||||
@@ -1399,7 +1422,8 @@ gui = {
|
|||||||
|
|
||||||
//internal methods
|
//internal methods
|
||||||
__internal_show: function s(content) { gui.run(function(){
|
__internal_show: function s(content) { gui.run(function(){
|
||||||
s.index = gui.main.current = content.index;
|
s.index = content.index;
|
||||||
|
gui.main.current = content.index;
|
||||||
s.initial = false;
|
s.initial = false;
|
||||||
if(!gui.main.isShowing) { //create a new window and show content view
|
if(!gui.main.isShowing) { //create a new window and show content view
|
||||||
gui.main._global_base = new android.widget.LinearLayout(ctx);
|
gui.main._global_base = new android.widget.LinearLayout(ctx);
|
||||||
@@ -1625,7 +1649,9 @@ gui = {
|
|||||||
}
|
}
|
||||||
s["navigationBtn" + i].setOnClickListener(new android.view.View.OnClickListener({
|
s["navigationBtn" + i].setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function(view) { if(gui.main.current_navigation_selection != Number(view.getId())) {
|
onClick: function(view) { if(gui.main.current_navigation_selection != Number(view.getId())) {
|
||||||
if(typeof(gui.main.currentPageChangeListener) == "function") gui.main.currentPageChangeListener(s, content);
|
if(typeof(gui.main.currentPageChangeListener) == "function") {
|
||||||
|
gui.main.currentPageChangeListener(s, content);
|
||||||
|
}
|
||||||
gui.main.__internal_show(gui.main.views[Number(view.getId())]);
|
gui.main.__internal_show(gui.main.views[Number(view.getId())]);
|
||||||
gui.main.current_navigation_selection = Number(view.getId());
|
gui.main.current_navigation_selection = Number(view.getId());
|
||||||
}}
|
}}
|
||||||
@@ -1711,15 +1737,15 @@ gui = {
|
|||||||
cx: 0,
|
cx: 0,
|
||||||
cy: 0,
|
cy: 0,
|
||||||
|
|
||||||
width: dp * 35,
|
width: dp * 40,
|
||||||
height: dp * 35,
|
height: dp * 40,
|
||||||
|
|
||||||
show: function s() { gui.run(function(){
|
show: function s() { gui.run(function(){
|
||||||
if(!gui.suspension.isShowing) {
|
if(!gui.suspension.isShowing) {
|
||||||
gui.suspension._global_base = new android.widget.TextView(ctx);
|
gui.suspension._global_base = new android.widget.TextView(ctx);
|
||||||
gui.suspension._global_base.setLayoutParams(new android.widget.LinearLayout.LayoutParams(gui.suspension.width, gui.suspension.height));
|
gui.suspension._global_base.setLayoutParams(new android.widget.LinearLayout.LayoutParams(gui.suspension.width - dp * 5, gui.suspension.height - dp * 5));
|
||||||
gui.suspension._global_base.setText("\u27e1");
|
gui.suspension._global_base.setText("\u2726");
|
||||||
gui.suspension._global_base.setTextColor(android.graphics.Color.parseColor("#FFFFD1"));
|
gui.suspension._global_base.setTextColor(android.graphics.Color.parseColor("#FFF6D7"));
|
||||||
gui.suspension._global_base.setShadowLayer(dp * 3, 0, 0, android.graphics.Color.parseColor("#390c1a"));
|
gui.suspension._global_base.setShadowLayer(dp * 3, 0, 0, android.graphics.Color.parseColor("#390c1a"));
|
||||||
gui.suspension._global_base.setTextSize(30);
|
gui.suspension._global_base.setTextSize(30);
|
||||||
gui.suspension._global_base.setOnTouchListener(new android.view.View.OnTouchListener({
|
gui.suspension._global_base.setOnTouchListener(new android.view.View.OnTouchListener({
|
||||||
@@ -2075,8 +2101,32 @@ gui = {
|
|||||||
s.play.setBackgroundDrawable(gui.utils.ripple_drawable(s.play.getMeasuredWidth(), s.play.getMeasuredHeight(), "rect"));
|
s.play.setBackgroundDrawable(gui.utils.ripple_drawable(s.play.getMeasuredWidth(), s.play.getMeasuredHeight(), "rect"));
|
||||||
s.play.setOnClickListener(new android.view.View.OnClickListener({
|
s.play.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function() {
|
onClick: function() {
|
||||||
|
if(config.values.noPopupPlay) {
|
||||||
|
if(!config.values.noPopupPlayWarning) {
|
||||||
|
gui.player_panel.noPopupPlayClick()
|
||||||
|
} else {
|
||||||
|
gui.dialogs.showConfirmDialog({
|
||||||
|
title: config.languages[config.values.lang].no_popup_play_warning_title,
|
||||||
|
text: android.text.Html.fromHtml(config.languages[config.values.lang].no_popup_play_warning.replace(new RegExp("\x0a", "gi"), "<br>")),
|
||||||
|
canExit: false,
|
||||||
|
buttons: [
|
||||||
|
config.languages[config.values.lang].button_confirm,
|
||||||
|
config.languages[config.values.lang].button_cancel
|
||||||
|
],
|
||||||
|
skip: function(checked) {
|
||||||
|
config.values.noPopupPlayWarning = config.save("no_popup_play_warning", !checked);
|
||||||
|
},
|
||||||
|
callback: function(id) {
|
||||||
|
if(id == 0) {
|
||||||
|
gui.player_panel.noPopupPlayClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
sheetplayer.play(gui.player_panel.refreshStatus);
|
sheetplayer.play(gui.player_panel.refreshStatus);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
s.play.setEnabled(false);
|
s.play.setEnabled(false);
|
||||||
s.play.setClickable(false);
|
s.play.setClickable(false);
|
||||||
@@ -2117,7 +2167,7 @@ gui = {
|
|||||||
s.lp = gui.player_panel._global_base.getLayoutParams();
|
s.lp = gui.player_panel._global_base.getLayoutParams();
|
||||||
if(gui.player_panel.cx == null) {
|
if(gui.player_panel.cx == null) {
|
||||||
gui.player_panel.cx = 0;
|
gui.player_panel.cx = 0;
|
||||||
gui.player_panel.cy = context.getResources().getDisplayMetrics().heightPixels / 2 - gui.player_panel._global_base.getMeasuredHeight() - dp * 2;
|
gui.player_panel.cy = context.getResources().getDisplayMetrics().heightPixels / 2;
|
||||||
}
|
}
|
||||||
s.lp.x = s.x = gui.player_panel.cx;
|
s.lp.x = s.x = gui.player_panel.cx;
|
||||||
s.lp.y = s.y = gui.player_panel.cy;
|
s.lp.y = s.y = gui.player_panel.cy;
|
||||||
@@ -2209,6 +2259,13 @@ gui = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});},
|
});},
|
||||||
|
noPopupPlayClick: function() {
|
||||||
|
gui.player_panel.__internal_dismiss();
|
||||||
|
toast(String.format(config.languages[config.values.lang].no_popup_play_tip, config.values.intervalSecondsPlayInNoPopupMode));
|
||||||
|
(new android.os.Handler()).postDelayed(function() {
|
||||||
|
sheetplayer.play();
|
||||||
|
}, config.values.intervalSecondsPlayInNoPopupMode * 1000);
|
||||||
|
},
|
||||||
__internal_dismiss: function() { gui.run(function(){
|
__internal_dismiss: function() { gui.run(function(){
|
||||||
if (gui.player_panel.isShowing) {
|
if (gui.player_panel.isShowing) {
|
||||||
gui.player_panel.isShowing = false;
|
gui.player_panel.isShowing = false;
|
||||||
@@ -2258,6 +2315,7 @@ gui = {
|
|||||||
type: "item",
|
type: "item",
|
||||||
name: content.name,
|
name: content.name,
|
||||||
code: content.code,
|
code: content.code,
|
||||||
|
version: content.version,
|
||||||
local: true,
|
local: true,
|
||||||
content: content.content
|
content: content.content
|
||||||
});
|
});
|
||||||
@@ -2323,20 +2381,8 @@ gui = {
|
|||||||
onItemClick: function(parent, view, pos, id) {
|
onItemClick: function(parent, view, pos, id) {
|
||||||
var item = listAdapterController.get(pos);
|
var item = listAdapterController.get(pos);
|
||||||
if(item.type == "item") {
|
if(item.type == "item") {
|
||||||
if(item.local) {
|
var fetchOnline = function() {
|
||||||
config.languages[item.code] = item.content;
|
config.fetchRepoFile("resources/language_pack/" + item.code + ".json", function(body) {
|
||||||
config.values.lang = config.save("language", item.code);
|
|
||||||
toast(String.format(config.languages[config.values.lang].res_use_language, item.name));
|
|
||||||
gui.main.__internal_dismiss();
|
|
||||||
gui.suspension.show();
|
|
||||||
config.updateStaticUIText();
|
|
||||||
gui.utils.value_animation("Float", 1.0, 0, 125, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
|
||||||
langDialog.setAlpha(anim.getAnimatedValue());
|
|
||||||
if(anim.getAnimatedValue() == 1) gui.winMgr.removeView(langDialog);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
threads.start(function() {
|
|
||||||
config.fetchRepoFile("resources/language_pack/" + item.code + ".json", null, function(body) {
|
|
||||||
var lf = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/lang/" + item.code + ".json";
|
var lf = android.os.Environment.getExternalStorageDirectory() + "/Documents/SkyAutoPlayer/lang/" + item.code + ".json";
|
||||||
files.create(lf)
|
files.create(lf)
|
||||||
files.writeBytes(lf, body.bytes());
|
files.writeBytes(lf, body.bytes());
|
||||||
@@ -2354,8 +2400,32 @@ gui = {
|
|||||||
}, function(msg) {
|
}, function(msg) {
|
||||||
toast(String.format(config.languages[config.values.lang].res_language_download_failed, msg));
|
toast(String.format(config.languages[config.values.lang].res_language_download_failed, msg));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(item.local) {
|
||||||
|
var isOutdateVersion = false;
|
||||||
|
for(var i in onlineList) {
|
||||||
|
if(onlineList[i].code == item.code) {
|
||||||
|
if(onlineList[i].version > item.version) isOutdateVersion = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isOutdateVersion) {
|
||||||
|
threads.start(fetchOnline);
|
||||||
|
} else {
|
||||||
|
config.languages[item.code] = item.content;
|
||||||
|
config.values.lang = config.save("language", item.code);
|
||||||
|
toast(String.format(config.languages[config.values.lang].res_use_language, item.name));
|
||||||
|
gui.main.__internal_dismiss();
|
||||||
|
gui.suspension.show();
|
||||||
|
config.updateStaticUIText();
|
||||||
|
gui.utils.value_animation("Float", 1.0, 0, 125, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
|
langDialog.setAlpha(anim.getAnimatedValue());
|
||||||
|
if(anim.getAnimatedValue() == 1) gui.winMgr.removeView(langDialog);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
threads.start(fetchOnline);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -2372,9 +2442,10 @@ gui = {
|
|||||||
baseLayout.addView(prompt);
|
baseLayout.addView(prompt);
|
||||||
var langDialog = gui.dialogs.showDialog(baseLayout, -2, -2, null, true);
|
var langDialog = gui.dialogs.showDialog(baseLayout, -2, -2, null, true);
|
||||||
|
|
||||||
|
var onlineList = [];
|
||||||
threads.start(function() {
|
threads.start(function() {
|
||||||
config.fetchRepoFile("source/language_list.json", null, function(body) {
|
config.fetchRepoFile("source/language_list.json", function(body) {
|
||||||
var onlineList = JSON.parse(body.string()).list;
|
onlineList = JSON.parse(body.string()).list;
|
||||||
gui.run(function() {
|
gui.run(function() {
|
||||||
var __listArray = listAdapterController.getArray();
|
var __listArray = listAdapterController.getArray();
|
||||||
var loadingProgress = __listArray[__listArray.length - 1].v_prog
|
var loadingProgress = __listArray[__listArray.length - 1].v_prog
|
||||||
@@ -2390,6 +2461,7 @@ gui = {
|
|||||||
type: "item",
|
type: "item",
|
||||||
name: onlineList[i].name,
|
name: onlineList[i].name,
|
||||||
code: onlineList[i].code,
|
code: onlineList[i].code,
|
||||||
|
version: onlineList[i].version,
|
||||||
local: false,
|
local: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2615,6 +2687,13 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
case "bilibili": return "#FB7299";
|
case "bilibili": return "#FB7299";
|
||||||
|
case "mail": return (function(){
|
||||||
|
if(config.values.theme == "light") {
|
||||||
|
return "#24292E";
|
||||||
|
} else {
|
||||||
|
return "#FFFFFF";
|
||||||
|
}
|
||||||
|
}());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var filterBitmap = function(bitmap, replacedColor) {
|
var filterBitmap = function(bitmap, replacedColor) {
|
||||||
@@ -2660,8 +2739,14 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
socialLayout.setBackgroundDrawable(gui.utils.ripple_drawable(socialLayout.getMeasuredWidth(), socialLayout.getMeasuredHeight(), "rect"));
|
socialLayout.setBackgroundDrawable(gui.utils.ripple_drawable(socialLayout.getMeasuredWidth(), socialLayout.getMeasuredHeight(), "rect"));
|
||||||
socialLayout.setOnClickListener(new android.view.View.OnClickListener({
|
socialLayout.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function() {
|
onClick: function() {
|
||||||
|
if(item.social[0].platform == "mail") {
|
||||||
|
app.sendEmail({email: item.social[0].link})
|
||||||
|
} else {
|
||||||
app.openUrl(item.social[0].link);
|
app.openUrl(item.social[0].link);
|
||||||
}
|
}
|
||||||
|
gui.main.__internal_dismiss();
|
||||||
|
gui.suspension.show();
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
for(var i in item.social) {
|
for(var i in item.social) {
|
||||||
@@ -2675,9 +2760,14 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
socialImage.setBackgroundDrawable(gui.utils.ripple_drawable(socialImage.getMeasuredWidth(), socialImage.getMeasuredHeight(), "rect"));
|
socialImage.setBackgroundDrawable(gui.utils.ripple_drawable(socialImage.getMeasuredWidth(), socialImage.getMeasuredHeight(), "rect"));
|
||||||
socialImage.setOnClickListener(new android.view.View.OnClickListener({
|
socialImage.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function(view) {
|
onClick: function(view) {
|
||||||
print(view.getId())
|
if(item.social[view.getId()].platform == "mail") {
|
||||||
|
app.sendEmail({email: item.social[view.getId()].link})
|
||||||
|
} else {
|
||||||
app.openUrl(item.social[view.getId()].link);
|
app.openUrl(item.social[view.getId()].link);
|
||||||
}
|
}
|
||||||
|
gui.main.__internal_dismiss();
|
||||||
|
gui.suspension.show();
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
socialLayout.addView(socialImage);
|
socialLayout.addView(socialImage);
|
||||||
}
|
}
|
||||||
@@ -2696,8 +2786,18 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
func: [{
|
func: [{
|
||||||
icon: "refresh",
|
icon: "refresh",
|
||||||
onClick: function(s, selfContent) {
|
onClick: function(s, selfContent) {
|
||||||
|
if(s.ns0_isShowingSearchEditTextView) selfContent.removeSearchEditTextView(s, selfContent);
|
||||||
selfContent.getSheetList(s, true);
|
selfContent.getSheetList(s, true);
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
icon: "search",
|
||||||
|
onClick: function(s, selfContent) {
|
||||||
|
if(s.ns0_isShowingSearchEditTextView) {
|
||||||
|
selfContent.removeSearchEditTextView(s, selfContent);
|
||||||
|
} else {
|
||||||
|
selfContent.showSearchEditTextView(s, selfContent);
|
||||||
|
}
|
||||||
|
},
|
||||||
}],
|
}],
|
||||||
view: function(s) {
|
view: function(s) {
|
||||||
s.ns0_rl = new android.widget.RelativeLayout(ctx);
|
s.ns0_rl = new android.widget.RelativeLayout(ctx);
|
||||||
@@ -2956,12 +3056,83 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
update: function(s) {
|
update: function(s) {
|
||||||
if(s.initial) this.getSheetList(s, false);
|
if(s.initial) this.getSheetList(s, false);
|
||||||
},
|
},
|
||||||
getSheetList: function(s, isForce) {
|
|
||||||
|
onPageChanged: function(s, selfContent) {
|
||||||
|
if(s.ns0_isShowingSearchEditTextView) {
|
||||||
|
selfContent.removeSearchEditTextView(s);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
showSearchEditTextView: function(s, selfContent) {
|
||||||
|
gui.main.setFuncClickable(s.index, false);
|
||||||
|
s.ns0_isShowingSearchEditTextView = true;
|
||||||
|
s.ns0_searchEditText = new android.widget.EditText(ctx);
|
||||||
|
s.ns0_searchEditText.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||||
|
s.ns0_searchEditText.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-2, -1));
|
||||||
|
s.ns0_searchEditText.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||||
|
s.ns0_searchEditText.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||||
|
s.ns0_searchEditText.setTextSize(15);
|
||||||
|
s.ns0_searchEditText.setTextColor(gui.config.colors[config.values.theme].text);
|
||||||
|
s.ns0_searchEditText.setHintTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||||
|
s.ns0_searchEditText.setHint(config.languages[config.values.lang].page_sc_search_hint);
|
||||||
|
s.ns0_searchEditText.setAlpha(0);
|
||||||
|
s.ns0_searchEditText.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
|
onClick: function(view) {
|
||||||
|
view.setFocusable(true);
|
||||||
|
view.setFocusableInTouchMode(true);
|
||||||
|
view.requestFocus();
|
||||||
|
ctx.getSystemService(android.content.Context.INPUT_METHOD_SERVICE).showSoftInput(view, 0);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
s.ns0_searchEditText.setOnKeyListener(new android.view.View.OnKeyListener({
|
||||||
|
onKey: function(view, keycode, event) {
|
||||||
|
if (keycode == android.view.KeyEvent.KEYCODE_ENTER && event.getAction() == android.view.KeyEvent.ACTION_DOWN) {
|
||||||
|
selfContent.getSheetList(s, false, function(item) {
|
||||||
|
var regExp = new RegExp(view.getText(), "gi");
|
||||||
|
return regExp.test(item.fileName) || regExp.test(item.name);
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
gui.main._global_statusbar.addView(s.ns0_searchEditText);
|
||||||
|
s.ns0_searchEditText.setFocusable(true);
|
||||||
|
s.ns0_searchEditText.setFocusableInTouchMode(true);
|
||||||
|
s.ns0_searchEditText.requestFocus();
|
||||||
|
ctx.getSystemService(android.content.Context.INPUT_METHOD_SERVICE).showSoftInput(s.ns0_searchEditText, 0);
|
||||||
|
gui.main._global_title.setEnabled(false);
|
||||||
|
gui.main._global_title.setClickable(false);
|
||||||
|
gui.utils.value_animation("Float", 0, 1.0, 300 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
|
s.ns0_searchEditText.setAlpha(anim.getAnimatedValue());
|
||||||
|
gui.main._global_title.setAlpha(1.0 - anim.getAnimatedValue());
|
||||||
|
if(anim.getAnimatedValue() == 1.0) gui.main.setFuncClickable(s.index, true);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
removeSearchEditTextView: function(s, selfContent) { try {
|
||||||
|
s.ns0_isShowingSearchEditTextView = false;
|
||||||
|
gui.main.setFuncClickable(s.index, false);
|
||||||
|
s.ns0_searchEditText.setEnabled(false);
|
||||||
|
s.ns0_searchEditText.setClickable(false);
|
||||||
|
gui.main._global_title.setEnabled(true);
|
||||||
|
gui.main._global_title.setClickable(true);
|
||||||
|
gui.utils.value_animation("Float", 0, 1.0, 300 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
|
s.ns0_searchEditText.setAlpha(1.0 - anim.getAnimatedValue());
|
||||||
|
gui.main._global_title.setAlpha(anim.getAnimatedValue());
|
||||||
|
if(anim.getAnimatedValue() == 1.0) {
|
||||||
|
gui.main._global_statusbar.removeView(s.ns0_searchEditText);
|
||||||
|
gui.main.setFuncClickable(s.index, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} catch (e) { error(e); }},
|
||||||
|
|
||||||
|
getSheetList: function(s, isForce, filterBlock) {
|
||||||
gui.run(function() {
|
gui.run(function() {
|
||||||
s.ns0_progress.setIndeterminate(true);
|
s.ns0_progress.setIndeterminate(true);
|
||||||
s.ns0_listAdapterController.removeAll();
|
s.ns0_listAdapterController.removeAll();
|
||||||
gui.main.setFuncClickable(s.index, false);
|
gui.main.setFuncClickable(s.index, false);
|
||||||
gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
if(typeof(filterBlock) != "function") gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
gui.main._global_title.setAlpha(anim.getAnimatedValue());
|
gui.main._global_title.setAlpha(anim.getAnimatedValue());
|
||||||
});
|
});
|
||||||
gui.utils.value_animation("Float", 1.0, 0, 100, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 1.0, 0, 100, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
@@ -2981,11 +3152,17 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
});//修改乐谱键位提示
|
});//修改乐谱键位提示
|
||||||
s.ns0_listAdapterController.notifyChange();
|
s.ns0_listAdapterController.notifyChange();
|
||||||
threads.start(function() {
|
threads.start(function() {
|
||||||
sheetmgr.getLocalSheetList(isForce, function(successCount, failedCount) {
|
var list;
|
||||||
|
if(typeof(filterBlock) != "function") {
|
||||||
|
list = sheetmgr.getLocalSheetList(isForce, function(successCount, failedCount) {
|
||||||
gui.run(function(){
|
gui.run(function(){
|
||||||
gui.main._global_title.setText(String.format(config.languages[config.values.lang].page_lc_loading_sheet, successCount, failedCount));
|
gui.main._global_title.setText(String.format(config.languages[config.values.lang].page_lc_loading_sheet, successCount, failedCount));
|
||||||
});
|
});
|
||||||
}).map(function(e, i) {
|
});
|
||||||
|
} else {
|
||||||
|
list = sheetmgr.filterLocalSheet(filterBlock);
|
||||||
|
}
|
||||||
|
list.map(function(e, i) {
|
||||||
gui.run(function(){
|
gui.run(function(){
|
||||||
if(!e.failed || config.values.showFailedSheets) {
|
if(!e.failed || config.values.showFailedSheets) {
|
||||||
s.ns0_listAdapterController.add((function(item) {
|
s.ns0_listAdapterController.add((function(item) {
|
||||||
@@ -3000,11 +3177,15 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
s.ns0_listAdapterController.notifyChange();
|
s.ns0_listAdapterController.notifyChange();
|
||||||
gui.main._global_title.setText(gui.main.getPageInfo(s.index).title);
|
gui.main._global_title.setText(gui.main.getPageInfo(s.index).title);
|
||||||
gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
gui.main._global_title.setAlpha(anim.getAnimatedValue());
|
|
||||||
s.ns0_listView.setAlpha(anim.getAnimatedValue());
|
s.ns0_listView.setAlpha(anim.getAnimatedValue());
|
||||||
s.ns0_progress.setAlpha(1 - anim.getAnimatedValue());
|
s.ns0_progress.setAlpha(1 - anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 1.0) s.ns0_progress.setIndeterminate(false);
|
if(anim.getAnimatedValue() == 1.0) s.ns0_progress.setIndeterminate(false);
|
||||||
});
|
});
|
||||||
|
if(typeof(filterBlock) != "function") {
|
||||||
|
gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
|
gui.main._global_title.setAlpha(anim.getAnimatedValue());
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -3126,7 +3307,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
element.download.setBackgroundDrawable(gui.utils.ripple_drawable(element.download.getMeasuredWidth(), element.download.getMeasuredHeight(), "rect"));
|
element.download.setBackgroundDrawable(gui.utils.ripple_drawable(element.download.getMeasuredWidth(), element.download.getMeasuredHeight(), "rect"));
|
||||||
element.download.setOnClickListener(new android.view.View.OnClickListener({
|
element.download.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function() { threads.start(function() {
|
onClick: function() { threads.start(function() {
|
||||||
if(!element.isShowingStatusBar) sheetmgr.downloadAndLoad(element.file, {author: element.author, keyCount: element.keyCount}, function(r) {
|
if(!element.isShowingStatusBar) sheetmgr.downloadAndLoad(element.file, {author: element.author, keyCount: element.keyCount, name: element.name}, function(r) {
|
||||||
switch(r.status) {
|
switch(r.status) {
|
||||||
case 1: {
|
case 1: {
|
||||||
gui.run(function() {
|
gui.run(function() {
|
||||||
@@ -3313,7 +3494,8 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
onKey: function(view, keycode, event) {
|
onKey: function(view, keycode, event) {
|
||||||
if (keycode == android.view.KeyEvent.KEYCODE_ENTER && event.getAction() == android.view.KeyEvent.ACTION_DOWN) {
|
if (keycode == android.view.KeyEvent.KEYCODE_ENTER && event.getAction() == android.view.KeyEvent.ACTION_DOWN) {
|
||||||
selfContent.getOnlineSheetList(s, false, function(item) {
|
selfContent.getOnlineSheetList(s, false, function(item) {
|
||||||
return (new RegExp(view.getText(), "gi")).test(item.name);
|
var regExp = new RegExp(view.getText(), "gi");
|
||||||
|
return regExp.test(item.name) || regExp.test(item.author) || regExp.test(item.desc);
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -3349,7 +3531,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
gui.main.setFuncClickable(s.index, true);
|
gui.main.setFuncClickable(s.index, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (e) {}},
|
} catch (e) { error(e); }},
|
||||||
|
|
||||||
update: function(s) {
|
update: function(s) {
|
||||||
if(s.initial) this.getOnlineSheetList(s, false);
|
if(s.initial) this.getOnlineSheetList(s, false);
|
||||||
@@ -3460,6 +3642,29 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
onClick: function(checked) {
|
onClick: function(checked) {
|
||||||
config.values.autoPlay = config.save("auto_play", checked);
|
config.values.autoPlay = config.save("auto_play", checked);
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
type: "checkbox",
|
||||||
|
name: config.languages[config.values.lang].page_setting_no_popup_play,
|
||||||
|
check: config.values.noPopupPlay,
|
||||||
|
onClick: function(checked) {
|
||||||
|
config.values.noPopupPlay = config.save("no_popup_play", checked);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: "seekbar",
|
||||||
|
name: config.languages[config.values.lang].page_setting_no_popup_play_interval,
|
||||||
|
value: config.values.intervalSecondsPlayInNoPopupMode,
|
||||||
|
range: [3, 15],
|
||||||
|
onChangeUp: function(value) {
|
||||||
|
config.values.intervalSecondsPlayInNoPopupMode = config.save("interval_seconds_play", value);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
type: "seekbar",
|
||||||
|
name: config.languages[config.values.lang].page_setting_chord_delay,
|
||||||
|
value: config.values.chordDelay,
|
||||||
|
range: [0, 100],
|
||||||
|
onChangeUp: function(value) {
|
||||||
|
config.values.chordDelay = config.save("chordDelay", value);
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
name: config.languages[config.values.lang].page_setting_show_broken_sheet,
|
name: config.languages[config.values.lang].page_setting_show_broken_sheet,
|
||||||
@@ -3511,7 +3716,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
name: config.languages[config.values.lang].page_setting_show_license,
|
name: config.languages[config.values.lang].page_setting_show_license,
|
||||||
onClick: function(v) {
|
onClick: function(v) {
|
||||||
threads.start(function() {
|
threads.start(function() {
|
||||||
config.fetchRepoFile("LICENSE", null, function(body) {
|
config.fetchRepoFile("LICENSE", function(body) {
|
||||||
gui.dialogs.showConfirmDialog({
|
gui.dialogs.showConfirmDialog({
|
||||||
title: "GNU GENERAL PUBLIC LICENSE",
|
title: "GNU GENERAL PUBLIC LICENSE",
|
||||||
text: body.string(),
|
text: body.string(),
|
||||||
@@ -3526,7 +3731,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
name: config.languages[config.values.lang].page_setting_show_changelog,
|
name: config.languages[config.values.lang].page_setting_show_changelog,
|
||||||
onClick: function(v) {
|
onClick: function(v) {
|
||||||
threads.start(function() {
|
threads.start(function() {
|
||||||
config.fetchRepoFile("update_log.txt", null, function(body) {
|
config.fetchRepoFile("update_log.txt", function(body) {
|
||||||
gui.dialogs.showConfirmDialog({
|
gui.dialogs.showConfirmDialog({
|
||||||
title: config.languages[config.values.lang].page_setting_changelog_title,
|
title: config.languages[config.values.lang].page_setting_changelog_title,
|
||||||
text: body.string(),
|
text: body.string(),
|
||||||
@@ -3550,7 +3755,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
try {
|
try {
|
||||||
android.os.Build.VERSION_CODES.R
|
android.os.Build.VERSION_CODES.R
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
sList.list.splice(6, 1);
|
sList.list.splice(9, 1);
|
||||||
}
|
}
|
||||||
return sList.list;
|
return sList.list;
|
||||||
}()), function self(element) {
|
}()), function self(element) {
|
||||||
@@ -3607,6 +3812,43 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
}));
|
}));
|
||||||
element.v_relative.addView(element.v_checkbox);
|
element.v_relative.addView(element.v_checkbox);
|
||||||
break;
|
break;
|
||||||
|
case "seekbar":
|
||||||
|
element.v_title = new android.widget.TextView(ctx);
|
||||||
|
element.v_title.setId(114);
|
||||||
|
element.v_title.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||||
|
element.v_title.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-2, -2));
|
||||||
|
element.v_title.getLayoutParams().setMargins(dp * 10, dp * 10, dp * 10, dp * 10);
|
||||||
|
element.v_title.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||||
|
element.v_title.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_TOP);
|
||||||
|
element.v_title.setTextSize(14);
|
||||||
|
element.v_title.setTextColor(gui.config.colors[config.values.theme].text);
|
||||||
|
element.v_title.setText(element.name);
|
||||||
|
element.v_relative.addView(element.v_title);
|
||||||
|
element.v_disp = new android.widget.TextView(ctx);
|
||||||
|
element.v_disp.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||||
|
element.v_disp.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-2, -2));
|
||||||
|
element.v_disp.getLayoutParams().setMargins(dp * 10, dp * 10, dp * 25, dp * 10);
|
||||||
|
element.v_disp.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_RIGHT);
|
||||||
|
element.v_disp.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_TOP);
|
||||||
|
element.v_disp.setTextSize(12);
|
||||||
|
element.v_disp.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||||
|
element.v_disp.setText(String(Math.round(element.value)));
|
||||||
|
element.v_relative.addView(element.v_disp);
|
||||||
|
element.v_seek = android.widget.SeekBar(ctx);
|
||||||
|
element.v_seek.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-1, -2));
|
||||||
|
element.v_seek.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 114);
|
||||||
|
element.v_seek.setMax(100);
|
||||||
|
element.v_seek.setProgress(element.value / (element.range[1] - element.range[0]) * 100);
|
||||||
|
element.v_seek.setOnSeekBarChangeListener(new android.widget.SeekBar.OnSeekBarChangeListener({
|
||||||
|
onProgressChanged: function(sb, prog) {
|
||||||
|
element.v_disp.setText(String(Math.round(sb.getProgress() / 100 * (element.range[1] - element.range[0]) + element.range[0])));
|
||||||
|
},
|
||||||
|
onStopTrackingTouch: function(sb) {
|
||||||
|
element.onChangeUp(sb.getProgress() / 100 * (element.range[1] - element.range[0]) + element.range[0]);
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
element.v_relative.addView(element.v_seek);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return element.v_relative;
|
return element.v_relative;
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
{
|
{
|
||||||
"list": [{
|
"list": [{
|
||||||
"code": "zh_CN",
|
"code": "zh_CN",
|
||||||
"name": "简体中文"
|
"name": "简体中文",
|
||||||
|
"version": 6
|
||||||
}, {
|
}, {
|
||||||
"code": "en_US",
|
"code": "en_US",
|
||||||
"name": "English (US)"
|
"name": "English (US)",
|
||||||
|
"version": 6
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,8 @@
|
|||||||
"ui";
|
"ui";
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
SkyAutoPlayer (Auto.js script)
|
SkyAutoPlayer (Auto.js script)
|
||||||
Copyright © 2020 StageGuard
|
Copyright © 2020-2021 StageGuard
|
||||||
Contact :
|
|
||||||
(QQ: 1355416608)
|
|
||||||
(Email: beamiscool@qq.com)
|
|
||||||
(BaiduTieba@拐角处_等你)
|
|
||||||
(Weibo@StageGuard)
|
|
||||||
(CoolApk@StageGuard)
|
|
||||||
(Twiter@stageguardcn)
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Lesser General Public
|
modify it under the terms of the GNU Lesser General Public
|
||||||
@@ -27,23 +19,26 @@
|
|||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||||
USA
|
USA
|
||||||
*/
|
*/
|
||||||
|
(function(emitter) {
|
||||||
var emitter = events.emitter(threads.currentThread());
|
|
||||||
threads.start(function () {
|
threads.start(function () {
|
||||||
emitter.emit("evaluate", (function () {
|
emitter.emit("evaluate", (function () {
|
||||||
var resp = http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/source/SkyAutoplayer.js");
|
//Many sources
|
||||||
|
let sources = [
|
||||||
|
"http://cdn.stagex.top:8090/StageGuard/SkyAutoPlayerScript/raw/master/source/SkyAutoplayer.js",
|
||||||
|
"https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript/source/SkyAutoplayer.js",
|
||||||
|
"https://dl.skyautoplayerscript.stageguard.top/source/SkyAutoplayer.js",
|
||||||
|
"https://raw.githubusercontent.com/StageGuard/SkyAutoPlayerScript/master/source/SkyAutoplayer.js"
|
||||||
|
];
|
||||||
|
for (let i in sources) {
|
||||||
|
let resp = http.get(sources[i]);
|
||||||
if (resp.statusCode >= 200 && resp.statusCode < 300) {
|
if (resp.statusCode >= 200 && resp.statusCode < 300) {
|
||||||
return resp.body.string();
|
return resp.body.string();
|
||||||
} else {
|
}
|
||||||
resp = http.get("https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/gitVersion").body.string() + "/source/SkyAutoplayer.js");
|
}
|
||||||
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
|
||||||
return resp.body.string();
|
|
||||||
} else {
|
|
||||||
return "console.show();console.log(\"Failed to load script\")";
|
return "console.show();console.log(\"Failed to load script\")";
|
||||||
}
|
|
||||||
}
|
|
||||||
}()));
|
}()));
|
||||||
});
|
});
|
||||||
emitter.on('evaluate', function (s) {
|
emitter.on('evaluate', function (s) {
|
||||||
eval(s);
|
eval(s);
|
||||||
});
|
});
|
||||||
|
}(events.emitter(threads.currentThread())));
|
||||||
@@ -1,4 +1,20 @@
|
|||||||
版本: 20
|
版本: 24
|
||||||
|
更新时间: 2022.03.06 11:30
|
||||||
|
更新内容:
|
||||||
|
* 新增:本地乐谱搜索。
|
||||||
|
|
||||||
|
版本: 23
|
||||||
|
更新时间: 2021.6.29 13:10
|
||||||
|
更新内容:
|
||||||
|
* 新增:"弹奏不显示弹奏界面"选项(Issue #6)。
|
||||||
|
|
||||||
|
版本: 22
|
||||||
|
更新时间: 2020.12.22 23:48
|
||||||
|
更新内容:
|
||||||
|
* 新增:和弦按键按压延迟,可在设置中调整。
|
||||||
|
这个功能就是在按压和弦的时候可以按照设定的时间依次从低音到高音依次按压。
|
||||||
|
|
||||||
|
版本: 21
|
||||||
更新时间: 2020.12.22 18:31
|
更新时间: 2020.12.22 18:31
|
||||||
更新内容:
|
更新内容:
|
||||||
* 新增:多语言设置。
|
* 新增:多语言设置。
|
||||||
|
|||||||
Reference in New Issue
Block a user