var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError( "Class extends value " + String(b) + " is not a constructor or null" ); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : ((__.prototype = b.prototype), new __()); }; })(); var Window_MakeAvJacket = /** @class */ (function (_super) { __extends(Window_MakeAvJacket, _super); function Window_MakeAvJacket(screenShot) { var _this = this; var r = new Rectangle(830, 0, 380, 120); _this = _super.call(this, r) || this; _this._avSprite = new Sprite_AvScreenShotPreview(screenShot); _this._avSprite.x = 14; _this._avSprite.y = 14; _this.addChild(_this._avSprite); _this.contents.fontSize = 22; _this.drawText(TextManager.shootJacket1, 160, 10, 180); _this.drawText(TextManager.shootJacket2, 160, 40, 180); _this._waitTime = 60; return _this; } Window_MakeAvJacket.prototype.update = function () { _super.prototype.update.call(this); this.updateFade(); this.updateWait(); }; Window_MakeAvJacket.prototype.updateWait = function () { if (this._waitTime > 0) { this._waitTime--; if (this._waitTime == 0) { this._fadeTime = this.maxFadeTime(); } } }; Window_MakeAvJacket.prototype.maxFadeTime = function () { return 40; }; Window_MakeAvJacket.prototype.updateFade = function () { if (this._fadeTime > 0) { this._fadeTime--; this.opacity = (this._fadeTime / this.maxFadeTime()) * 255; this._avSprite.opacity = this.opacity; this.contentsOpacity = this.opacity; if (this._fadeTime == 0) { if (this.parent) { this.parent.removeChild(this); this.destroy(); } } } }; return Window_MakeAvJacket; })(Window_Base); Window_Message.prototype.isTriggered = function () { if (isSkipKey()) { return true; } if ($gameSystem.isEroEvent()) { if (TouchInput.isRepeated()) { if (TouchInput.x > 1200) { if (TouchInput.y < 50) { // 撮影ボタンでメッセージ送りにしない処理 return false; } } } } return ( Input.isRepeated("ok") || Input.isRepeated("cancel") || TouchInput.isRepeated() ); }; var Sprite_AvScreenShotPreview = /** @class */ (function (_super) { __extends(Sprite_AvScreenShotPreview, _super); function Sprite_AvScreenShotPreview(ss) { var _this = _super.call(this) || this; _this._ss = ss; if (!ss) { console.error("ss is null"); } _this.makeJacket(); return _this; } Sprite_AvScreenShotPreview.prototype.makeJacket = function () { var renderTexture = $gameTemp.getActorBitmapBodyCache(1); var ss = new PIXI.Sprite(); //this._sprite = new PIXI.Sprite(); //this.addChild(this._sprite); var list = this._ss.eroImageList(); if (list.length == 0) { console.error("撮影するものがありません"); return; } for (var _i = 0, list_1 = list; _i < list_1.length; _i++) { var file = list_1[_i]; var f = "av_" + file; var t = PIXI.utils.TextureCache[f]; if (!t) { console.error(f + "のAV Jacketファイルが見つかりません"); continue; } var s = new PIXI.Sprite(t); ss.addChild(s); if ($gameVariables.value(49) > 0) { if (t.textureCacheIds.length > 0) { if (t.textureCacheIds[0].includes("man")) { var s2 = new PIXI.Sprite(t); ss.addChild(s2); setManColorFilter($gameVariables.value(49), s2); } } } } try { var renderer = Graphics.app.renderer; renderer.render(ss, renderTexture); var sprite = new PIXI.Sprite(renderTexture); this._sprite = sprite; this.addChild(this._sprite); } catch (e) { console.error(e); } }; Sprite_AvScreenShotPreview.prototype.spriteHight = function () { return 92; }; Sprite_AvScreenShotPreview.prototype.destroy = function () { this.removeChild(this._sprite); _super.prototype.destroy.call(this); }; return Sprite_AvScreenShotPreview; })(Sprite);