diff --git a/doc_editor.html b/doc_editor.html index e2ae139..95321f6 100644 --- a/doc_editor.html +++ b/doc_editor.html @@ -199,6 +199,7 @@

Additionally, on the right side you can set the name of the character that will be displayed in the "Name panel", each new name with all the parameters will be automatically added to the character catalog, after which, when creating a new dialogue, you do not have to re-enter its name, you can select it from the list, You can additionally edit the list of characters in the project settings in the characters section. The changes you make will apply to the entire project, so you only need to change the character's name in the project settings section to make it change throughout the project.



You can display values from variables in the text of the dialog. To do this, you need to write the name of the variable in angle brackets in the text "text <var_name> text", after which it will be replaced in the project with the value from the specified variable.

If the number of phrases in the dialogs of different translations differ from each other, then you can write "skip", then the phrase will be automatically skipped in the selected localization. +

To add transcription, furigana, additional anatation and texts, you can use < 簡単 = かんたん > what will be displayed as 簡単 かんたん. @@ -431,11 +448,10 @@
- +
Laurent Gontier ArgosaMarcus BellOnigi Arne Krause



-

" @@ -2885,6 +2885,14 @@ scen_editor(scen_data[0],scen_data[1],scen_data[2])}else{scen_element={};scen_editor_apply()} } var scene_scroll=false,script_scroll=[]; +function values_in_text(e){ + let t=Array.from(e.matchAll(/<(.*?)>/g)); + for(var a=0;a"+r[0]+""+r[1]+"")} + else{e=e.replace(o[0],story_script.parameters.variables[o[1]])} + }return e +} function scen_editor(block,i,n){ var arr_s=story_script[block][i].dialogs[n-1] var arr_t=story_script.parameters.text_panel @@ -3004,7 +3012,7 @@ tue_text_view.style.position="relative"; tue_text_view.style.overflowY="hidden"; } - if(story_script[block][i].dialogs[n-1].text){tue_text_view.innerHTML=languare_data(story_script[block][i].dialogs[n-1].text).replace(new RegExp("\n","g"),"
")+((story_script.parameters.text_panel.end_text_cursor&&story_script.parameters.text_panel.end_text_cursor[0])?' ':'');} + if(story_script[block][i].dialogs[n-1].text){tue_text_view.innerHTML=values_in_text(languare_data(story_script[block][i].dialogs[n-1].text)).replace(new RegExp("\n","g"),"
")+((story_script.parameters.text_panel.end_text_cursor&&story_script.parameters.text_panel.end_text_cursor[0])?' ':'');} else {tue_text_view.innerHTML=languare_data(story_script[block][i].dialogs[n-1].text_add).replace(new RegExp("\n","g"),"
")+((story_script.parameters.text_panel.end_text_cursor&&story_script.parameters.text_panel.end_text_cursor[0])?' ':'');} if(story_script[block][i].dialogs[n-1].name&&arr_p){ if(arr_p.className){tue_name_block.className=arr_p.className;}else{tue_name_block.className=""}; @@ -3335,7 +3343,7 @@ choice.style.justifyContent=((arr_s[b].align)?arr_s[b].align[0]:"center"); choice.style.alignItems=((arr_s[b].align)?arr_s[b].align[1]:"center"); if(arr_s[b].text[languare]){ - choice.innerHTML=arr_s[b].text[languare]; + choice.innerHTML=values_in_text(arr_s[b].text[languare]); choice.style.padding=arr_s[b].indent_text; } scene_layout.appendChild(choice); @@ -3558,7 +3566,7 @@ if(arr_s[b].style){ui_button.style=arr_s[b].style;} if(arr_s[b].text){ if(arr_s[b].text[languare]){ - ui_button.innerHTML=arr_s[b].text[languare]; + ui_button.innerHTML=values_in_text(arr_s[b].text[languare]); ui_button.style.padding=arr_s[b].indent_text; }; ui_button.style.display="flex";