//=============================================================================================================
// ** Filename          : DSI-WindowLayers.js
// ** Last Updated      : Nov 18 2018
//=============================================================================================================
/*:
* @plugindesc v1.0 Modified version of SRD_WindowLayers. Used for DSI plugins.
* @author dsiver144
* @help
*/
var Imported = Imported || {};

function WindowLayerEx() {
    this.initialize.apply(this, arguments);
};

(function(){
    Imported['DSI-WindowLayers'] = 1.0;
    // Solve Overlapping Window Issue
    if (PIXI.Container) {
        WindowLayerEx.prototype = Object.create(WindowLayer.prototype);
        WindowLayerEx.prototype.constructor = WindowLayerEx;

        WindowLayerEx.prototype.initialize = function() {
            PIXI.Container.call(this);
            this._width = 0;
            this._height = 0;
            this.interactive = false;
        };
        WindowLayerEx.prototype.renderCanvas = PIXI.Container.prototype.renderCanvas;
        WindowLayerEx.prototype._canvasClearWindowRect = PIXI.Container.prototype._canvasClearWindowRect;
        WindowLayerEx.prototype.renderWebGL = PIXI.Container.prototype.renderWebGL;
        WindowLayerEx.prototype._maskWindow = PIXI.Container.prototype._maskWindow;
    } else {
        WindowLayerEx.prototype = Object.create(WindowLayer.prototype);
        WindowLayerEx.prototype.constructor = WindowLayerEx;
        WindowLayerEx.prototype.initialize = function() {
            PIXI.DisplayObjectContainer.call(this);
            this._width = 0;
            this._height = 0;
            this.interactive = false;
        };

        WindowLayerEx.prototype._renderCanvas = PIXI.DisplayObjectContainer.prototype._renderCanvas;
        WindowLayerEx.prototype._canvasClearWindowRect = PIXI.DisplayObjectContainer.prototype._canvasClearWindowRect;
        WindowLayerEx.prototype._renderWebGL = PIXI.DisplayObjectContainer.prototype._renderWebGL;
        WindowLayerEx.prototype._maskWindow = PIXI.DisplayObjectContainer.prototype._maskWindow;
    }
})();
