Skip to content

Commit 3fa0530

Browse files
author
liply
committed
add scale factor
1 parent 6adda0f commit 3fa0530

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

plugins/Community_Basic.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
* @plugindesc Basic plugin for manipulating important parameters..
33
* @author RM CoreScript team
44
*
5+
* @help
6+
* Basic plugin for manipulating important parameters..
7+
* There is no plugin command.
8+
*
59
* @param cacheLimit
610
* @desc The upper limit of images' cached size (MPixel)
711
* @default 20
@@ -14,6 +18,10 @@
1418
* @desc The resolution of screen height
1519
* @default 624
1620
*
21+
* @pram scaleFactor
22+
* @desc Scale window to (screen size * value).
23+
* @default 1
24+
*
1725
* @param changeWindowWidthTo
1826
* @desc If set, change window width to this value
1927
*
@@ -33,6 +41,10 @@
3341
* @plugindesc 基本的なパラメーターを設定するプラグインです。
3442
* @author RM CoreScript team
3543
*
44+
* @help
45+
* 基本的なパラメーターを設定するプラグインです。
46+
* このプラグインにはプラグインコマンドはありません。
47+
*
3648
* @param cacheLimit
3749
* @desc 画像のメモリへのキャッシュの上限値 (MPix)
3850
* @default 20
@@ -45,6 +57,10 @@
4557
* @desc 画面サイズの高さ
4658
* @default 624
4759
*
60+
* @pram scaleFactor
61+
* @desc ウインドウを、画面サイズの指定された値分拡大・縮小します
62+
* @default 1
63+
*
4864
* @param changeWindowWidthTo
4965
* @desc 値が設定された場合、ウインドウの幅を指定した値に変更
5066
*
@@ -67,19 +83,20 @@
6783

6884
var parameters = PluginManager.parameters('Community_Basic');
6985
var cacheLimit = toNumber(parameters['cacheLimit'], 20);
86+
var scaleFactor = toNumber(parameters['scaleFactor'], 1);
7087
var screenWidth = toNumber(parameters['screenWidth'], 816);
7188
var screenHeight = toNumber(parameters['screenHeight'], 624);
7289
var renderingMode = parameters['renderingMode'].toLowerCase();
7390
var alwaysDash = parameters['alwaysDash'].toLowerCase() === 'on';
7491
var windowWidth = toNumber(parameters['changeWindowWidthTo'], 0);
7592
var windowHeight = toNumber(parameters['changeWindowHeightTo'], 0);
7693

77-
if(screenWidth !== SceneManager._screenWidth && !windowWidth) {
78-
windowWidth = screenWidth;
94+
if(scaleFactor !== 1 && !windowWidth) {
95+
windowWidth = screenWidth * scaleFactor;
7996
}
8097

81-
if(screenHeight !== SceneManager._screenHeight && !windowHeight) {
82-
windowHeight = screenHeight;
98+
if(scaleFactor !== 1 && !windowHeight) {
99+
windowHeight = screenHeight * scaleFactor;
83100
}
84101

85102
ImageCache.limit = cacheLimit * 1000 * 1000;

0 commit comments

Comments
 (0)