From 63897f30212151189b914ab3ca8ca216e85ab928 Mon Sep 17 00:00:00 2001 From: Kirill Live Date: Tue, 10 Dec 2024 07:12:36 +0300 Subject: [PATCH] kirilllive --- plugins/screen_control.js | 7 +++---- tuesday_visual.html | 38 ++++++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/plugins/screen_control.js b/plugins/screen_control.js index ff238bc..dbf3057 100755 --- a/plugins/screen_control.js +++ b/plugins/screen_control.js @@ -1,13 +1,12 @@ let tue_screen_control=true; tuesday.addEventListener('mouseup',function(e){ - // if(tue_screen_control && e.pageX > tuesday.offsetWidth/3 ){ + if(tue_screen_control){//} && e.pageX > tuesday.offsetWidth/3 ){ if(story_json[tue_story][scene].dialogs==0 || check_choice(story_json[tue_story][scene].dialogs)){go_story()} - // } else if( story_json[tue_story][scene].dialogs==0 || check_choice(story_json[tue_story][scene].dialogs) && tue_screen_control){back_story()}; + } //else if( story_json[tue_story][scene].dialogs==0 || check_choice(story_json[tue_story][scene].dialogs) && tue_screen_control){back_story()}; tue_screen_control=true; }); tuesday.addEventListener('script_loaded',function(event){ - if(document.getElementById('tue_back')){tue_back.style.pointerEvents='none'}; if(document.getElementById('tue_next')){tue_next.style.pointerEvents='none'}; var buttons=document.getElementById("tuesday").getElementsByClassName("tue_controll"); - for(var i=0;i < buttons.length;i++){buttons[i].setAttribute('onmouseup','tue_screen_control=false;');} + for(var i=0;i < buttons.length;i++){buttons[i].setAttribute('onmousedown','tue_screen_control=false;');} }); diff --git a/tuesday_visual.html b/tuesday_visual.html index eda8ab6..c880699 100755 --- a/tuesday_visual.html +++ b/tuesday_visual.html @@ -872,7 +872,7 @@ },"screen_control":{ "name":"Screen control", "text":"switches dialogue by click to screen.", - "code":"let tue_screen_control=!0;tuesday.addEventListener('mouseup',function(e){(0==story_json[tue_story][scene].dialogs||check_choice(story_json[tue_story][scene].dialogs))&&go_story(),tue_screen_control=!0}),tuesday.addEventListener('script_loaded',function(e){document.getElementById('tue_back')&&(tue_back.style.pointerEvents='none'),document.getElementById('tue_next')&&(tue_next.style.pointerEvents='none');for(var t=document.getElementById('tuesday').getElementsByClassName('tue_controll'),n=0;nreading text with a synthesized voice", @@ -1627,7 +1627,7 @@ x.classList.add("toast_anim"); } function about(){ - var html="

Tuesday JS visual novel engine


Release: 51

" + var html="

Tuesday JS visual novel engine


Release: 52

" +"" +"" +"" @@ -5185,19 +5185,33 @@ let box_x,box_y,box_width,box_height; document.onkeydown=function(e){ e=e||window.event; - if(e.keyCode == '27'){if(add_element.style.visibility=="visible"){menu_add.style.visibility='hidden';}else if(window_zone.style.visibility=="visible"){modal_window("close")}} - else if(e.keyCode == '13'){{if(objFocus){if(!f){scene_scroll=false;saveResize();}else{eval(f)};}}} - else if(e.keyCode == '38'){if(objFocus){scene_view.style.overflow='hidden';s.style.top=(s.offsetTop-((e.shiftKey)?10:1))+'px';moveSave=true;}} - else if(e.keyCode == '40'){if(objFocus){scene_view.style.overflow='hidden';s.style.top=(s.offsetTop+((e.shiftKey)?10:1))+'px';moveSave=true;}} - else if(e.keyCode == '37'){if(objFocus){scene_view.style.overflow='hidden';s.style.left=(s.offsetLeft-((e.shiftKey)?10:1))+'px';moveSave=true;}} - else if(e.keyCode == '39'){if(objFocus){scene_view.style.overflow='hidden';s.style.left=(s.offsetLeft+((e.shiftKey)?10:1))+'px';moveSave=true;}} + if(e.keyCode=='27'){if(add_element.style.visibility=="visible"){menu_add.style.visibility='hidden';}else if(window_zone.style.visibility=="visible"){modal_window("close")} else if(objFocus){ menu_element.style.visibility='hidden';scen_edit_update(true);} } + else if(e.keyCode=='13'){{if(objFocus){if(!f){scene_scroll=false;saveResize();}else{eval(f)};}}} + else if(e.keyCode=='8'||e.keyCode=='46'){if(objFocus){scene_scroll=false;let a=(story_script.parameters.buttons.lastIndexOf(arr_e)>=0)?story_script.parameters:(arr_l[arr_n].objects)?arr_l[arr_n].objects:story_script[scen_data[0]][scen_data[1]].dialogs[scen_data[2]-1]; + if(arr_l[arr_n]&&arr_l[arr_n].objects){ a.splice(a.lastIndexOf(arr_e),1);ho_update(); + }else if(a.buttons){a.buttons.splice(a.buttons.lastIndexOf(arr_e),1);menu_element.style.visibility='hidden';scen_edit_update(true); + }else if(arr_e.url){a.art.splice(a.art.lastIndexOf(arr_e),1);menu_element.style.visibility='hidden';scen_edit_update(true); + }else{a.choice.splice(a.choice.lastIndexOf(arr_e),1);menu_element.style.visibility='hidden';scen_edit_update(true); + };state_save();} + } + else if(e.keyCode=='68'){if(objFocus){scene_scroll=false;let a=(story_script.parameters.buttons.lastIndexOf(arr_e)>=0)?story_script.parameters:(arr_l[arr_n].objects)?arr_l[arr_n].objects:story_script[scen_data[0]][scen_data[1]].dialogs[scen_data[2]-1]; + if(arr_l[arr_n]&&arr_l[arr_n].objects){a.splice(a.lastIndexOf(arr_e),0,JSON.parse(JSON.stringify(a[a.lastIndexOf(arr_e)])));ho_update(); + }else if(a.buttons){a.buttons.splice(a.buttons.lastIndexOf(arr_e),0,JSON.parse(JSON.stringify(a.buttons[a.buttons.lastIndexOf(arr_e)])));menu_element.style.visibility='hidden';scen_edit_update(true); + }else if(arr_e.url){a.art.splice(a.art.lastIndexOf(arr_e),0,JSON.parse(JSON.stringify(a.art[a.art.lastIndexOf(arr_e)])));menu_element.style.visibility='hidden';scen_edit_update(true); + }else{a.choice.splice(a.choice.lastIndexOf(arr_e),0,JSON.parse(JSON.stringify(a.choice[a.choice.lastIndexOf(arr_e)])));menu_element.style.visibility='hidden';scen_edit_update(true); + };state_save();} + } + else if(e.keyCode=='38'){if(objFocus){scene_view.style.overflow='hidden';s.style.top=(s.offsetTop-((e.shiftKey)?10:1))+'px';moveSave=true;}} + else if(e.keyCode=='40'){if(objFocus){scene_view.style.overflow='hidden';s.style.top=(s.offsetTop+((e.shiftKey)?10:1))+'px';moveSave=true;}} + else if(e.keyCode=='37'){if(objFocus){scene_view.style.overflow='hidden';s.style.left=(s.offsetLeft-((e.shiftKey)?10:1))+'px';moveSave=true;}} + else if(e.keyCode=='39'){if(objFocus){scene_view.style.overflow='hidden';s.style.left=(s.offsetLeft+((e.shiftKey)?10:1))+'px';moveSave=true;}} } document.onkeyup=function(e){ e=e||window.event; - if(e.keyCode == '38'){if(objFocus){scene_view.style.overflow='scroll';}} - else if(e.keyCode == '40'){if(objFocus){scene_view.style.overflow='scroll'}} - else if(e.keyCode == '37'){if(objFocus){scene_view.style.overflow='scroll'}} - else if(e.keyCode == '39'){if(objFocus){scene_view.style.overflow='scroll'}} + if(e.keyCode=='38'){if(objFocus){scene_view.style.overflow='scroll';}} + else if(e.keyCode=='40'){if(objFocus){scene_view.style.overflow='scroll'}} + else if(e.keyCode=='37'){if(objFocus){scene_view.style.overflow='scroll'}} + else if(e.keyCode=='39'){if(objFocus){scene_view.style.overflow='scroll'}} } s.onmousedown=function(e){ if(e.button==1){e.preventDefault();}
E-Mail:tuesdayjsengine@gmail.com
WebSite:kirilllive.github.io/tuesday-js
Tutorial:kirilllive.github.io/tuesday-js/doc_editor