Update version 10
This commit is contained in:
@@ -101,7 +101,7 @@ sheetmgr = {
|
|||||||
}()));
|
}()));
|
||||||
writable.close();
|
writable.close();
|
||||||
parsed = eval(parsed)[0];
|
parsed = eval(parsed)[0];
|
||||||
parsed.songNotes = sheetmgr.parseSongNote(parsed.songNotes);
|
//parsed.songNotes = sheetmgr.parseSongNote(parsed.songNotes);
|
||||||
parsed.fileName = sheet;
|
parsed.fileName = sheet;
|
||||||
sheetmgr.cachedLocalSheetList.push(parsed);
|
sheetmgr.cachedLocalSheetList.push(parsed);
|
||||||
listener({status:3});
|
listener({status:3});
|
||||||
@@ -114,21 +114,21 @@ sheetmgr = {
|
|||||||
var sheets = files.listDir(this.rootDir, function(name){return name.endsWith(".txt");});
|
var sheets = files.listDir(this.rootDir, function(name){return name.endsWith(".txt");});
|
||||||
this.cachedLocalSheetList.length = 0;
|
this.cachedLocalSheetList.length = 0;
|
||||||
for(var i in sheets) {
|
for(var i in sheets) {
|
||||||
if(listener != null) listener(i);
|
|
||||||
var readable = files.open(files.join(this.rootDir, sheets[i]), "r", this.encoding);
|
var readable = files.open(files.join(this.rootDir, sheets[i]), "r", this.encoding);
|
||||||
var parsed = eval(readable.read())[0];
|
var parsed = eval(readable.read())[0];
|
||||||
readable.close();
|
readable.close();
|
||||||
parsed.songNotes = this.parseSongNote(parsed.songNotes);
|
//parsed.songNotes = this.parseSongNote(parsed.songNotes);
|
||||||
parsed.fileName = sheets[i];
|
parsed.fileName = sheets[i];
|
||||||
this.cachedLocalSheetList.push(parsed);
|
this.cachedLocalSheetList.push(parsed);
|
||||||
|
if(listener != null) listener(i);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
__internal_fetchOnlineSharedSheets: function() {
|
__internal_fetchOnlineSharedSheets: function() {
|
||||||
config.fetchRepoFile("shared_sheets.json", config.values.gitVersion, function(body) {
|
config.fetchRepoFile("shared_sheets.json", config.values.gitVersion, function(body) {
|
||||||
sheetmgr.cachedOnlineSharedSheetInfoList = body.json().sheets;
|
sheetmgr.cachedOnlineSharedSheetInfoList = body.json().sheets;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
//解析乐谱是耗时操作
|
||||||
parseSongNote: function(raw) {
|
parseSongNote: function(raw) {
|
||||||
var r = [];
|
var r = [];
|
||||||
var t_time = 0;
|
var t_time = 0;
|
||||||
@@ -250,7 +250,7 @@ sheetplayer = {
|
|||||||
if(this.thread != null) this.stop();
|
if(this.thread != null) this.stop();
|
||||||
this.thread = null;
|
this.thread = null;
|
||||||
this.name = j.name;
|
this.name = j.name;
|
||||||
this.notes = j.songNotes;
|
this.notes = sheetmgr.parseSongNote(j.songNotes);
|
||||||
this.pitch = j.pitchLevel;
|
this.pitch = j.pitchLevel;
|
||||||
this.bpm = j.bpm;
|
this.bpm = j.bpm;
|
||||||
this.noteCount = j.songNotes.length;
|
this.noteCount = j.songNotes.length;
|
||||||
@@ -286,7 +286,7 @@ config = {
|
|||||||
skipOnlineUploadTip: false,
|
skipOnlineUploadTip: false,
|
||||||
skipOnlineSharedSheetCTip: false,
|
skipOnlineSharedSheetCTip: false,
|
||||||
skipImportLocalSheetTip: false,
|
skipImportLocalSheetTip: false,
|
||||||
currentVersion: 9,
|
currentVersion: 10,
|
||||||
gitVersion: "",
|
gitVersion: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -687,7 +687,7 @@ gui = {
|
|||||||
if (e.getAction() == e.ACTION_DOWN && canExit) {
|
if (e.getAction() == e.ACTION_DOWN && canExit) {
|
||||||
frame.setEnabled(false);
|
frame.setEnabled(false);
|
||||||
frame.setClickable(false);
|
frame.setClickable(false);
|
||||||
gui.utils.value_animation("Float", 1.0, 0, 75, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 1.0, 0, 75, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
frame.setAlpha(anim.getAnimatedValue());
|
frame.setAlpha(anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 0) {
|
if(anim.getAnimatedValue() == 0) {
|
||||||
if(onDismiss != null) onDismiss(frame);
|
if(onDismiss != null) onDismiss(frame);
|
||||||
@@ -705,7 +705,7 @@ gui = {
|
|||||||
layout.setLayoutParams(new android.widget.FrameLayout.LayoutParams(width, height, android.view.Gravity.CENTER));
|
layout.setLayoutParams(new android.widget.FrameLayout.LayoutParams(width, height, android.view.Gravity.CENTER));
|
||||||
layout.getLayoutParams().setMargins(20 * dp, 20 * dp, 20 * dp, 20 * dp);
|
layout.getLayoutParams().setMargins(20 * dp, 20 * dp, 20 * dp, 20 * dp);
|
||||||
frame.addView(layout);
|
frame.addView(layout);
|
||||||
gui.utils.value_animation("Float", 0, 1, 75, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 0, 1, 75, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
frame.setAlpha(anim.getAnimatedValue());
|
frame.setAlpha(anim.getAnimatedValue());
|
||||||
});
|
});
|
||||||
layout.setElevation(16 * dp);
|
layout.setElevation(16 * dp);
|
||||||
@@ -788,7 +788,7 @@ gui = {
|
|||||||
var o = this;
|
var o = this;
|
||||||
gui.run(function() {
|
gui.run(function() {
|
||||||
try {
|
try {
|
||||||
gui.utils.value_animation("Float", 1, 0, 75, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 1, 0, 75, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
o.popup.setAlpha(anim.getAnimatedValue());
|
o.popup.setAlpha(anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 1) gui.winMgr.removeView(o.popup);
|
if(anim.getAnimatedValue() == 1) gui.winMgr.removeView(o.popup);
|
||||||
});
|
});
|
||||||
@@ -928,7 +928,7 @@ gui = {
|
|||||||
list.setOnItemClickListener(new android.widget.AdapterView.OnItemClickListener({
|
list.setOnItemClickListener(new android.widget.AdapterView.OnItemClickListener({
|
||||||
onItemClick: function(parent, view, pos, id) {
|
onItemClick: function(parent, view, pos, id) {
|
||||||
try {
|
try {
|
||||||
if (callback && !callback(pos, s[pos])) gui.utils.value_animation("Float", 1, 0, 75, new android.view.animation.LinearInterpolator(), function(anim) {
|
if (callback && !callback(pos, s[pos])) gui.utils.value_animation("Float", 1, 0, 75, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
dialog.setAlpha(anim.getAnimatedValue());
|
dialog.setAlpha(anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 1) gui.winMgr.removeView(dialog);
|
if(anim.getAnimatedValue() == 1) gui.winMgr.removeView(dialog);
|
||||||
});
|
});
|
||||||
@@ -964,6 +964,7 @@ gui = {
|
|||||||
_global_title: null,
|
_global_title: null,
|
||||||
_global_navigation_bar: null,
|
_global_navigation_bar: null,
|
||||||
_global_close: null,
|
_global_close: null,
|
||||||
|
_glonal_func: null,
|
||||||
|
|
||||||
isShowing: false,
|
isShowing: false,
|
||||||
current_navigation_selection: NaN,
|
current_navigation_selection: NaN,
|
||||||
@@ -985,7 +986,10 @@ gui = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(j instanceof Object) gui.main.views.push(j);
|
if(j instanceof Object) {
|
||||||
|
j.func_clickable = true;
|
||||||
|
gui.main.views.push(j);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getPage: function(index) {
|
getPage: function(index) {
|
||||||
@@ -1026,6 +1030,18 @@ gui = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setFuncClickable: function(index, clickable) {
|
||||||
|
for(var i in gui.main.views) {
|
||||||
|
if(gui.main.views[i].index == index) {
|
||||||
|
gui.main.views[i].func_clickable = clickable;
|
||||||
|
if(gui.main.current == index && gui.main.isShowing) {
|
||||||
|
gui.main._glonal_func.setEnabled(clickable);
|
||||||
|
gui.main._glonal_func.setClickable(clickable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//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 = gui.main.current = content.index;
|
||||||
@@ -1088,14 +1104,14 @@ gui = {
|
|||||||
gui.suspension.show();
|
gui.suspension.show();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
s.func = new android.widget.ImageView(ctx);
|
gui.main._glonal_func = new android.widget.ImageView(ctx);
|
||||||
s.func.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(dp * gui.main.status_bar_height, dp * gui.main.status_bar_height));
|
gui.main._glonal_func.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(dp * gui.main.status_bar_height, dp * gui.main.status_bar_height));
|
||||||
s.func.setPadding(dp * 1, dp * 1, dp * 1, dp * 1);
|
gui.main._glonal_func.setPadding(dp * 1, dp * 1, dp * 1, dp * 1);
|
||||||
s.func.getLayoutParams().addRule(android.widget.RelativeLayout.LEFT_OF, 23);
|
gui.main._glonal_func.getLayoutParams().addRule(android.widget.RelativeLayout.LEFT_OF, 23);
|
||||||
s.func.measure(0, 0);
|
gui.main._glonal_func.measure(0, 0);
|
||||||
s.func.setBackgroundDrawable(gui.utils.ripple_drawable(s.func.getMeasuredWidth(), s.func.getMeasuredHeight(), "rect"));
|
gui.main._glonal_func.setBackgroundDrawable(gui.utils.ripple_drawable(gui.main._glonal_func.getMeasuredWidth(), gui.main._glonal_func.getMeasuredHeight(), "rect"));
|
||||||
s.func.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
gui.main._glonal_func.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||||
s.statusBar.addView(s.func);
|
s.statusBar.addView(gui.main._glonal_func);
|
||||||
s.statusBar.addView(gui.main._global_close);
|
s.statusBar.addView(gui.main._global_close);
|
||||||
|
|
||||||
gui.main._global_base.addView(s.statusBar);
|
gui.main._global_base.addView(s.statusBar);
|
||||||
@@ -1155,11 +1171,11 @@ gui = {
|
|||||||
|
|
||||||
gui.main.isShowing = true;
|
gui.main.isShowing = true;
|
||||||
|
|
||||||
gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
gui.main._global_base.setAlpha(anim.getAnimatedValue());
|
gui.main._global_base.setAlpha(anim.getAnimatedValue());
|
||||||
if(gui.main.views[s.index].update != null && anim.getAnimatedValue() == 1.0) gui.main.views[s.index].update(s);
|
if(gui.main.views[s.index].update != null && anim.getAnimatedValue() == 1.0) gui.main.views[s.index].update(s);
|
||||||
});
|
});
|
||||||
gui.utils.value_animation("Float", 0, 1.0, 400 , new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 0, 1.0, 400 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
gui.main._global_content_container.setAlpha(anim.getAnimatedValue());
|
gui.main._global_content_container.setAlpha(anim.getAnimatedValue());
|
||||||
gui.main._global_title.setAlpha(anim.getAnimatedValue());
|
gui.main._global_title.setAlpha(anim.getAnimatedValue());
|
||||||
});
|
});
|
||||||
@@ -1204,7 +1220,7 @@ gui = {
|
|||||||
if(gui.main.views[tid].update != null && anim.getAnimatedValue() == 1.0) gui.main.views[tid].update(s);
|
if(gui.main.views[tid].update != null && anim.getAnimatedValue() == 1.0) gui.main.views[tid].update(s);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.LinearInterpolator(), 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());
|
gui.main._global_title.setAlpha(anim.getAnimatedValue());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1215,42 +1231,44 @@ gui = {
|
|||||||
if(gui.main.func_showing) {
|
if(gui.main.func_showing) {
|
||||||
gui.main.func_showing = false;
|
gui.main.func_showing = false;
|
||||||
gui.utils.value_animation("Float", 0, 1, 300 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 0, 1, 300 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
s.func.setTranslationX(anim.getAnimatedValue() * s.func.getMeasuredWidth());
|
gui.main._glonal_func.setTranslationX(anim.getAnimatedValue() * gui.main._glonal_func.getMeasuredWidth());
|
||||||
s.func.setAlpha(1 - anim.getAnimatedValue());
|
gui.main._glonal_func.setAlpha(1 - anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 1.0) {
|
if(anim.getAnimatedValue() == 1.0) {
|
||||||
s.func.setClickable(false);
|
gui.main._glonal_func.setClickable(false);
|
||||||
s.func.setEnabled(false);
|
gui.main._glonal_func.setEnabled(false);
|
||||||
s.func.setOnClickListener(new android.view.View.OnClickListener({
|
gui.main._glonal_func.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function() {}
|
onClick: function() {}
|
||||||
}));
|
}));
|
||||||
s.func.setImageBitmap(android.graphics.Bitmap.createBitmap(1, 1, android.graphics.Bitmap.Config.ARGB_8888));
|
gui.main._glonal_func.setImageBitmap(android.graphics.Bitmap.createBitmap(1, 1, android.graphics.Bitmap.Config.ARGB_8888));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(gui.main.func_showing) {
|
if(gui.main.func_showing) {
|
||||||
s.func.setOnClickListener(new android.view.View.OnClickListener({
|
gui.main._glonal_func.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function() {gui.main.views[s.index].func(s)}
|
onClick: function() {gui.main.views[s.index].func(s)}
|
||||||
}));
|
}));
|
||||||
s.func.setImageBitmap(gui.main.views[s.index].func_icon);
|
gui.main._glonal_func.setImageBitmap(gui.main.views[s.index].func_icon);
|
||||||
gui.utils.value_animation("Float", 0, 1, 200 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 0, 1, 200 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
s.func.setAlpha(anim.getAnimatedValue());
|
gui.main._glonal_func.setAlpha(anim.getAnimatedValue());
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
gui.main.func_showing = true;
|
gui.main.func_showing = true;
|
||||||
s.func.setClickable(true);
|
gui.main._glonal_func.setClickable(true);
|
||||||
s.func.setEnabled(true);
|
gui.main._glonal_func.setEnabled(true);
|
||||||
s.func.setOnClickListener(new android.view.View.OnClickListener({
|
gui.main._glonal_func.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function() {gui.main.views[s.index].func(s)}
|
onClick: function() {gui.main.views[s.index].func(s)}
|
||||||
}));
|
}));
|
||||||
s.func.setImageBitmap(gui.main.views[s.index].func_icon);
|
gui.main._glonal_func.setImageBitmap(gui.main.views[s.index].func_icon);
|
||||||
gui.utils.value_animation("Float", 1, 0, 300 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 1, 0, 300 , new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
s.func.setTranslationX(anim.getAnimatedValue() * s.func.getMeasuredWidth());
|
gui.main._glonal_func.setTranslationX(anim.getAnimatedValue() * gui.main._glonal_func.getMeasuredWidth());
|
||||||
s.func.setAlpha(1 - anim.getAnimatedValue());
|
gui.main._glonal_func.setAlpha(1 - anim.getAnimatedValue());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gui.main.current_navigation_selection = s.index;
|
gui.main.current_navigation_selection = s.index;
|
||||||
|
gui.main._glonal_func.setClickable(content.func_clickable);
|
||||||
|
gui.main._glonal_func.setEnabled(content.func_clickable);
|
||||||
})},
|
})},
|
||||||
__internal_genNavigationList: function(s) { gui.run(function(){
|
__internal_genNavigationList: function(s) { gui.run(function(){
|
||||||
if(gui.main._global_navigation_bar == null) return;
|
if(gui.main._global_navigation_bar == null) return;
|
||||||
@@ -1325,7 +1343,7 @@ gui = {
|
|||||||
gui.main.isShowing = false;
|
gui.main.isShowing = false;
|
||||||
gui.main._global_close.setEnabled(false);
|
gui.main._global_close.setEnabled(false);
|
||||||
gui.main._global_close.setClickable(false);
|
gui.main._global_close.setClickable(false);
|
||||||
gui.utils.value_animation("Float", 1.0, 0, 200, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 1.0, 0, 200, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
gui.main._global_base.setAlpha(anim.getAnimatedValue());
|
gui.main._global_base.setAlpha(anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 0) {
|
if(anim.getAnimatedValue() == 0) {
|
||||||
gui.winMgr.removeView(gui.main._global_base);
|
gui.winMgr.removeView(gui.main._global_base);
|
||||||
@@ -1398,7 +1416,7 @@ gui = {
|
|||||||
dismiss: function() { gui.run(function(){
|
dismiss: function() { gui.run(function(){
|
||||||
if (gui.suspension.isShowing) {
|
if (gui.suspension.isShowing) {
|
||||||
gui.suspension.isShowing = false;
|
gui.suspension.isShowing = false;
|
||||||
gui.utils.value_animation("Float", 1.0, 0, 200, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 1.0, 0, 200, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
gui.suspension._global_base.setAlpha(anim.getAnimatedValue());
|
gui.suspension._global_base.setAlpha(anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 0) {
|
if(anim.getAnimatedValue() == 0) {
|
||||||
gui.winMgr.removeView(gui.suspension._global_base);
|
gui.winMgr.removeView(gui.suspension._global_base);
|
||||||
@@ -1423,8 +1441,6 @@ gui = {
|
|||||||
|
|
||||||
current_index: 0,
|
current_index: 0,
|
||||||
|
|
||||||
handler: new android.os.Handler(),
|
|
||||||
|
|
||||||
__internal_showTargetDots: function s() { gui.run(function(){
|
__internal_showTargetDots: function s() { gui.run(function(){
|
||||||
if(!gui.key_coordinate_navigation.isShowing) {
|
if(!gui.key_coordinate_navigation.isShowing) {
|
||||||
gui.key_coordinate_navigation._global_base = new android.widget.TextView(ctx);
|
gui.key_coordinate_navigation._global_base = new android.widget.TextView(ctx);
|
||||||
@@ -1558,7 +1574,7 @@ gui = {
|
|||||||
cx: null,
|
cx: null,
|
||||||
cy: null,
|
cy: null,
|
||||||
|
|
||||||
__internal_showPanel: function s() { gui.run(function(){
|
__internal_showPanel: function s(sheet) { gui.run(function(){
|
||||||
if(!gui.player_panel.isShowing) {
|
if(!gui.player_panel.isShowing) {
|
||||||
gui.player_panel._global_base = new android.widget.RelativeLayout(ctx);
|
gui.player_panel._global_base = new android.widget.RelativeLayout(ctx);
|
||||||
gui.player_panel._global_base.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
gui.player_panel._global_base.setLayoutParams(new android.widget.LinearLayout.LayoutParams(-2, -2));
|
||||||
@@ -1571,6 +1587,7 @@ gui = {
|
|||||||
gui.player_panel._global_text.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-2, -2));
|
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.text);
|
||||||
gui.player_panel._global_text.setTextSize(14);
|
gui.player_panel._global_text.setTextSize(14);
|
||||||
|
gui.player_panel._global_text.setText("解析中...");
|
||||||
//gui.player_panel._global_text.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
//gui.player_panel._global_text.setPadding(dp * 5, dp * 5, dp * 5, dp * 5);
|
||||||
gui.player_panel._global_text.getLayoutParams().setMargins(0, 0, 0, dp * 2);
|
gui.player_panel._global_text.getLayoutParams().setMargins(0, 0, 0, dp * 2);
|
||||||
gui.player_panel._global_text.setOnTouchListener(new android.view.View.OnTouchListener({
|
gui.player_panel._global_text.setOnTouchListener(new android.view.View.OnTouchListener({
|
||||||
@@ -1618,8 +1635,6 @@ gui = {
|
|||||||
|
|
||||||
gui.player_panel._global_seek = new android.widget.SeekBar(ctx);
|
gui.player_panel._global_seek = new android.widget.SeekBar(ctx);
|
||||||
gui.player_panel._global_seek.setId(13);
|
gui.player_panel._global_seek.setId(13);
|
||||||
gui.player_panel._global_seek.setMax(sheetplayer.noteCount);
|
|
||||||
gui.player_panel._global_seek.setMin(0);
|
|
||||||
gui.player_panel._global_seek.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-1, -2));
|
gui.player_panel._global_seek.setLayoutParams(new android.widget.RelativeLayout.LayoutParams(-1, -2));
|
||||||
gui.player_panel._global_seek.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 12);
|
gui.player_panel._global_seek.getLayoutParams().addRule(android.widget.RelativeLayout.BELOW, 12);
|
||||||
gui.player_panel._global_seek.getLayoutParams().setMargins(0, dp * 2, 0, dp * 2);
|
gui.player_panel._global_seek.getLayoutParams().setMargins(0, dp * 2, 0, dp * 2);
|
||||||
@@ -1630,6 +1645,8 @@ gui = {
|
|||||||
sheetplayer.setProgress(sb.getProgress());
|
sheetplayer.setProgress(sb.getProgress());
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
gui.player_panel._global_seek.setEnabled(false);
|
||||||
|
gui.player_panel._global_seek.setClickable(false);
|
||||||
gui.player_panel._global_base.addView(gui.player_panel._global_seek);
|
gui.player_panel._global_base.addView(gui.player_panel._global_seek);
|
||||||
|
|
||||||
|
|
||||||
@@ -1659,6 +1676,8 @@ gui = {
|
|||||||
sheetplayer.play(gui.player_panel.refreshStatus);
|
sheetplayer.play(gui.player_panel.refreshStatus);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
s.play.setEnabled(false);
|
||||||
|
s.play.setClickable(false);
|
||||||
s.control_panel.addView(s.play);
|
s.control_panel.addView(s.play);
|
||||||
|
|
||||||
s.pause = new android.widget.ImageView(ctx);
|
s.pause = new android.widget.ImageView(ctx);
|
||||||
@@ -1673,6 +1692,8 @@ gui = {
|
|||||||
sheetplayer.pause();
|
sheetplayer.pause();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
s.pause.setEnabled(false);
|
||||||
|
s.pause.setClickable(false);
|
||||||
s.control_panel.addView(s.pause);
|
s.control_panel.addView(s.pause);
|
||||||
|
|
||||||
gui.player_panel._global_cnote = new android.widget.TextView(ctx);
|
gui.player_panel._global_cnote = new android.widget.TextView(ctx);
|
||||||
@@ -1706,14 +1727,45 @@ gui = {
|
|||||||
gui.winMgr.updateViewLayout(gui.player_panel._global_base, s.lp);
|
gui.winMgr.updateViewLayout(gui.player_panel._global_base, s.lp);
|
||||||
gui.player_panel.isShowing = true;
|
gui.player_panel.isShowing = true;
|
||||||
|
|
||||||
gui.player_panel._global_text.setText(sheetplayer.name);
|
gui.player_panel.refreshStatus();
|
||||||
|
|
||||||
if(!config.values.skipOpenPlayerPanelWindowTip) {
|
if(!config.values.skipOpenPlayerPanelWindowTip) {
|
||||||
toast("拖动标题栏的标题文字来移动弹奏控制面板悬浮窗。");
|
toast("拖动标题栏的标题文字来移动弹奏控制面板悬浮窗。");
|
||||||
config.values.skipOpenPlayerPanelWindowTip = config.save("skip_open_player_panel_window_tip", true);
|
config.values.skipOpenPlayerPanelWindowTip = config.save("skip_open_player_panel_window_tip", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
gui.player_panel.refreshStatus();
|
threads.start(function() {
|
||||||
|
sheetplayer.setSheet(sheet);
|
||||||
|
gui.run(function() {
|
||||||
|
gui.player_panel._global_text.setText(sheetplayer.name);
|
||||||
|
gui.player_panel._global_seek.setMax(sheetplayer.noteCount);
|
||||||
|
gui.player_panel._global_seek.setMin(0);
|
||||||
|
s.play.setEnabled(true);
|
||||||
|
s.play.setClickable(true);
|
||||||
|
s.pause.setEnabled(true);
|
||||||
|
s.pause.setClickable(true);
|
||||||
|
gui.player_panel._global_seek.setEnabled(true);
|
||||||
|
gui.player_panel._global_seek.setClickable(true);
|
||||||
|
gui.player_panel.refreshStatus();
|
||||||
|
//一点都不优雅
|
||||||
|
var h = new android.os.Handler();
|
||||||
|
h.postDelayed(function() {
|
||||||
|
gui.utils.value_animation("Float", 0, 1, 200 , new android.view.animation.LinearInterpolator(), function(anim) {
|
||||||
|
gui.player_panel._global_text.setAlpha(anim.getAnimatedValue());
|
||||||
|
});
|
||||||
|
}, 0);
|
||||||
|
h.postDelayed(function() {
|
||||||
|
gui.utils.value_animation("Float", 0, 1, 200 , new android.view.animation.LinearInterpolator(), function(anim) {
|
||||||
|
gui.player_panel._global_seek.setAlpha(anim.getAnimatedValue());
|
||||||
|
});
|
||||||
|
}, 20);
|
||||||
|
h.postDelayed(function() {
|
||||||
|
gui.utils.value_animation("Float", 0, 1, 200 , new android.view.animation.LinearInterpolator(), function(anim) {
|
||||||
|
s.control_panel.setAlpha(anim.getAnimatedValue());
|
||||||
|
});
|
||||||
|
}, 40);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});},
|
});},
|
||||||
refreshStatus: function() { gui.run(function(){
|
refreshStatus: function() { gui.run(function(){
|
||||||
@@ -1869,9 +1921,8 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
element.v_play.setOnClickListener(new android.view.View.OnClickListener({
|
element.v_play.setOnClickListener(new android.view.View.OnClickListener({
|
||||||
onClick: function() {
|
onClick: function() {
|
||||||
if(config.values.key_coordinates.length == 15 && gui.main.isShowing) {
|
if(config.values.key_coordinates.length == 15 && gui.main.isShowing) {
|
||||||
sheetplayer.setSheet(element);
|
|
||||||
gui.main.__internal_dismiss();
|
gui.main.__internal_dismiss();
|
||||||
gui.player_panel.__internal_showPanel();
|
gui.player_panel.__internal_showPanel(element);
|
||||||
} else {
|
} else {
|
||||||
toast("未设置键位坐标或坐标数据错误,请前往设置页设置键位坐标");
|
toast("未设置键位坐标或坐标数据错误,请前往设置页设置键位坐标");
|
||||||
}
|
}
|
||||||
@@ -2021,13 +2072,13 @@ 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) {
|
getSheetList: function(s, isForce) {
|
||||||
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.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.main.setFuncClickable(s.index, false);
|
||||||
|
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) {
|
||||||
@@ -2047,9 +2098,12 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
gui.main._global_title.setText("加载中: 共" + i + "首乐谱");
|
gui.main._global_title.setText("加载中: 共" + i + "首乐谱");
|
||||||
});
|
});
|
||||||
}).map(function(e, i) {
|
}).map(function(e, i) {
|
||||||
s.ns0_listAdapterController.add(e);
|
gui.run(function(){
|
||||||
|
s.ns0_listAdapterController.add(e);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
gui.run(function() {
|
gui.run(function() {
|
||||||
|
gui.main.setFuncClickable(s.index, true);
|
||||||
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) {
|
||||||
@@ -2166,7 +2220,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
element.isShowingStatusBar = true;
|
element.isShowingStatusBar = true;
|
||||||
element.v_progress.setIndeterminate(true);
|
element.v_progress.setIndeterminate(true);
|
||||||
element.v_desc.getLayoutParams().setMargins(dp * 15, dp * 2, dp * 15, dp * 1);
|
element.v_desc.getLayoutParams().setMargins(dp * 15, dp * 2, dp * 15, dp * 1);
|
||||||
gui.utils.value_animation("Float", 0, 1.0, 150, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 0, 1.0, 150, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
element.v_progress.setAlpha(anim.getAnimatedValue());
|
element.v_progress.setAlpha(anim.getAnimatedValue());
|
||||||
element.v_status.setAlpha(anim.getAnimatedValue());
|
element.v_status.setAlpha(anim.getAnimatedValue());
|
||||||
});
|
});
|
||||||
@@ -2182,7 +2236,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
case 3: {
|
case 3: {
|
||||||
if(gui.main.isShowing) { gui.run(function() {
|
if(gui.main.isShowing) { gui.run(function() {
|
||||||
toast("下载完成: " + element.name + "\n请在本地曲谱页面刷新");
|
toast("下载完成: " + element.name + "\n请在本地曲谱页面刷新");
|
||||||
gui.utils.value_animation("Float", 1, 0, 150, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 1, 0, 150, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
element.v_progress.setAlpha(anim.getAnimatedValue());
|
element.v_progress.setAlpha(anim.getAnimatedValue());
|
||||||
element.v_status.setAlpha(anim.getAnimatedValue());
|
element.v_status.setAlpha(anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 0) {
|
if(anim.getAnimatedValue() == 0) {
|
||||||
@@ -2198,7 +2252,7 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
case -1: {
|
case -1: {
|
||||||
if(gui.main.isShowing) { gui.run(function() {
|
if(gui.main.isShowing) { gui.run(function() {
|
||||||
toast("下载" + element.name + "失败: " + r.msg);
|
toast("下载" + element.name + "失败: " + r.msg);
|
||||||
gui.utils.value_animation("Float", 1, 0, 150, new android.view.animation.LinearInterpolator(), function(anim) {
|
gui.utils.value_animation("Float", 1, 0, 150, new android.view.animation.DecelerateInterpolator(), function(anim) {
|
||||||
element.v_progress.setAlpha(anim.getAnimatedValue());
|
element.v_progress.setAlpha(anim.getAnimatedValue());
|
||||||
element.v_status.setAlpha(anim.getAnimatedValue());
|
element.v_status.setAlpha(anim.getAnimatedValue());
|
||||||
if(anim.getAnimatedValue() == 0) {
|
if(anim.getAnimatedValue() == 0) {
|
||||||
@@ -2343,7 +2397,6 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
"<br><br>" +
|
"<br><br>" +
|
||||||
"<font color=#FFFFFF>简介: </font><br><font color=#7B7B7B>" +
|
"<font color=#FFFFFF>简介: </font><br><font color=#7B7B7B>" +
|
||||||
item.desc.replace(new RegExp("\x0a", "gi"), "<br>")
|
item.desc.replace(new RegExp("\x0a", "gi"), "<br>")
|
||||||
|
|
||||||
+ "</font>"
|
+ "</font>"
|
||||||
));
|
));
|
||||||
text.setPadding(0, 0, 0, 10 * dp);
|
text.setPadding(0, 0, 0, 10 * dp);
|
||||||
@@ -2376,10 +2429,11 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
},
|
},
|
||||||
getOnlineSheetList: function(s, isForce) {
|
getOnlineSheetList: function(s, isForce) {
|
||||||
gui.run(function() {
|
gui.run(function() {
|
||||||
|
gui.main.setFuncClickable(s.index, false);
|
||||||
s.ns1_progress.setIndeterminate(true);
|
s.ns1_progress.setIndeterminate(true);
|
||||||
s.ns1_listAdapterController.removeAll();
|
s.ns1_listAdapterController.removeAll();
|
||||||
s.ns1_listAdapterController.notifyChange();
|
s.ns1_listAdapterController.notifyChange();
|
||||||
gui.utils.value_animation("Float", 0, 1.0, 200, new android.view.animation.LinearInterpolator(), 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());
|
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) {
|
||||||
@@ -2401,9 +2455,10 @@ gui.dialogs.showProgressDialog(function(o) {
|
|||||||
gui.main._global_title.setText("获取列表中...");
|
gui.main._global_title.setText("获取列表中...");
|
||||||
threads.start(function() {
|
threads.start(function() {
|
||||||
sheetmgr.getOnlineSharedSheetInfoList(isForce).map(function(e, i) {
|
sheetmgr.getOnlineSharedSheetInfoList(isForce).map(function(e, i) {
|
||||||
s.ns1_listAdapterController.add(e);
|
gui.run(function() { s.ns1_listAdapterController.add(e); });
|
||||||
});
|
});
|
||||||
gui.run(function() {
|
gui.run(function() {
|
||||||
|
gui.main.setFuncClickable(s.index, true);
|
||||||
s.ns1_listAdapterController.notifyChange();
|
s.ns1_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) {
|
||||||
|
|||||||
@@ -1,51 +1,57 @@
|
|||||||
|
版本: 9
|
||||||
|
更新时间: 2020.08.01 16:25
|
||||||
|
更新内容:
|
||||||
|
* 更改:乐谱解析工作移至弹奏控制界面
|
||||||
|
* 新增:导入本地乐谱提示
|
||||||
|
* 修复:ListAdapter未收到列表更新通知
|
||||||
|
|
||||||
版本: 9
|
版本: 9
|
||||||
更新时间: 2020.07.30 10:21
|
更新时间: 2020.07.30 10:21
|
||||||
更新内容:
|
更新内容:
|
||||||
* 修复了连按两次悬浮窗按钮导致进入主界面时不会加载曲谱的问题
|
* 修复:连按两次悬浮窗按钮导致进入主界面时不会加载曲谱的问题
|
||||||
* 更改文件下载逻辑
|
* 更改:文件下载逻辑
|
||||||
|
|
||||||
版本: 8
|
版本: 8
|
||||||
更新时间: 2020.07.29 23:20
|
更新时间: 2020.07.29 23:20
|
||||||
更新内容:
|
更新内容:
|
||||||
* 更改悬浮窗按钮从"小黑块"变为类Sky的"凹面钻石"形状
|
* 更改:悬浮窗按钮从"小黑块"变为类Sky的"凹面钻石"形状
|
||||||
* 从悬浮窗打开主窗口时会继承上次关闭主窗口时页面位置
|
* 新增:从悬浮窗打开主窗口时会继承上次关闭主窗口时页面位置
|
||||||
* 更改了乐谱下载逻辑
|
* 更改:乐谱下载逻辑
|
||||||
* 修复打开主窗口时动画卡顿
|
* 修复:打开主窗口时动画卡顿
|
||||||
! 已知问题: 乐谱保存为UTF-8格式而非UTF-16LE且files.open(file, mode, encoding)无法更改
|
! 已知问题: 乐谱保存为UTF-8格式而非UTF-16LE且files.open(file, mode, encoding)无法更改
|
||||||
|
|
||||||
版本: 7
|
版本: 7
|
||||||
更新时间: 2020.07.26 20:07
|
更新时间: 2020.07.26 20:07
|
||||||
更新内容:
|
更新内容:
|
||||||
* 现在弹奏控制面板可以移动位置
|
* 新增:现在弹奏控制面板可以移动位置
|
||||||
* 增加悬浮窗首次显示时的提示
|
* 新增:悬浮窗首次显示时的提示
|
||||||
* 设置中增加"结束脚本运行"选项
|
* 新增:设置中增加"结束脚本运行"选项
|
||||||
|
|
||||||
|
|
||||||
版本: 6
|
版本: 6
|
||||||
更新时间: 2020.07.25 18:47
|
更新时间: 2020.07.25 18:47
|
||||||
更新内容:
|
更新内容:
|
||||||
* 修复: 当SkyStudio Sheets文件夹不存在时无法下载在线共享乐谱的问题
|
* 修复:当SkyStudio Sheets文件夹不存在时无法下载在线共享乐谱的问题
|
||||||
|
|
||||||
版本: 5
|
版本: 5
|
||||||
更新时间: 2020.07.24 13:00
|
更新时间: 2020.07.24 13:00
|
||||||
更新内容:
|
更新内容:
|
||||||
* 修复了乐谱最后一个键不弹的问题
|
* 修复:乐谱最后一个键不弹的问题
|
||||||
* 增加了启动提示
|
* 新增:启动提示
|
||||||
|
|
||||||
版本: 4
|
版本: 4
|
||||||
更新时间: 2020.07.23 11:41
|
更新时间: 2020.07.23 11:41
|
||||||
更新内容:
|
更新内容:
|
||||||
* 使用gestures代替click以解决漏按问题
|
* 更改:使用gestures代替click以解决漏按问题
|
||||||
|
|
||||||
版本: 3
|
版本: 3
|
||||||
更新时间: 2020.07.23 09:30
|
更新时间: 2020.07.23 09:30
|
||||||
更新内容:
|
更新内容:
|
||||||
* 启用"在线共享乐谱"功能
|
* 新增:启用"在线共享乐谱"功能
|
||||||
* UI标题栏颜色改为灰色
|
* 更改:UI标题栏颜色改为灰色
|
||||||
* 添加乐谱详情界面,点击列表项目查看
|
* 新增:乐谱详情界面,点击列表项目查看
|
||||||
* 修复BUG
|
* 修复:一些BUG
|
||||||
|
|
||||||
版本: 2
|
版本: 2
|
||||||
更新时间: 2020.07.22 13:23
|
更新时间: 2020.07.22 13:23
|
||||||
更新内容:
|
更新内容:
|
||||||
* 修复有时WindowManager.remove会出现移除detached window的情况
|
* 修复:有时WindowManager.remove会出现移除detached window的情况
|
||||||
Reference in New Issue
Block a user