テキストとタイマバーを表示する単純なウィンドウを追加するプラグイン – SRCrazy_TimedBarDisplay.js

タイトル
Adds simple window displaying some text and a timer bar
作者名
ヘルプ
パラメータ
param -- WINDOW --
desc Parameters in this section relate to the window display

param Show Window
desc Toggles display of the window graphic
default: true
default true

param Window Width
desc Width of the window
default: 400
default 400

param Window Height
desc Height of the window
default: 80
default 80

param -- BAR --
desc Parameters in this section relate to the bar display

param Bar X Pos
desc The x-offset of the bar
default: 25
default 25

param Bar Y Pos
desc The y-offset of the bar
default: 38
default 38

param Bar Width
desc Width of the bar
default: 350
default 350

param Bar Height
desc Height of the bar
default: 6
default 6

param -- TEXT --

param Text X Pos
desc The x-offset of the text
default: 10
default 10

param Text Y Pos
desc The y-offset of the text
default: 10
default 10

param -- COLOURS --
desc Parameters in this section relate to the bar colours used

param Bar Colour 1
desc The colour for the left side of the gradient (hex format)
default: #0099ff
default #0099ff

param Bar Colour 2
desc The colour for the right side of the gradient (hex format)
default: #0099ff
default #0099ff

param Bar Bg Colour
desc The colour for the abckground of the bar (hex format)
default: #000000
default #000000

param Text Colour
desc Colour of the text to be displayed
default #ffffff

param -- IMAGE --
desc Parameters in this section relate to the image display

param Show Background Image
desc Toggles display of the image
default: false
default false

param Background Image
desc The file to use for the background image
require 1
dir img/pictures/
type file

help============================================================================ S_Rank_Crazy's Timed Bar Display
============================================================================
Adds a window that displays a message and a progress bar for a period of
time. Time can be tracked using a frame count or in real-time.

All SRCrazy plugins are rename safe - you can rename the file and it'll still
work. All parameters and commands are case-safe (no need to worry about
case-sensitive input) unless specifically stated. This doesn't include
Comment Tags or file names/paths; they are still case sensitive.

MVCommons supported but not required for use.

============================================================================
SCRIPT CALL

timedbar(x, y, message, time, isRealTime);

Eg:
timedbar(10, 10, "Hello", 10, true);

The above example will display a window at position [10,10] and will be
removed after 10 seconds. Passing false or omitting the 'isRealTime'
parameter will translate the 'time' value as the number of frames to count.

Additional methods can be called once the timedbar function has been called
in order to update a variable, switch or trigger an event. These methods are:

assignToVariable(variableId);
This sets the current progress of the bar the specified variable

assignToSwitch(switchId);
This flips a switch when timer is complete. If the switch is on, switch is
turned off and vice versa.

assignToCommonEvent(commonEventId);
This calls a Common Event when the timer is complete.

These methods can be chained in order to use a combination of them.

Eg:
timedbar(10, 10, "Hello", 10, true).assignToVariable(1).assignToSwitch(1);

This will create the display as before but also update variable with ID 1
every frame, and then change switch with ID 1 when complete.


============================================================================
ライセンス表記
No personal credit required, but always appreciated.
Free for personal and commercial use.

紹介ページ https://github.com/agent-bizzle/rmmv-plugins/blob/master/legacy/SRCrazy_TimedBarDisplay.js