O TEMA DO FÓRUM ESTÁ EM MANUTENÇÃO. FEEDBACKS AQUI: ACESSAR

MPP_WindowInsideClear

Iniciado por Komuro Takashi, 25/08/2020 às 17:58

MPP_WindowInsideClear

Compativel com: RMMZ
Compatibilidade: RMMV/RMMZ
Facilidade de uso: pluginManager
Lag gerado: nulo

[box class=titlebg]
Condições de Uso
[/box]
Pode ser modificado, alterado e livre para uso comercial


[box class=titlebg]
Para que serve o script
[/box]
Esse plugins é uma correção da ordem como as Window são priorizadas nas camadas.

Antes e Depois



//=============================================================================
// MPP_WindowInsideClear.js
//=============================================================================
// Copyright (c) 2018 Mokusei Penguin
// Released under the MIT license
// http://opensource.org/licenses/mit-license.php
//=============================================================================
/*:
* @plugindesc 【ver.1.0】 When windows overlapped, you can fix the space between them.
* @author Mokusei Penguin
*
* @help
*  
* ================================
* Author : Mokusei Penguin
* URL : http://woodpenguin.blog.fc2.com/
*
* @param Inside Width
* @type number
* @desc Width pulled inward
* @default 4
*
*
*
*
*/
(function() {
var MPPlugin = {};
(function() {
   
   var parameters = PluginManager.parameters('MPP_WindowInsideClear');
   
   MPPlugin.InsideWidth = Number(parameters['Inside Width'] || 4);
   
})();
//7096
WindowLayer.prototype._canvasClearWindowRect = function(renderSession, window) {
   var rx = this.x + window.x;
   var ry = this.y + window.y + window.height / 2 * (1 - window._openness / 255);
   var rw = window.width;
   var rh = window.height * window._openness / 255;
   
   var iw = MPPlugin.InsideWidth;
   rx += iw;
   ry += iw * window._openness / 255;
   rw -= iw * 2;
   rh -= iw * 2 * window._openness / 255;
   
   renderSession.context.clearRect(rx, ry, rw, rh);
};
//7158
var _WiLa__maskWindow = WindowLayer.prototype._maskWindow;
WindowLayer.prototype._maskWindow = function(window, shift) {
   _WiLa__maskWindow.call(this, window, shift);
   var rect = this._windowRect;
   var iw = MPPlugin.InsideWidth;
   rect.x += iw;
   rect.y += iw * window._openness / 255;
   rect.width -= iw * 2;
   rect.height -= iw * 2 * window._openness / 255;
};
})();


[box class=titlebg]
Créditos e Avisos
[/box]
Criador: : Mokusei Penguin e a mim por trazer o Plugin aqui. :cowboy:

Paga um café? Patreon