Skip to content

Instantly share code, notes, and snippets.

@kurano-tsuehito

kurano-tsuehito/KeyConfig.js Secret

Last active Apr 24, 2018
Embed
What would you like to do?
ティラノスクリプトマウス&キーボード操作の改造
//20180425-06:17 next: falseを入れ忘れていてバックログ開くと先に進んでしまうバグがあったので修正
//マウス操作
"mouse" : {
"right" : function(){ //右クリックの動作
if (tyrano.plugin.kag.variable.sf.page === 'title_config'){
TYRANO.kag.ftag.startTag("eval", {exp: "sf.page = '0'"});
TYRANO.kag.ftag.startTag("layopt", {layer: "message1", visible: "false"});
TYRANO.kag.ftag.startTag("fadeoutbgm", {time: "500"});
TYRANO.kag.ftag.startTag("jump", {storage: "title.ks", target: "start"});
}else if(tyrano.plugin.kag.variable.sf.page === 'game_config') {
TYRANO.kag.ftag.startTag("eval", {exp: "sf.page = '0'"});
TYRANO.kag.ftag.startTag("eval", {exp: "f.config = '0'"});
TYRANO.kag.ftag.startTag("jump", {storage: "../others/plugin/kurano_system/config.ks", target: "backgame"});
}else{
if (TYRANO.kag.key_mouse.canShowMenu())
if ($(".menu_close").size() > 0 && $(".layer_menu").css("display") != "none") $(".menu_close").click();
else if (!TYRANO.kag.stat.is_strong_stop)
if (TYRANO.kag.stat.is_hide_message) TYRANO.kag.layer.showMessageLayers();
else TYRANO.kag.ftag.startTag("hidemessage")
}
},
"center": function(){ //センターボタンをクリック
if (tyrano.plugin.kag.variable.sf.page === 'title_config'){
return false;
}else if(tyrano.plugin.kag.variable.sf.page === 'game_config') {
return false;
}else{
TYRANO.kag.ftag.startTag("eval", {exp: "sf.page = '0'", next: false});
TYRANO.kag.menu.showMenu();
}
},
"wheel_up" : function(){ // ホイールをアップした時の動作
if (tyrano.plugin.kag.variable.sf.page === 'title_config'){
return false;
}else if(tyrano.plugin.kag.variable.sf.page === 'game_config') {
return false;
}else{
TYRANO.kag.ftag.startTag("eval", {exp: "sf.page = '0'", next: false});
TYRANO.kag.menu.displayLog();
}
},
"wheel_down" : function(){ //ホイールをダウンした時の動作
if (tyrano.plugin.kag.variable.sf.page === 'title_config'){
return false;
}else if(tyrano.plugin.kag.variable.sf.page === 'game_config') {
return false;
}else{
TYRANO.kag.ftag.startTag("eval", {exp: "sf.page = '0'", next: false});
if (TYRANO.kag.key_mouse.canClick()) $(".layer_event_click").click()
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment