RPGツクールMVの右から左への言語サポート – RS_ArabicMessageSystem.js

right-to-left language support for RMMV
Please read this stuff before you begin using this plugin
This plugin will rewrite everything that is required for Arabic so you will
have to notice that it may occur the collision issue with another similar
plugin when using this plugin. Please notice to me if it is not working
due to the collision issue with another plugin. In that case, I'll react for
your comment in some way (This plugin exists purely to help Arabic user or
someone else)
Text codes
This text code is available to implement the left-to-right language.
\LTR<Hello, World!>
Plugin Commands

This plugin command allows you to indicate by delaying the text in milliseconds
and the text is displayed slowly at right to left.


This plugin command allows you to immediately indicate the text without
the delay.


Compatibility List
These are some compatible plugin list that are showing up properly Arabic so
if it does not have in this list, it may not work properly.

YEP_ItemCore >=1.26
YEP_X_ItemUpgradeSlots >=1.07
YEP_X_ItemDurability >=1.02
YEP_MessageCore >=1.15
YEP_X_ExtMesPack1 >=1.10
YEP_StatusMenuCore >=1.01a

When used the Arabic texts into the custom window object that other people
are made, It does not automatically change a text align direction. If you want
to be used in another plugin, it must be bound all of required code for
Arabic texts into it.

If you have problems with other plugin after enabling this plugin,
Point your web browser to http://biud436.tistory.com/62 and you'll be in
contact with me.

Change Log
2016.09.19 (v1.0.0) - First Release.
2016.09.19 (v1.0.1) - Fixed DrawIcon, DrawFace function.
2016.09.20 (v1.1.0) - Fixed Arabic text sturcture.
2016.09.21 (v1.1.1) - Fixed processNormalCharacter function.
2016.09.23 (v1.1.2) - Fixed the window classes that could be displaying
the battle log and map name windows, which have used a drawTextEx function in Arabic.
2016.10.02 (v1.1.3) - Fixed the Arabic compatibility issues with the name box for YEP Message Core.
2016.10.23 (v1.1.4) : Fixed the bug that is not working in RMMV 1.3.2 or more.
- Fixed the issue that the scrolling text is not working.
- Fixed the issue that YEP Message Core is not working.
2016.10.24 (v1.1.5) - Fixed the renderCanvas function in Scroll Text
2016.11.26 (v1.1.6) - Added certain code to remove the texture from memory.
2017.01.06 (v1.1.7) :
- Supported YEP_GabWindow plugin
- Supported YEP_EventMiniLabel plugin
- Fixed the processNormalCharacter method.
2017.05.05 (v1.1.8) - Fixed the issue that does not properly show up Arabic when using a choice window.
2017.06.03 (v1.1.9) - Fixed an issue that is incorrectly displayed a non-character word : !,
param Message Mode
type select
desc this parameter sets up the text direction.
default : arabic
default arabic
option Arabic Mode
value arabic
option Normal Mode
value normal

param Arabic Font
desc Choose your font that can indicate Arabic text from your system font folder.
default Simplified Arabic, Times New Roman, Segoe UI

param Font Size
type number
desc Specifies up the text size as integer type.
(default : 28)
default 28

param Text Animation

param Text Wait Time
parent Text Animation
type number
desc Specify up the wait time for Arabic texts
(1000 Millisecond = 1 Sec)
default 10

param Animated Text
parent Text Animation
type boolean
desc Set whether the text has animated.
(Important : The performance may be lower in the mobile)
default false
on Enable
off Disable

param Binder
type note[]
desc Can run the scripts
default ["\" YEP_MessageCore\\n if(Imported.YEP_MessageCore) {\\n\\n Window_Message.prototype.standardFontFace = function () {\\n return Window_Base.prototype.standardFontFace.call(this);\\n };\\n\\n var alias_Window_NameBox_initialize = Window_NameBox.prototype.initialize;\\n Window_NameBox.prototype.initialize = function(parentWindow) {\\n alias_Window_NameBox_initialize.call(this, parentWindow);\\n RS.ArabicMessageSystem.createArabicLayer.call(this);\\n RS.ArabicMessageSystem.defineProtoype(Window_NameBox);\\n };\\n\\n Window_NameBox.prototype.standardFontFace = function() {\\n return Window_Base.prototype.standardFontFace.call(this);\\n };\\n\\n Window_NameBox.prototype.refresh = function(text, position) {\\n this.show();\\n this._lastNameText = text;\\n this._text = Yanfly.Param.MSGNameBoxText + text;\\n this._position = position;\\n this.width = this.windowWidth();\\n this.createContents();\\n this.contents.clear();\\n RS.ArabicMessageSystem.createArabicLayer.call(this);\\n this.resetFontSettings();\\n this.changeTextColor(this.textColor(Yanfly.Param.MSGNameBoxColor));\\n var padding = eval(Yanfly.Param.MSGNameBoxPadding) / 2;\\n this.drawTextEx(this._text, padding, 0);\\n this._parentWindow.adjustWindowSettings();\\n this._parentWindow.updatePlacement();\\n this.adjustPositionX();\\n this.adjustPositionY();\\n this.open();\\n this.activate();\\n this._closeCounter = 4;\\n return '';\\n };\\n };\"","\" YEP_EventMiniLabel\\n if(Imported.YEP_EventMiniLabel) {\\n RS.ArabicMessageSystem.defineInitialize(Window_EventMiniLabel);\\n Window_EventMiniLabel.prototype.textWidthEx = function(text) {\\n var temp = messageMode.slice(0);\\n messageMode = 'normal';\\n var result = Window_Base.prototype.drawTextEx.call(this, text, 0, this.contents.height);\\n messageMode = temp;\\n return result;\\n };\\n }\\n\"","\" YEP_GabWindow\\n if(Imported.YEP_GabWindow) {\\n var alias_Window_Gab_initialize = Window_Gab.prototype.initialize;\\n Window_Gab.prototype.initialize = function(battle) {\\n alias_Window_Gab_initialize.call(this, battle);\\n RS.ArabicMessageSystem.createArabicLayer.call(this);\\n RS.ArabicMessageSystem.defineRefresh(Window_Gab);\\n RS.ArabicMessageSystem.defineProtoype(Window_Gab);\\n };\\n\\n Window_Gab.prototype.standardFontFace = function() {\\n return Window_Base.prototype.standardFontFace.call(this);\\n };\\n }\"","\" YEP_ItemCore\\n if(Imported.YEP_ItemCore) {\\n var alias_Window_ItemActionCommand_initialize = Window_ItemActionCommand.prototype.initialize;\\n Window_ItemActionCommand.prototype.initialize = function(x, y) {\\n alias_Window_ItemActionCommand_initialize.call(this, x, y);\\n RS.ArabicMessageSystem.createArabicLayer.call(this);\\n };\\n Window_ItemActionCommand.prototype.drawAllItems = function() {\\n RS.ArabicMessageSystem.createArabicLayer.call(this);\\n var topIndex = this.topIndex();\\n for (var i = 0; i < this.maxPageItems(); i++) {\\n var index = topIndex + i;\\n if (index < this.maxItems()) {\\n this.drawItem(index);\\n }\\n }\\n };\\n }\"","\" YEP_SaveCore\\n\\n if(Imported.YEP_SaveCore) {\\n\\n Window_Base.prototype.drawSvActor = function(actor, x, y) {\\n var filename = actor.battlerName();\\n var bitmap = ImageManager.loadSvActor(filename);\\n var pw = bitmap.width / 9;\\n var ph = bitmap.height / 6;\\n var sx = 0;\\n var sy = 0;\\n this.contents.RTLblt(bitmap, sx, sy, pw, ph, x - pw / 2, y - ph);\\n };\\n\\n Window_Base.prototype.textWidthEx = function(text) {\\n var temp = messageMode.slice(0);\\n messageMode = 'normal';\\n var result = this.drawTextEx.call(this, text, 0, this.contents.height);\\n messageMode = temp;\\n return result;\\n };\\n\\n var alias_Window_SaveInfo_initialize = Window_SaveInfo.prototype.initialize;\\n Window_SaveInfo.prototype.initialize = function(x, y, width, height, mode) {\\n alias_Window_SaveInfo_initialize.call(this, x, y, width, height, mode);\\n RS.ArabicMessageSystem.createArabicLayer.call(this);\\n };\\n\\n Window_SaveInfo.prototype.refresh = function() {\\n this.contents.clear();\\n RS.ArabicMessageSystem.createArabicLayer.call(this);\\n this.resetFontSettings();\\n var dy = 0;\\n dy = this.drawGameTitle(dy);\\n if (!this._valid) return this.drawInvalidText(dy);\\n this._saveContents = StorageManager.load(this.savefileId());\\n this.drawContents(dy);\\n };\\n\\n RS.ArabicMessageSystem.defineInitialize(Window_SaveConfirm);\\n\\n }\"","\"Specify the symbol name\\nrtlWindowButtonSymbol = \\\"Right to Left\\\";\""]

, #, $, dot.
2017.06.14 (v1.2.0) :
- Added a new feature that can draw the text one by one.
2017.06.14 (v1.2.1) :
- Fixed to appear the text slowly at the right to left.
- Added plugin commands for animating text.
- Fixed an incorrect text padding in command button.
2017.07.13 (v1.2.2) :
- When painting the normal text without processing a text code, Fixed an issue that is incorrectly displayed a non-character word : !,
, #, $, dot
2017.08.03 (v1.2.3) :
- Fixed the bug that didn't show up a icon when using a text animation option.
- Added a feature that can shows up texts fast.
2017.10.29 (v1.2.4) - Added the scripts binder.
2017.12.12 (v1.2.5) :
- Fixed the bug of the swap code that changes the message mode as the normal mode when calculating the text width.
- Added a feature that changes a text direction in the Game Option.
- Added a feature that saves the config of the text direction as file.
The MIT License
Copyright (c) 2016 biud436
Free for commercial and non commercial use.

紹介ページ https://github.com/biud436/MV/blob/master/RS_ArabicMessageSystem.js