#-----------------------------------------------------------------------------
# TERMS OF USE
#-----------------------------------------------------------------------------
# -Credits to Lecode
# -Keep this header
# -Free to use for commercial and non-commercial projects
#-----------------------------------------------------------------------------
* @help
*
* ==========================================================================================
* CREATE AN ANIMATED PICTURE
* ------------------------------------------------------------------------------------------
* Use this plugin command:
* AnimatedPicture id name frames lines delay origin x y scaleX scaleY opacity blendMode
*
* id => The id of your picture that will be created
* name => The filenam of the picture
* lines => The number of line of the spritesheet
* delay => The loop time rate, in millisecond ( 1000 millisecond = 1 second)
* origin => 0: Upper left 1: Center
* x => X coordinate
* y => Y coordinate
* scaleX => % of x scale ( starts at 100. Don't put "%")
* scaleY => % of y scale ( starts at 100. Don't put "%")
* opacity => Opacity of your picture
* blendMode => 0: Normal 1: Additive 2: Multiply 3: Screen
*
* Example: AnimatedPicture 1 Pic 13 2 100 0 200 200 100 100 255 0
*
* Default picture commands like opacity change will still work. Just use the same picture ID.
* The picture isn't animated yet, use the following command to starts the animation.
* ==========================================================================================
* START ANIMATION
* ------------------------------------------------------------------------------------------
* This command starts the animation of a picture. Use this command:
* AnimatedPicture id Start mode
*
* id => The id of the picture you want to animate
* mode => Use "cycle" or "infinite" or "back_cycle"
* When using cycle, the animation if played one time and ends to
* the last frame.
* When using infinite, the animation will loop undefinitely.
*
* Example: AnimatedPicture 1 Start infinite
* ==========================================================================================
* SET ANIMATION LINE
* ------------------------------------------------------------------------------------------
* Use this command to change the line of picture animation:
* AnimatedPicture id SetLine lineID
*
* id => The id of the picture you want to animate
* lineID => The index of the line you want to choose. (Starts at 0)
*
* Example: AnimatedPicture 1 SetLine 0
* ==========================================================================================
* SET ANIMATION FRAME
* ------------------------------------------------------------------------------------------
* You can set a fixed frame for your picture. The animation will end and
* the picture will be set at the specified frame. Use this command:
*
* AnimatedPicture id SetFrame frameID
*
* id => The id of the picture you want to animate
* frameID => The index of the frame you want to choose. (Starts at 0)
*
* Example: AnimatedPicture 1 SetFrame 1
* ==========================================================================================
* STOP ANIMATION
* ------------------------------------------------------------------------------------------
* Use this command to stop the animation of a picture. The frame index will not
* be reseted:
*
* AnimatedPicture id Stop
*
* id => The id of the picture you want to animate
*
* Example: AnimatedPicture 1 Stop
*
*/
//#=============================================================================
/*:
* @plugindesc Bind pixi texts to pictures
* @author Lecode
* @version 1.0
*
* @help
*
* ==========================================================================================
* BIND TEXT TO PICTURE
* ------------------------------------------------------------------------------------------
* Use this plugin command to bind a PIXI.Text object to a picture:
* BindPixiText SetText pictureId text...
*
* Example:
* BindPixiText SetText 1 Hello world !
*
* ==========================================================================================
* SET TEXT POSITION
* ------------------------------------------------------------------------------------------
* Use this plugin command to set the text position:
* BindPixiText SetPosition pictureId x y
*
* Example:
* BindPixiText SetPosition 1 5 10
*
* ==========================================================================================
* MOVE TEXT
* ------------------------------------------------------------------------------------------
* Use this plugin command to move the text:
* BindPixiText Move pictureId x y
*
* Example:
* BindPixiText Move 1 5 10
*
* ==========================================================================================
* CHANGE STYLE
* ------------------------------------------------------------------------------------------
* You can set the text style using this plugin command:
* BindPixiText SetStyle pictureId styleId value
*
* You can combine call it multiple times and combine
* the effects.
*
* Example:
* BindPixiText SetStyle 1 stroke #4a1850
* BindPixiText SetStyle 1 strokeThickness 5
* BindPixiText SetStyle 1 fontSize 36px
* BindPixiText SetStyle 1 fontWeight bold
* BindPixiText SetStyle 1 dropShadow true
* BindPixiText SetStyle 1 dropShadowColor #000000
* BindPixiText SetStyle 1 dropShadowAngle Math.PI/6
* BindPixiText SetStyle 1 dropShadowDistance 6
*
* Or you can set multiple style at the same time using
* this script call:
**** var style = {
**** fontFamily : 'Arial',
**** fontSize : '36px',
**** fontStyle : 'italic',
**** fontWeight : 'bold',
**** fill : '#F7EDCA',
**** stroke : '#4a1850',
**** strokeThickness : 5,
**** dropShadow : true,
**** dropShadowColor : '#000000',
**** dropShadowAngle : Math.PI / 6,
**** dropShadowDistance : 6,
**** wordWrap : true,
**** wordWrapWidth : 440
**** };
**** pictureObj.setPixiTextStyle(style)
*
* Here is the list of possible styles, with default values:
* {
align: 'right',
breakWords: false,
dropShadow: false,
dropShadowAngle: Math.PI / 6,
dropShadowBlur: 0,
dropShadowColor: '#000000',
dropShadowDistance: 5,
fill: 'black',
fillGradientType: TEXT_GRADIENT.LINEAR_VERTICAL,
fontFamily: 'Arial',
fontSize: 26,
fontStyle: 'normal',
fontVariant: 'normal',
fontWeight: 'normal',
letterSpacing: 0,
lineHeight: 0,
lineJoin: 'miter',
miterLimit: 10,
padding: 0,
stroke: 'black',
strokeThickness: 0,
textBaseline: 'alphabetic',
wordWrap: false,
wordWrapWidth: 100,
}
* ==========================================================================================
* GETTING THE PIXI.TEXT OBJECTS
* ------------------------------------------------------------------------------------------
* For advanced use, use this script call to get the pixi.text objects.
* You'll then be able to modify them as you wish
**** var textContainer = $gameScreen.getPixiTextObjects(pictureId)
**** var texts = textContainer.children;
**** texts[0].anchor.set(0,1)
*
* probleme ex: pour update
* textContainer = $gameScreen.getPixiTextObjects(67)
texts = textContainer.children;
texts[0]._text = '51515'
* ==========================================================================================
* REMOVE TEXT
* ------------------------------------------------------------------------------------------
* Use this plugin command:
* BindPixiText Remove 1
*/
//#=============================================================================
/*:
* @plugindesc Picture Triggers
* @author Lecode
* @version 1.0
*
* @help
*
* ==========================================================================================
* SET A TRIGGER
* ------------------------------------------------------------------------------------------
* Use this script:
* $gameScreen.setPictureTrigger(pictureId, trigger, function);
* Where trigger is:
* "Left Click"
* "Right Click"
* "Long Click"
* "Mouse Over"
* "Mouse Out"
*
* Example:
* $gameScreen.setPictureTrigger(1, "Left Click", function(pictureId){
* console.log("Left click on picture ID ", pictureId);
* });
*/
//#=============================================================================