Template String (${[JavaScript Literal]} in a text message)
Hi all,I've created a 'Template String' plugin.
Source: https://github.com/hajimehoshi/rpgmmv/blob/master/HajimeHoshi_TemplateString.js
Screen Shot 1 (editor):
Screen Shot 2 (result):
You can use ${} at a text message. Template Strings are evaluated ahead of resolving escape characters (like \N[...]).
This template string is NOT compatible with ES6 template literal. For example, in this template string, braces ('{' and '}') must be paired, but ES6 doesn't require that.
Enjoy!
本贴来自国际rpgmaker官方论坛作者:hajimehoshi处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/template-string-javascript-literal-in-a-text-message.49118/
页:
[1]