Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
285e5f9b1b | ||
|
|
9e2668c7fd | ||
|
|
e6fb1926d8 | ||
|
|
e6a8caa696 | ||
|
|
08a970c7ae | ||
|
|
46abcf97a5 | ||
|
|
d42c80b9c2 | ||
|
|
db9910451d | ||
|
|
d31063c2c2 | ||
|
|
9bcf78bb30 | ||
|
|
1fe35c8258 | ||
|
|
cd644fe8c1 | ||
|
|
9dc48de772 | ||
|
|
777c5ca376 | ||
|
|
7998af8dd5 | ||
|
|
1b13fb295d | ||
|
|
c1a383f5bb | ||
|
|
05eb9b03d5 | ||
|
|
416715e28c | ||
|
|
937334be46 | ||
|
|
1ee3c70bc3 | ||
|
|
4616264951 | ||
|
|
17bf9bac77 | ||
|
|
f2757e25c3 | ||
|
|
8c88ccccc9 | ||
|
|
18fdf78b61 | ||
|
|
6f19874810 | ||
|
|
50532cdf34 | ||
|
|
bec33d0b8d |
No files matched your search
@@ -123,6 +123,9 @@ files.removeDir("/storage/emulated/0/Documents/SkyAutoPlayer/");
|
||||
哔哩哔哩[@UTF16](https://space.bilibili.com/623364258)<br>
|
||||
酷安[@Syngenex](http://www.coolapk.com/u/1093421)<br>
|
||||
Twitter[Phoebe@huunhut1217](https://mobile.twitter.com/huunhut1217)<br>
|
||||
酷安[@终究是错付了](http://www.coolapk.com/u/2293899)<br>
|
||||
酷安[@DesperatU](http://www.coolapk.com/u/1075889)<br>
|
||||
酷安[@明明酱](http://www.coolapk.com/u/1706128)<br>
|
||||
<br>
|
||||
|
||||
# 图标来源
|
||||
@@ -135,19 +138,21 @@ Twitter[Phoebe@huunhut1217](https://mobile.twitter.com/huunhut1217)<br>
|
||||
|
||||
# 许可证协议
|
||||
```
|
||||
SkyAutoPlayer (Auto.js script)
|
||||
Copyright © 2020 StageGuard
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
SkyAutoPlayer (Auto.js script)
|
||||
Copyright © 2020 StageGuard
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
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
|
||||
```
|
||||
+1
-1
@@ -1 +1 @@
|
||||
dbb262716e0bf7f84b015a55dc9d02af1717a1ab
|
||||
9e2668c7fd5364b4829dde723ee929e4122a70d1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
+1823
-1037
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+249
-92
@@ -1,28 +1,30 @@
|
||||
"ui";
|
||||
"use strict";
|
||||
/*
|
||||
Sky Auto Player (Auto.js script)
|
||||
SkyAutoPlayer (Auto.js script)
|
||||
Copyright © 2020 StageGuard
|
||||
Contact :
|
||||
(QQ: 1355416608)
|
||||
(Email: beamiscool@qq.com)
|
||||
(BaiduTieba@拐角处_等你)
|
||||
(Weibo@StageGuard)
|
||||
(CoolApk@StageGuard)
|
||||
(Twiter@stageguardcn)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
Contact :
|
||||
(QQ: 1355416608)
|
||||
(Email: beamiscool@qq.com)
|
||||
(BaiduTieba@拐角处_等你)
|
||||
(Weibo@StageGuard)
|
||||
(CoolApk@StageGuard)
|
||||
(Twiter@stageguardcn)
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
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.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
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
|
||||
*/
|
||||
|
||||
const user_agreements =
|
||||
@@ -64,7 +66,7 @@ threads.start(function() {
|
||||
|
||||
sheetmgr = {
|
||||
rootDir: android.os.Environment.getExternalStorageDirectory() + "/Android/data/com.Maple.SkyStudio/files/Sheet/",
|
||||
encoding: "utf-16le",
|
||||
encoding: "x-UTF-16LE-BOM",
|
||||
|
||||
cachedLocalSheetList: [],
|
||||
cachedOnlineSharedSheetInfoList: [],
|
||||
@@ -101,6 +103,7 @@ sheetmgr = {
|
||||
}
|
||||
return stringBuffer.toString();
|
||||
} (7)) + ".txt");
|
||||
|
||||
var parsed;
|
||||
files.write(sheet, parsed = (function() {
|
||||
var data = eval(body.string())[0];
|
||||
@@ -110,7 +113,6 @@ sheetmgr = {
|
||||
return "[" + JSON.stringify(data) + "]";
|
||||
}()), sheetmgr.encoding);
|
||||
parsed = eval(parsed)[0];
|
||||
//parsed.songNotes = sheetmgr.parseSongNote(parsed.songNotes);
|
||||
parsed.fileName = sheet;
|
||||
sheetmgr.cachedLocalSheetList.push(parsed);
|
||||
listener({status:3});
|
||||
@@ -157,8 +159,9 @@ sheetmgr = {
|
||||
var r = [];
|
||||
var t_time = 0;
|
||||
var t_sets = [];
|
||||
const regexp = /^(\d)Key(\d{1,})$/;
|
||||
for(var i in raw) {
|
||||
var key = Number(raw[i].key.replace(/^(\d)Key(\d{1,})$/, "$2"));
|
||||
var key = Number(raw[i].key.replace(regexp, "$2"));
|
||||
if(raw[i].time != t_time) {
|
||||
r.push({time: t_time, keys: t_sets});
|
||||
t_sets = [];
|
||||
@@ -282,8 +285,8 @@ sheetplayer = {
|
||||
java.lang.Thread.sleep(sheetplayer.nextInterval = Math.round(sheetplayer.nextInterval * sheetplayer.speed));
|
||||
sheetplayer.currentNote ++;
|
||||
}
|
||||
if(!(sheetplayer.currentNote < sheetplayer.noteCount)) sheetplayer.stop();
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
stop: function() {
|
||||
@@ -345,6 +348,9 @@ config = {
|
||||
_global_storage: null,
|
||||
|
||||
values: {
|
||||
currentVersion: 19,
|
||||
gitVersion: "",
|
||||
|
||||
key_coordinates15: [],
|
||||
key_coordinates8: [],
|
||||
skipRunScriptTip: false,
|
||||
@@ -356,8 +362,7 @@ config = {
|
||||
skipChangeKeyCountTip: false,
|
||||
showFailedSheets: true,
|
||||
tipOnAndroidR: true,
|
||||
currentVersion: 16,
|
||||
gitVersion: "",
|
||||
theme: "dark",
|
||||
},
|
||||
|
||||
bitmaps: {},
|
||||
@@ -376,6 +381,7 @@ config = {
|
||||
this.values.skipChangeKeyCountTip = this._global_storage.get("skip_change_key_count_tip", this.values.skipChangeKeyCountTip);
|
||||
this.values.showFailedSheets = this._global_storage.get("show_failed_sheets", this.values.showFailedSheets);
|
||||
this.values.tipOnAndroidR = this._global_storage.get("tip_storage_on_android_r", this.values.tipOnAndroidR);
|
||||
this.values.theme = this._global_storage.get("theme", this.values.theme);
|
||||
|
||||
try {
|
||||
android.os.Build.VERSION_CODES.R
|
||||
@@ -414,7 +420,7 @@ config = {
|
||||
|
||||
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"*/];
|
||||
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 downloadQueue = [];
|
||||
var tryCount = 1;
|
||||
@@ -503,6 +509,23 @@ config = {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
updateBitmapTheme: function() {
|
||||
var filterBitmap = function(bitmap, replacedColor) {
|
||||
var rBitmap = android.graphics.Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), android.graphics.Bitmap.Config.ARGB_8888);
|
||||
var canvas = new android.graphics.Canvas(rBitmap);
|
||||
var paint = new android.graphics.Paint();
|
||||
var rect = new android.graphics.Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
|
||||
paint.setAntiAlias(true);
|
||||
canvas.drawARGB(0, 0, 0, 0);
|
||||
paint.setColorFilter(new android.graphics.PorterDuffColorFilter(replacedColor, android.graphics.PorterDuff.Mode.SRC_IN));
|
||||
canvas.drawBitmap(bitmap, rect, rect, paint);
|
||||
return rBitmap;
|
||||
};
|
||||
for(var i in this.bitmaps) {
|
||||
this.bitmaps[i] = filterBitmap(this.bitmaps[i], this.values.theme == "dark" ? android.graphics.Color.WHITE : android.graphics.Color.BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -719,10 +742,16 @@ gui = {
|
||||
|
||||
config: {
|
||||
colors: {
|
||||
background: android.graphics.Color.parseColor("#212121"),
|
||||
text: android.graphics.Color.parseColor("#FFFFFF"),
|
||||
dark_text: android.graphics.Color.parseColor("#000000"),
|
||||
sec_text: android.graphics.Color.parseColor("#7B7B7B"),
|
||||
dark: {
|
||||
background: android.graphics.Color.parseColor("#212121"),
|
||||
text: android.graphics.Color.parseColor("#FFFFFF"),
|
||||
sec_text: android.graphics.Color.parseColor("#7B7B7B"),
|
||||
},
|
||||
light: {
|
||||
background: android.graphics.Color.parseColor("#F0F0F0"),
|
||||
text: android.graphics.Color.parseColor("#000000"),
|
||||
sec_text: android.graphics.Color.parseColor("#7B7B7B"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -807,11 +836,11 @@ gui = {
|
||||
var layout = o.layout = new android.widget.LinearLayout(ctx);
|
||||
layout.setOrientation(android.widget.LinearLayout.VERTICAL);
|
||||
layout.setPadding(dp * 10, isNoText ? dp * 5 : dp * 10, dp * 10, isNoText ? dp * 5 : 0);
|
||||
layout.setBackgroundColor(gui.config.colors.background);
|
||||
layout.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
if (!isNoText) {
|
||||
var text = o.text = new android.widget.TextView(ctx);
|
||||
text.setLayoutParams(new android.widget.FrameLayout.LayoutParams(-2, -2));
|
||||
text.setTextColor(gui.config.colors.text);
|
||||
text.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
text.setPadding(dp * 10, dp * 10, dp * 10, dp * 10);
|
||||
layout.addView(text);
|
||||
}
|
||||
@@ -900,7 +929,7 @@ gui = {
|
||||
try {
|
||||
var scr, layout, title, text, skip, onClick, dialog;
|
||||
scr = new android.widget.ScrollView(ctx);
|
||||
scr.setBackgroundColor(gui.config.colors.background);
|
||||
scr.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
layout = new android.widget.LinearLayout(ctx);
|
||||
layout.setLayoutParams(new android.widget.FrameLayout.LayoutParams(-2, -2));
|
||||
layout.setOrientation(android.widget.LinearLayout.VERTICAL);
|
||||
@@ -910,7 +939,7 @@ gui = {
|
||||
title.setText(s.title);
|
||||
title.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
title.setPadding(0, 0, 0, 10 * dp);
|
||||
title.setTextColor(gui.config.colors.text);
|
||||
title.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
title.setTextSize(16);
|
||||
layout.addView(title);
|
||||
}
|
||||
@@ -919,7 +948,7 @@ gui = {
|
||||
text.setText(s.text);
|
||||
text.setPadding(0, 0, 0, 10 * dp);
|
||||
text.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
text.setTextColor(gui.config.colors.sec_text);
|
||||
text.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
text.setTextSize(14);
|
||||
layout.addView(text);
|
||||
}
|
||||
@@ -929,7 +958,7 @@ gui = {
|
||||
skip.setLayoutParams(android.widget.LinearLayout.LayoutParams(-2, -2, 0));
|
||||
skip.getLayoutParams().setMargins(0, 0, 0, 10 * dp)
|
||||
skip.setText("不再提示");
|
||||
skip.setTextColor(gui.config.colors.sec_text)
|
||||
skip.setTextColor(gui.config.colors[config.values.theme].sec_text)
|
||||
layout.addView(skip);
|
||||
}
|
||||
onClick = function(i) {
|
||||
@@ -944,7 +973,7 @@ gui = {
|
||||
b.setText(String(e));
|
||||
b.setGravity(android.view.Gravity.CENTER);
|
||||
b.setPadding(10 * dp, 10 * dp, 10 * dp, 10 * dp);
|
||||
b.setTextColor(gui.config.colors.text);
|
||||
b.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
b.setTextSize(14);
|
||||
b.measure(0, 0);
|
||||
b.setBackgroundDrawable(gui.utils.ripple_drawable(b.getMeasuredWidth(), b.getMeasuredHeight(), "rect"));
|
||||
@@ -986,7 +1015,7 @@ gui = {
|
||||
e._title.setFocusable(false);
|
||||
e._title.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-1, -2));
|
||||
e._title.setTextSize(16);
|
||||
e._title.setTextColor(gui.config.colors.text);
|
||||
e._title.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
e.view.addView(e._title);
|
||||
if (e.description) {
|
||||
e._description = new android.widget.TextView(ctx);
|
||||
@@ -994,7 +1023,7 @@ gui = {
|
||||
e._description.setPadding(0, 3 * dp, 0, 0);
|
||||
e._description.setLayoutParams(android.widget.LinearLayout.LayoutParams(-1, -2));
|
||||
e._description.setTextSize(14);
|
||||
e._description.setTextColor(gui.config.colors.sec_text);
|
||||
e._description.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
e.view.addView(e._description);
|
||||
}
|
||||
return e.view;
|
||||
@@ -1002,7 +1031,7 @@ gui = {
|
||||
}
|
||||
frame = new android.widget.FrameLayout(ctx);
|
||||
frame.setPadding(5 * dp, 5 * dp, 5 * dp, 5 * dp);
|
||||
frame.setBackgroundColor(gui.config.colors.background);
|
||||
frame.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
list = new android.widget.ListView(ctx);
|
||||
list.setLayoutParams(new android.widget.FrameLayout.LayoutParams(-1, -2));
|
||||
list.setDividerHeight(0);
|
||||
@@ -1010,10 +1039,13 @@ gui = {
|
||||
list.setOnItemClickListener(new android.widget.AdapterView.OnItemClickListener({
|
||||
onItemClick: function(parent, view, pos, id) {
|
||||
try {
|
||||
if (callback && !callback(pos, s[pos])) gui.utils.value_animation("Float", 1, 0, 75, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||
if (callback) {
|
||||
callback(pos);
|
||||
gui.utils.value_animation("Float", 1, 0, 75, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||
dialog.setAlpha(anim.getAnimatedValue());
|
||||
if(anim.getAnimatedValue() == 1) gui.winMgr.removeView(dialog);
|
||||
});
|
||||
}
|
||||
return true;
|
||||
} catch (e) {
|
||||
error(e + " → " + e.lineNumber);
|
||||
@@ -1156,11 +1188,11 @@ gui = {
|
||||
gui.main._global_base.setGravity(android.view.Gravity.CENTER | android.view.Gravity.CENTER);
|
||||
gui.main._global_base.setOrientation(android.widget.LinearLayout.VERTICAL);
|
||||
gui.main._global_base.setLayoutParams(new android.widget.LinearLayout.LayoutParams(dp * gui.main.window_width, dp * gui.main.window_height));
|
||||
gui.main._global_base.setBackgroundColor(gui.config.colors.background);
|
||||
gui.main._global_base.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
|
||||
gui.main._global_statusbar = new android.widget.RelativeLayout(ctx);
|
||||
gui.main._global_statusbar.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-1, dp * gui.main.status_bar_height));
|
||||
gui.main._global_statusbar.setBackgroundColor(gui.config.colors.background);
|
||||
gui.main._global_statusbar.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
gui.main._global_statusbar.setElevation(10 * dp);
|
||||
|
||||
gui.main._global_title = new android.widget.TextView(ctx);
|
||||
@@ -1171,7 +1203,7 @@ gui = {
|
||||
if(content.title != null) gui.main._global_title.setText(content.title);
|
||||
gui.main._global_title.setTextSize(15);
|
||||
gui.main._global_title.setShadowLayer(dp * 5, 0, 0, android.graphics.Color.BLACK);
|
||||
gui.main._global_title.setTextColor(gui.config.colors.text);
|
||||
gui.main._global_title.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
gui.main._global_title.setOnTouchListener(new android.view.View.OnTouchListener({
|
||||
onTouch: function onTouchFunction(view, event) {
|
||||
switch (event.getAction()) {
|
||||
@@ -1202,7 +1234,7 @@ gui = {
|
||||
gui.main._global_close.setBackgroundDrawable(gui.utils.ripple_drawable(gui.main._global_close.getMeasuredWidth(), gui.main._global_close.getMeasuredHeight(), "rect"));
|
||||
gui.main._global_close.setText("×");
|
||||
gui.main._global_close.setTextSize(22);
|
||||
gui.main._global_close.setTextColor(gui.config.colors.text);
|
||||
gui.main._global_close.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
gui.main._global_close.setOnClickListener(new android.view.View.OnClickListener({
|
||||
onClick: function() {
|
||||
gui.main.__internal_dismiss();
|
||||
@@ -1216,7 +1248,7 @@ gui = {
|
||||
|
||||
gui.main._global_content_container = new android.widget.RelativeLayout(ctx);
|
||||
gui.main._global_content_container.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-1, dp * (gui.main.window_height - gui.main.status_bar_height - gui.main.navigation_bar_height)));
|
||||
gui.main._global_content_container.setBackgroundColor(gui.config.colors.background);
|
||||
gui.main._global_content_container.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
|
||||
s._content_height = dp * (gui.main.window_height - gui.main.status_bar_height - gui.main.navigation_bar_height);
|
||||
gui.main._global_content_container.measure(0, 0);
|
||||
@@ -1240,7 +1272,7 @@ gui = {
|
||||
gui.main._global_navigation_bar.setGravity(android.view.Gravity.CENTER | android.view.Gravity.CENTER);
|
||||
gui.main._global_navigation_bar.setOrientation(android.widget.LinearLayout.HORIZONTAL);
|
||||
gui.main._global_navigation_bar.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-1, dp * (gui.main.navigation_bar_height + gui.main.navigation_bar_updown_margin * 2)));
|
||||
gui.main._global_navigation_bar.setBackgroundColor(gui.config.colors.background);
|
||||
gui.main._global_navigation_bar.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
|
||||
gui.main.__internal_genNavigationList(s, content);
|
||||
|
||||
@@ -1343,7 +1375,7 @@ gui = {
|
||||
view.setBackgroundDrawable(gui.utils.ripple_drawable(view.getMeasuredWidth(), view.getMeasuredHeight(), "rect"));
|
||||
view.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
view.setAlpha(0);
|
||||
view.setImageBitmap(content.func[i].icon);
|
||||
view.setImageBitmap(config.bitmaps[content.func[i].icon]);
|
||||
view.setOnClickListener(new android.view.View.OnClickListener({
|
||||
onClick: function(view) {content.func[view.getId() - (gui.main._global_close.getId() + 1)].onClick(s, content)}
|
||||
}));
|
||||
@@ -1388,12 +1420,12 @@ gui = {
|
||||
s["navigationBtnText" + i].setText(gui.main.views[i].navigation_title);
|
||||
s["navigationBtnText" + i].setTextSize(12);
|
||||
s["navigationBtnText" + i].setShadowLayer(dp, 0, 0, android.graphics.Color.BLACK);
|
||||
s["navigationBtnText" + i].setTextColor(s.index == gui.main.views[i].index ? gui.config.colors.text : gui.config.colors.sec_text);
|
||||
s["navigationBtnText" + i].setTextColor(s.index == gui.main.views[i].index ? gui.config.colors[config.values.theme].text : gui.config.colors[config.values.theme].sec_text);
|
||||
|
||||
s["navigationBtnImg" + i] = new android.widget.ImageView(ctx);
|
||||
s["navigationBtnImg" + i].setId(14);
|
||||
s["navigationBtnImg" + i].setScaleType(android.widget.ImageView.ScaleType.CENTER_CROP);
|
||||
if(gui.main.views[i].navigation_icon != null) s["navigationBtnImg" + i].setImageBitmap(gui.main.views[i].navigation_icon);
|
||||
if(gui.main.views[i].navigation_icon != null) s["navigationBtnImg" + i].setImageBitmap(config.bitmaps[gui.main.views[i].navigation_icon]);
|
||||
s.__navigationBtnImgHeight = (function() {
|
||||
s["navigationBtnText" + i].measure(0, 0);
|
||||
return dp * gui.main.navigation_bar_height - s["navigationBtnText" + i].getMeasuredHeight();
|
||||
@@ -1409,11 +1441,11 @@ gui = {
|
||||
if(gui.main._global_navigation_bar == null) return;
|
||||
if(!/^android/.test(String(gui.main._global_navigation_bar.findViewById(s.index)))) return;
|
||||
if(gui.main.current_navigation_selection == s.index) return;
|
||||
var colorAnim = android.animation.ObjectAnimator.ofInt(gui.main._global_navigation_bar.findViewById(s.index).findViewById(12), "textColor", gui.config.colors.sec_text, gui.config.colors.text);
|
||||
var colorAnim = android.animation.ObjectAnimator.ofInt(gui.main._global_navigation_bar.findViewById(s.index).findViewById(12), "textColor", gui.config.colors[config.values.theme].sec_text, gui.config.colors[config.values.theme].text);
|
||||
colorAnim.setDuration(300);
|
||||
colorAnim.setEvaluator(new android.animation.ArgbEvaluator());
|
||||
colorAnim.start();
|
||||
colorAnim = android.animation.ObjectAnimator.ofInt(gui.main._global_navigation_bar.findViewById(gui.main.current_navigation_selection).findViewById(12), "textColor", gui.config.colors.text, gui.config.colors.sec_text);
|
||||
colorAnim = android.animation.ObjectAnimator.ofInt(gui.main._global_navigation_bar.findViewById(gui.main.current_navigation_selection).findViewById(12), "textColor", gui.config.colors[config.values.theme].text, gui.config.colors[config.values.theme].sec_text);
|
||||
colorAnim.setDuration(300);
|
||||
colorAnim.setEvaluator(new android.animation.ArgbEvaluator());
|
||||
colorAnim.start();
|
||||
@@ -1616,8 +1648,8 @@ gui = {
|
||||
if(!gui.key_coordinate_navigation.isShowingText) {
|
||||
gui.key_coordinate_navigation._global_text = new android.widget.TextView(ctx);
|
||||
gui.key_coordinate_navigation._global_text.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
gui.key_coordinate_navigation._global_text.setTextColor(gui.config.colors.text);
|
||||
gui.key_coordinate_navigation._global_text.setBackgroundColor(gui.config.colors.background);
|
||||
gui.key_coordinate_navigation._global_text.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
gui.key_coordinate_navigation._global_text.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
gui.key_coordinate_navigation._global_text.setTextSize(16);
|
||||
gui.key_coordinate_navigation._global_text.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
gui.key_coordinate_navigation._global_text.getLayoutParams().setMargins(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
@@ -1676,12 +1708,12 @@ gui = {
|
||||
gui.player_panel._global_base.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
gui.player_panel._global_base.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
gui.player_panel._global_base.getLayoutParams().setMargins(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
gui.player_panel._global_base.setBackgroundColor(gui.config.colors.background);
|
||||
gui.player_panel._global_base.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
|
||||
gui.player_panel._global_text = new android.widget.TextView(ctx);
|
||||
gui.player_panel._global_text.setId(12);
|
||||
gui.player_panel._global_text.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-2, -2));
|
||||
gui.player_panel._global_text.setTextColor(gui.config.colors.text);
|
||||
gui.player_panel._global_text.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
gui.player_panel._global_text.setTextSize(14);
|
||||
gui.player_panel._global_text.setText("解析中...");
|
||||
gui.player_panel._global_text.setSingleLine(true);
|
||||
@@ -1718,7 +1750,7 @@ gui = {
|
||||
s.close.setBackgroundDrawable(gui.utils.ripple_drawable(s.close.getMeasuredWidth(), s.close.getMeasuredHeight(), "rect"));
|
||||
s.close.setText("×");
|
||||
s.close.setTextSize(15);
|
||||
s.close.setTextColor(gui.config.colors.text);
|
||||
s.close.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
s.close.setOnClickListener(new android.view.View.OnClickListener({
|
||||
onClick: function() {
|
||||
if(gui.player_panel.isShowing) {
|
||||
@@ -1757,7 +1789,7 @@ gui = {
|
||||
gui.player_panel._global_status.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_TOP);
|
||||
gui.player_panel._global_status.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
gui.player_panel._global_status.getLayoutParams().setMargins(0, 0, 0, dp * 1);
|
||||
gui.player_panel._global_status.setTextColor(gui.config.colors.sec_text);
|
||||
gui.player_panel._global_status.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
gui.player_panel._global_status.setTextSize(12);
|
||||
//gui.player_panel._global_status.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
s.control_panel.addView(gui.player_panel._global_status);
|
||||
@@ -1768,7 +1800,7 @@ gui = {
|
||||
gui.player_panel._global_cnote.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 14);
|
||||
gui.player_panel._global_cnote.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
gui.player_panel._global_cnote.getLayoutParams().setMargins(0, dp * 1, 0, 0);
|
||||
gui.player_panel._global_cnote.setTextColor(gui.config.colors.sec_text);
|
||||
gui.player_panel._global_cnote.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
gui.player_panel._global_cnote.setTextSize(12);
|
||||
//gui.player_panel._global_cnote.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
s.control_panel.addView(gui.player_panel._global_cnote);
|
||||
@@ -2028,9 +2060,10 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
o.setText(msg);
|
||||
}
|
||||
});
|
||||
config.updateBitmapTheme();
|
||||
gui.addViewMaker("sheetInfo", function(item) {
|
||||
var scr = new android.widget.ScrollView(ctx);
|
||||
scr.setBackgroundColor(gui.config.colors.background);
|
||||
scr.setBackgroundColor(gui.config.colors[config.values.theme].background);
|
||||
var layout = new android.widget.LinearLayout(ctx);
|
||||
layout.setLayoutParams(new android.widget.FrameLayout.LayoutParams(-2, -2));
|
||||
layout.setOrientation(android.widget.LinearLayout.VERTICAL);
|
||||
@@ -2040,7 +2073,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
title.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
title.setPadding(0, 0, 0, 10 * dp);
|
||||
title.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
title.setTextColor(gui.config.colors.text);
|
||||
title.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
title.setTextSize(20);
|
||||
title.getLayoutParams().setMargins(0, 0, 0, 7.5 * dp);
|
||||
layout.addView(title);
|
||||
@@ -2061,7 +2094,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
authorText.getLayoutParams().addRule(android.widget.RelativeLayout.RIGHT_OF, 10);
|
||||
authorText.setPadding(0, 0, 0, 0);
|
||||
authorText.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
authorText.setTextColor(gui.config.colors.text);
|
||||
authorText.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
authorText.setTextSize(16);
|
||||
authorText.getLayoutParams().setMargins(dp * 7.5, 0, 0, dp * 5);
|
||||
var noteImg = new android.widget.ImageView(ctx);
|
||||
@@ -2080,7 +2113,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
noteText.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 11);
|
||||
noteText.setPadding(0, 0, 0, 0);
|
||||
noteText.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
noteText.setTextColor(gui.config.colors.text);
|
||||
noteText.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
noteText.setTextSize(16);
|
||||
noteText.getLayoutParams().setMargins(dp * 7.5, dp * 5, 0, dp * 5);
|
||||
var pitchImg = new android.widget.ImageView(ctx);
|
||||
@@ -2117,7 +2150,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
pitchText.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 13);
|
||||
pitchText.setPadding(0, 0, 0, 0);
|
||||
pitchText.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
pitchText.setTextColor(gui.config.colors.text);
|
||||
pitchText.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
pitchText.setTextSize(16);
|
||||
pitchText.getLayoutParams().setMargins(dp * 7.5, dp * 5, 0, dp * 5);
|
||||
infoLayout.addView(authorImg);
|
||||
@@ -2152,7 +2185,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
timeText.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 15);
|
||||
timeText.setPadding(0, 0, 0, 0);
|
||||
timeText.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
timeText.setTextColor(gui.config.colors.text);
|
||||
timeText.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
timeText.setTextSize(16);
|
||||
timeText.getLayoutParams().setMargins(dp * 7.5, dp * 5, 0, 0);
|
||||
infoLayout.addView(timeImg);
|
||||
@@ -2165,7 +2198,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
sugPrompt.setText("建议弹奏地点:");
|
||||
sugPrompt.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
sugPrompt.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
sugPrompt.setTextColor(gui.config.colors.text);
|
||||
sugPrompt.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
sugPrompt.setTextSize(16);
|
||||
sugPrompt.getLayoutParams().setMargins(0, 5 * dp, 0, 5 * dp);
|
||||
layout.addView(sugPrompt);
|
||||
@@ -2180,20 +2213,110 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
}()));
|
||||
sug.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
sug.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
sug.setTextColor(gui.config.colors.sec_text);
|
||||
sug.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
sug.setTextSize(15);
|
||||
sug.getLayoutParams().setMargins(7 * dp, 5 * dp, 0, 0);
|
||||
sug.getLayoutParams().setMargins(7 * dp, 5 * dp, 0, 7 * dp);
|
||||
layout.addView(sug);
|
||||
if(item.social) {
|
||||
var colorPicker = function(platform) {
|
||||
switch(platform) {
|
||||
case "coolapk": return "#11B566";
|
||||
case "twitter": return "#1DA1F2";
|
||||
case "douyin": return (function(){
|
||||
if(config.values.theme == "light") {
|
||||
return "#1F0B1A";
|
||||
} else {
|
||||
return "#FFFFFF";
|
||||
}
|
||||
}());
|
||||
case "github": return (function(){
|
||||
if(config.values.theme == "light") {
|
||||
return "#24292E";
|
||||
} else {
|
||||
return "#FFFFFF";
|
||||
}
|
||||
}());
|
||||
case "bilibili": return "#FB7299";
|
||||
}
|
||||
}
|
||||
var filterBitmap = function(bitmap, replacedColor) {
|
||||
var rBitmap = android.graphics.Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), android.graphics.Bitmap.Config.ARGB_8888);
|
||||
var canvas = new android.graphics.Canvas(rBitmap);
|
||||
var paint = new android.graphics.Paint();
|
||||
var rect = new android.graphics.Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
|
||||
paint.setAntiAlias(true);
|
||||
canvas.drawARGB(0, 0, 0, 0);
|
||||
paint.setColorFilter(new android.graphics.PorterDuffColorFilter(replacedColor, android.graphics.PorterDuff.Mode.SRC_IN));
|
||||
canvas.drawBitmap(bitmap, rect, rect, paint);
|
||||
return rBitmap;
|
||||
};
|
||||
var socialPrompt = new android.widget.TextView(ctx);
|
||||
socialPrompt.setText("查看作者:");
|
||||
socialPrompt.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
socialPrompt.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
socialPrompt.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
socialPrompt.setTextSize(16);
|
||||
socialPrompt.getLayoutParams().setMargins(0, 5 * dp, 0, 5 * dp);
|
||||
layout.addView(socialPrompt);
|
||||
var socialLayout = new android.widget.LinearLayout(ctx);
|
||||
socialLayout.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||
socialLayout.setOrientation(android.widget.LinearLayout.HORIZONTAL);
|
||||
socialLayout.setGravity(android.view.Gravity.CENTER | android.view.Gravity.CENTER);
|
||||
socialLayout.getLayoutParams().setMargins(dp * 2, dp * 6, dp * 2, 0);
|
||||
socialLayout.setPadding(5 * dp, 5 * dp, 5 * dp, 5 * dp);
|
||||
socialLayout.measure(0, 0);
|
||||
if(item.social.length == 1) {
|
||||
var socialImage = new android.widget.ImageView(ctx);
|
||||
socialImage.setScaleType(android.widget.ImageView.ScaleType.CENTER_CROP);
|
||||
socialImage.setLayoutParams(new android.widget.LinearLayout.LayoutParams(dp * 34, dp * 34));
|
||||
socialImage.getLayoutParams().setMargins(0, 0, dp * 5, 0);
|
||||
socialImage.setImageBitmap(filterBitmap(config.bitmaps[item.social[0].platform], android.graphics.Color.parseColor(colorPicker(item.social[0].platform))));
|
||||
socialLayout.addView(socialImage);
|
||||
var socialPrompt1 = new android.widget.TextView(ctx);
|
||||
socialPrompt1.setText(android.text.Html.fromHtml(("在 <font color=" + colorPicker(item.social[0].platform) + ">" + item.social[0].name +"</font> 查看作者")));
|
||||
socialPrompt1.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, dp * 34));
|
||||
socialPrompt1.setGravity(android.view.Gravity.LEFT | android.view.Gravity.CENTER);
|
||||
socialPrompt1.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
socialPrompt1.setTextSize(14);
|
||||
socialLayout.addView(socialPrompt1);
|
||||
socialLayout.setBackgroundDrawable(gui.utils.ripple_drawable(socialLayout.getMeasuredWidth(), socialLayout.getMeasuredHeight(), "rect"));
|
||||
socialLayout.setOnClickListener(new android.view.View.OnClickListener({
|
||||
onClick: function() {
|
||||
app.openUrl(item.social[0].link);
|
||||
}
|
||||
}));
|
||||
} else {
|
||||
for(var i in item.social) {
|
||||
var socialImage = new android.widget.ImageView(ctx);
|
||||
socialImage.setId(i);
|
||||
socialImage.setScaleType(android.widget.ImageView.ScaleType.CENTER_CROP);
|
||||
socialImage.setLayoutParams(new android.widget.LinearLayout.LayoutParams(dp * 34, dp * 34));
|
||||
socialImage.getLayoutParams().setMargins(dp * 5, 0, dp * 5, 0);
|
||||
socialImage.setImageBitmap(filterBitmap(config.bitmaps[item.social[i].platform], android.graphics.Color.parseColor(colorPicker(item.social[i].platform))));
|
||||
socialImage.measure(0, 0);
|
||||
socialImage.setBackgroundDrawable(gui.utils.ripple_drawable(socialImage.getMeasuredWidth(), socialImage.getMeasuredHeight(), "rect"));
|
||||
socialImage.setOnClickListener(new android.view.View.OnClickListener({
|
||||
onClick: function(view) {
|
||||
print(view.getId())
|
||||
app.openUrl(item.social[view.getId()].link);
|
||||
}
|
||||
}));
|
||||
socialLayout.addView(socialImage);
|
||||
}
|
||||
}
|
||||
layout.addView(socialLayout);
|
||||
}
|
||||
scr.addView(layout);
|
||||
|
||||
return scr;
|
||||
});
|
||||
gui.main.addPage({
|
||||
index: 0,
|
||||
title: "本地乐谱",
|
||||
navigation_title: "本地乐谱",
|
||||
navigation_icon: config.bitmaps.local,
|
||||
navigation_icon: "local",
|
||||
func: [{
|
||||
icon: android.graphics.Bitmap.createBitmap(config.bitmaps.refresh),
|
||||
icon: "refresh",
|
||||
onClick: function(s, selfContent) {
|
||||
selfContent.getSheetList(s, true);
|
||||
},
|
||||
@@ -2226,7 +2349,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_upload.getLayoutParams().addRule(android.widget.RelativeLayout.CENTER_VERTICAL);
|
||||
element.v_upload.getLayoutParams().addRule(android.widget.RelativeLayout.RIGHT_OF, 10);
|
||||
element.v_upload.setTextSize(13);
|
||||
element.v_upload.setTextColor(gui.config.colors.sec_text);
|
||||
element.v_upload.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
element.v_upload.setText(element.title);
|
||||
element.v_relative.addView(element.v_upload);
|
||||
return element.v_relative;
|
||||
@@ -2240,7 +2363,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_title.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
if(element.failed) element.v_title.getLayoutParams().addRule(android.widget.RelativeLayout.CENTER_VERTICAL);
|
||||
element.v_title.setTextSize(16);
|
||||
element.v_title.setTextColor(element.failed ? gui.config.colors.sec_text : gui.config.colors.text);
|
||||
element.v_title.setTextColor(element.failed ? gui.config.colors[config.values.theme].sec_text : gui.config.colors[config.values.theme].text);
|
||||
element.v_title.setText(element.failed ? android.text.Html.fromHtml("<s>" + element.fileName + "</s>") : element.name);
|
||||
element.v_relative.addView(element.v_title);
|
||||
|
||||
@@ -2252,7 +2375,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_author.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 10);
|
||||
element.v_author.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
element.v_author.setTextSize(14);
|
||||
element.v_author.setTextColor(gui.config.colors.sec_text);
|
||||
element.v_author.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
element.v_author.setText("键数: " + element.songNotes.length + " - BPM: " + element.bpm);
|
||||
element.v_relative.addView(element.v_author);
|
||||
|
||||
@@ -2412,9 +2535,10 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
canExit: true,
|
||||
buttons: ["确认"]
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
gui.dialogs.showDialog(gui.getViewMaker("sheetInfo")(item), -2, -2, null, true);
|
||||
}
|
||||
gui.dialogs.showDialog(gui.getViewMaker("sheetInfo")(item), -2, -2, null, true);
|
||||
|
||||
}
|
||||
}));
|
||||
s.ns0_listView.setOnItemLongClickListener(new android.widget.AdapterView.OnItemLongClickListener({
|
||||
@@ -2449,7 +2573,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
s.ns0_progress.setPadding(0, 0, 0, 0);
|
||||
s.ns0_progress.getLayoutParams().setMargins(0, 0, 0, 0);
|
||||
s.ns0_progress.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_BOTTOM);
|
||||
s.ns0_progress.setProgressDrawable(new android.graphics.drawable.ColorDrawable(gui.config.colors.background));
|
||||
s.ns0_progress.setProgressDrawable(new android.graphics.drawable.ColorDrawable(gui.config.colors[config.values.theme].background));
|
||||
s.ns0_progress.setIndeterminate(true);
|
||||
s.ns0_progress.setAlpha(0);
|
||||
|
||||
@@ -2519,9 +2643,9 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
index: 1,
|
||||
title: "共享乐谱",
|
||||
navigation_title: "共享乐谱",
|
||||
navigation_icon: config.bitmaps.online,
|
||||
navigation_icon: "online",
|
||||
func: [{
|
||||
icon: android.graphics.Bitmap.createBitmap(config.bitmaps.refresh),
|
||||
icon: "refresh",
|
||||
onClick: function(s, selfContent) {
|
||||
if(s.ns1_isShowingSearchEditTextView) selfContent.removeSearchEditTextView(s, selfContent);
|
||||
selfContent.getOnlineSheetList(s, true);
|
||||
@@ -2532,7 +2656,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
toast("Click filter")
|
||||
},
|
||||
},*/ {
|
||||
icon: android.graphics.Bitmap.createBitmap(config.bitmaps.search),
|
||||
icon: "search",
|
||||
onClick: function(s, selfContent) {
|
||||
if(s.ns1_isShowingSearchEditTextView) {
|
||||
selfContent.removeSearchEditTextView(s, selfContent);
|
||||
@@ -2575,7 +2699,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_upload.getLayoutParams().addRule(android.widget.RelativeLayout.CENTER_VERTICAL);
|
||||
element.v_upload.getLayoutParams().addRule(android.widget.RelativeLayout.RIGHT_OF, 10);
|
||||
element.v_upload.setTextSize(13);
|
||||
element.v_upload.setTextColor(gui.config.colors.sec_text);
|
||||
element.v_upload.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
element.v_upload.setText(element.title);
|
||||
element.v_relative.addView(element.v_upload);
|
||||
};break;
|
||||
@@ -2591,7 +2715,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_title.getLayoutParams().setMargins(dp * 15, dp * 15, dp * 15, dp * 1);
|
||||
element.v_title.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
element.v_title.setTextSize(16);
|
||||
element.v_title.setTextColor(gui.config.colors.text);
|
||||
element.v_title.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
element.v_title.setText(element.name);
|
||||
element.v_relative.addView(element.v_title);
|
||||
|
||||
@@ -2602,7 +2726,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_info.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 10);
|
||||
element.v_info.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
element.v_info.setTextSize(15);
|
||||
element.v_info.setTextColor(gui.config.colors.text);
|
||||
element.v_info.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
element.v_info.setText(element.author);
|
||||
element.v_relative.addView(element.v_info);
|
||||
|
||||
@@ -2613,7 +2737,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_desc.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 11);
|
||||
element.v_desc.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
element.v_desc.setTextSize(13);
|
||||
element.v_desc.setTextColor(gui.config.colors.sec_text);
|
||||
element.v_desc.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
element.v_desc.setText(android.text.Html.fromHtml(element.desc.replace(new RegExp("\x0a", "gi"), "<br>")));
|
||||
element.v_relative.addView(element.v_desc);
|
||||
|
||||
@@ -2698,7 +2822,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_status.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
element.v_status.setTextSize(13);
|
||||
element.v_status.setAlpha(0);
|
||||
element.v_status.setTextColor(gui.config.colors.text);
|
||||
element.v_status.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
|
||||
element.v_progress = new android.widget.ProgressBar(ctx, null, android.R.attr.progressBarStyleHorizontal);
|
||||
element.v_progress.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-1, dp * 15));
|
||||
@@ -2706,7 +2830,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_progress.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 13);
|
||||
element.v_progress.getLayoutParams().setMargins(dp * 15, 0, dp * 15, dp * 5);
|
||||
element.v_progress.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_BOTTOM);
|
||||
element.v_progress.setProgressDrawable(new android.graphics.drawable.ColorDrawable(gui.config.colors.background));
|
||||
element.v_progress.setProgressDrawable(new android.graphics.drawable.ColorDrawable(gui.config.colors[config.values.theme].background));
|
||||
element.v_progress.setIndeterminate(false);
|
||||
element.v_progress.setAlpha(0);
|
||||
};break;
|
||||
@@ -2787,7 +2911,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
s.ns1_progress.setPadding(0, 0, 0, 0);
|
||||
s.ns1_progress.getLayoutParams().setMargins(0, 0, 0, 0);
|
||||
s.ns1_progress.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_BOTTOM);
|
||||
s.ns1_progress.setProgressDrawable(new android.graphics.drawable.ColorDrawable(gui.config.colors.background));
|
||||
s.ns1_progress.setProgressDrawable(new android.graphics.drawable.ColorDrawable(gui.config.colors[config.values.theme].background));
|
||||
s.ns1_progress.setIndeterminate(true);
|
||||
s.ns1_progress.setAlpha(0);
|
||||
|
||||
@@ -2808,8 +2932,8 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
s.ns1_searchEditText.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
s.ns1_searchEditText.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
s.ns1_searchEditText.setTextSize(15);
|
||||
s.ns1_searchEditText.setTextColor(gui.config.colors.text);
|
||||
s.ns1_searchEditText.setHintTextColor(gui.config.colors.sec_text);
|
||||
s.ns1_searchEditText.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
s.ns1_searchEditText.setHintTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
s.ns1_searchEditText.setHint("按回车开始搜索");
|
||||
s.ns1_searchEditText.setAlpha(0);
|
||||
s.ns1_searchEditText.setOnClickListener(new android.view.View.OnClickListener({
|
||||
@@ -2924,7 +3048,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
index: 2,
|
||||
title: "设置",
|
||||
navigation_title: "设置",
|
||||
navigation_icon: config.bitmaps.settings,
|
||||
navigation_icon: "settings",
|
||||
view: function(s) {
|
||||
s.ns2_listView = new android.widget.ListView(ctx);
|
||||
s.ns2_listView.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-1, s._content_height));
|
||||
@@ -2972,6 +3096,24 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
onClick: function(checked) {
|
||||
config.values.tipOnAndroidR = config.save("tip_storage_on_android_r", checked);
|
||||
}
|
||||
}, {
|
||||
type: "default",
|
||||
name: "设置主题色",
|
||||
onClick: function(v) {
|
||||
gui.dialogs.showOperateDialog([{
|
||||
text: "亮色"
|
||||
}, {
|
||||
text: "暗色"
|
||||
}], function(pos) {
|
||||
config.values.theme = config.save("theme", pos == 1 ? "dark" : "light");
|
||||
config.updateBitmapTheme();
|
||||
gui.main.__internal_dismiss();
|
||||
var handler = new android.os.Handler();
|
||||
handler.postDelayed(function (){
|
||||
gui.main.show(gui.main.current);
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
type: "tag",
|
||||
name: "关于",
|
||||
@@ -3001,6 +3143,21 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
});
|
||||
});
|
||||
},
|
||||
}, {
|
||||
type: "default",
|
||||
name: "查看更新日志",
|
||||
onClick: function(v) {
|
||||
threads.start(function() {
|
||||
config.fetchRepoFile("update_log.txt", null, function(body) {
|
||||
gui.dialogs.showConfirmDialog({
|
||||
title: "更新日志",
|
||||
text: body.string(),
|
||||
canExit: true,
|
||||
buttons: ["确认"],
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
}, {
|
||||
type: "default",
|
||||
name: "结束脚本运行",
|
||||
@@ -3030,7 +3187,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_title.getLayoutParams().setMargins(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||
element.v_title.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
element.v_title.setTextSize(12);
|
||||
element.v_title.setTextColor(gui.config.colors.sec_text);
|
||||
element.v_title.setTextColor(gui.config.colors[config.values.theme].sec_text);
|
||||
element.v_title.setText(element.name);
|
||||
element.v_relative.addView(element.v_title);
|
||||
break;
|
||||
@@ -3041,7 +3198,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
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.setTextSize(14);
|
||||
element.v_title.setTextColor(gui.config.colors.text);
|
||||
element.v_title.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
element.v_title.setText(element.name);
|
||||
element.v_relative.addView(element.v_title);
|
||||
break;
|
||||
@@ -3053,7 +3210,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
||||
element.v_title.getLayoutParams().addRule(android.widget.RelativeLayout.ALIGN_PARENT_LEFT);
|
||||
element.v_title.getLayoutParams().addRule(android.widget.RelativeLayout.CENTER_VERTICAL);
|
||||
element.v_title.setTextSize(14);
|
||||
element.v_title.setTextColor(gui.config.colors.text);
|
||||
element.v_title.setTextColor(gui.config.colors[config.values.theme].text);
|
||||
element.v_title.setText(element.name);
|
||||
element.v_relative.addView(element.v_title);
|
||||
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
"ui";
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
SkyAutoPlayer (Auto.js script)
|
||||
Copyright © 2020 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
|
||||
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
|
||||
*/
|
||||
|
||||
var emitter = events.emitter(threads.currentThread());
|
||||
threads.start(function() {
|
||||
emitter.emit("evaluate", (function(){
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
版本: 19
|
||||
更新时间: 2020.11.19 21:25
|
||||
更新内容:
|
||||
* 修复:自然弹奏完成后再次点击播放按钮不会重新开始
|
||||
* 新增:共享乐谱的详细界面添加作者社交链接跳转
|
||||
|
||||
版本: 18
|
||||
更新时间: 2020.10.04 10:30
|
||||
更新内容:
|
||||
* 修复:修复了版本8遗留的文件编码问题
|
||||
(这个BUG导致SkyStudio打开下载的共享乐谱或者设置键位后的本地乐谱闪退)
|
||||
(如何修复已经会导致闪退的乐谱: )
|
||||
(对于下载的共享乐谱: 删除并重新下载)
|
||||
(对于已设置键位的本地乐谱: ① 使用MT管理器或其他文件管理器打开有问题的乐谱)
|
||||
(② 指定UTF-16LE编码重新加载)
|
||||
(③ 复制内容,新建一个文件并粘贴内容)
|
||||
(④ 指定UTF-16LE编码保存文件)
|
||||
|
||||
版本: 17
|
||||
更新时间: 2020.10.02 14:30
|
||||
更新内容:
|
||||
* 新增:亮暗色主题切换
|
||||
|
||||
版本: 16
|
||||
更新时间: 2020.10.02 12:50
|
||||
更新内容:
|
||||
|
||||
Reference in new issue
Block a user