メニューを画像として指定できます – RS_GraphicsMenu.js

タイトル
This plugin allows you to indicate the menu as an image
作者名
ヘルプ
=============================================================================
Usage
-----------------------------------------------------------------------------

- Menu Index, A Button size and struct<MenuRect>
First up, You specify the name of certain Scene constructor using plugin parameter,
then have to set up a bound of the button to fit a sprite sheet image.

The width and height values of the default button are 78 pixel and they have
been set in plugin parameters called 'W' and 'H'.

Note that these values should also be the same as the width and height value
used in a struct<MenuRect>.

- Starting position of the menu panel
The starting position will set to fit in the center of the screen. The default
values are as follows:

RS.GraphicsMenu.Params.startX = Graphics.boxWidth / 2 - ((Wmenu.length) / 2)
RS.GraphicsMenu.Params.startY = Graphics.boxHeight / 2 - H / 2

'W' and 'H" is predefined button size values based on plugin parameters.

-----------------------------------------------------------------------------
Script calls :
-----------------------------------------------------------------------------
In the menu plugin parameters,
You can execute the javascript code block using an evaluate statement.

EVAL : x

The 'x' is the code block.
For Example, if you are using the plugin named YEP_CommonEventMenu,
You will run the code as belows.

EVAL : $gameMap._interpreter.openCommonEventMenu();

But, The current scene is not a map scene. so you may also need to use
an anonymous function or lambda expression, as follows.

(function() {
setTimeout(function() {
$gameTemp.reserveCommonEvent(1);
SceneManager.push(Scene_Map);
}, 0);
})();

Note that the command named 'EVAL' is not stable in latest browser.

=============================================================================
Credits (Image)
-----------------------------------------------------------------------------
The author of the included resources is as follows (a menu image) :

numg94 - http://blog.naver.com/numg94

=============================================================================
Version Log
-----------------------------------------------------------------------------
2017.07.11 (v1.0.0) - First Release
2017.12.19 (v1.0.1) - Added a new feature that can exit the game.
2017.12.29 (v1.0.2) - Fixed the issue that is not changed the button index when using a button index is six or above.
2018.01.29 (v1.0.3) - Added a new feature that runs the eval code when pressing certain menu button.
2018.11.16 (v1.0.4) - Open Menu Screen command is not supported.
2020.01.31 (v1.0.5) :
- Fixed the bug that appears incorrect button frame when selected the button.
2022.12.11 (v1.0.7) :
- Fixed the bug that is not touched the button when using the mobile device such as Android.
パラメータ
target MV
param Menu Image
type file
dir img/pictures/
require 1
desc Select the menu image to used
default inter_alpha

param Starting Position

param Start X
parent Starting Position
type string
desc Set up the starting x-position of the menu panel
default Graphics.boxWidth / 2 - ((WRECT.length) / 2)

param Start Y
parent Starting Position
type string
desc Set up the starting y-position of the menu panel
default Graphics.boxHeight / 2 - H / 2

param Rect

param W
type number
desc Setup the button size as pixel unit.
(Include the macro string called 'W' and then it replaces as a real value.)
default 78
min 1

param H
type number
desc Setup the button size as pixel unit.
(Include the macro string called 'H' and then it replaces as a real value.)
default 78
min 1

param Menu Rect
parent Rect
type struct<MenuRect>[]
desc Specify the menu rect structs
default ["{\"x\":\"0\",\"y\":\"[\\\"0\\\",\\\"78\\\"]\",\"width\":\"78\",\"height\":\"78\"}","{\"x\":\"78\",\"y\":\"[\\\"0\\\",\\\"78\\\"]\",\"width\":\"78\",\"height\":\"78\"}","{\"x\":\"156\",\"y\":\"[\\\"0\\\",\\\"78\\\"]\",\"width\":\"78\",\"height\":\"78\"}","{\"x\":\"234\",\"y\":\"[\\\"0\\\",\\\"78\\\"]\",\"width\":\"78\",\"height\":\"78\"}","{\"x\":\"312\",\"y\":\"[\\\"0\\\",\\\"78\\\"]\",\"width\":\"78\",\"height\":\"78\"}"]

param Menu Index
type string[]
desc Specify the name of Scene constructor.
(you can exit the game when setting the text as :exit)
default ["Scene_Status","Scene_Item","Scene_Skill","Scene_Map","Scene_Map"]

ライセンス表記
  • MIT License
The MIT License
Copyright (c) 2017 biud436
Free for commercial and non commercial use.

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