|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| (() => {
|
| "use strict";
|
| const pluginName = "LL_MenuScreenCustom";
|
|
|
| const parameters = PluginManager.parameters(pluginName);
|
| const leftInputMode = eval(parameters["leftInputMode"] || "true");
|
| const numVisibleRows = Number(parameters["numVisibleRows"] || 2);
|
| const maxCols = Number(parameters["maxCols"] || 2);
|
| const currencyWindowPosition = String(parameters["currencyWindowPosition"] || "helpWindowRightBottom");
|
|
|
| const actorNameLH = Number(parameters["actorNameLH"] || 0);
|
| const actorLevelLH = Number(parameters["actorLevelLH"] || 1);
|
| const actorIconLH = Number(parameters["actorIconLH"] || 2);
|
| const actorClassLH = Number(parameters["actorClassLH"] || 3);
|
| const actorGaugeLH = Number(parameters["actorGaugeLH"] || 4);
|
| const lvPadding = Number(parameters["lvPadding"] || 84);
|
| const gaugeWidth = Number(parameters["gaugeWidth"] || 128);
|
|
|
| const actorNameX = Number(parameters["actorNameX"] || 0);
|
| const actorLevelX = Number(parameters["actorLevelX"] || 0);
|
| const actorIconX = Number(parameters["actorIconX"] || 0);
|
| const actorClassX = Number(parameters["actorClassX"] || 0);
|
| const actorGaugeX = Number(parameters["actorGaugeX"] || 0);
|
|
|
| const showStandingPicture = eval(parameters["showStandingPicture"] || "true");
|
| const menuWindowPictureX = Number(parameters["menuWindowPictureX"] || 0);
|
| const menuWindowPictureY = Number(parameters["menuWindowPictureY"] || 0);
|
| const menuWindowPictureScale = Number(parameters["menuWindowPictureScale"] || 100);
|
|
|
| const menuHelpWindowEnable = eval(parameters["menuHelpWindowEnable"] || "true");
|
| const menuHelpTexts = JSON.parse(parameters["menuHelpTexts"] || "null");
|
| const leftBlockLabel = String(parameters["leftBlockLabel"] || "");
|
| const leftBlockValue = String(parameters["leftBlockValue"] || "");
|
| const leftBlockAlign = String(parameters["leftBlockAlign"] || "left");
|
| const rightBlockLabel = String(parameters["rightBlockLabel"] || "");
|
| const rightBlockValue = String(parameters["rightBlockValue"] || "");
|
| const rightBlockAlign = String(parameters["rightBlockAlign"] || "right");
|
| const rightBottomBlockLabel = String(parameters["rightBottomBlockLabel"] || "");
|
| const rightBottomBlockValue = String(parameters["rightBottomBlockValue"] || "");
|
| const rightBottomBlockAlign = String(parameters["rightBottomBlockAlign"] || "left");
|
| const leftBottomBlockLabel = String(parameters["leftBottomBlockLabel"] || "");
|
| const leftBottomBlockValue = String(parameters["leftBottomBlockValue"] || "");
|
| const leftBottomBlockAlign = String(parameters["leftBottomBlockAlign"] || "left");
|
|
|
| const backgroundImages = JSON.parse(parameters["backgroundImages"] || "null");
|
|
|
| let menuHelpLists = [];
|
| if (menuHelpTexts) {
|
| menuHelpTexts.forEach((elm) => {
|
| menuHelpLists[String(JSON.parse(elm).symbol)] = String(JSON.parse(elm).helpText);
|
| });
|
| }
|
|
|
| let backgroundImageLists = [];
|
| if (backgroundImages) {
|
| backgroundImages.forEach((elm) => {
|
| backgroundImageLists.push(JSON.parse(elm));
|
| });
|
| }
|
|
|
|
|
| let menuHelpWindowLH = 1.5;
|
|
|
|
|
| const menuHelpWindowFontSize = 22;
|
|
|
| const _Scene_MenuBase_createBackground = Scene_MenuBase.prototype.createBackground;
|
| Scene_MenuBase.prototype.createBackground = function() {
|
| let sceneName = SceneManager._scene.constructor.name;
|
|
|
| let originalBackgroundImage = backgroundImageLists.find(function(item) {
|
| if (String(item.sceneName) == sceneName) return true;
|
| });
|
| if (originalBackgroundImage) {
|
|
|
| this._backgroundSprite = new Sprite();
|
| this._backgroundSprite.bitmap = ImageManager.loadSystem(originalBackgroundImage.imageName);
|
| this.addChild(this._backgroundSprite);
|
| return;
|
| }
|
| _Scene_MenuBase_createBackground.apply(this, arguments);
|
| };
|
|
|
|
|
| Scene_MenuBase.prototype.calcMenuHelpWindowHeight = function() {
|
| let height = this.calcWindowHeight(menuHelpWindowLH, false);
|
| if (!leftBlockLabel && !rightBlockLabel) height = this.calcWindowHeight(1, false);
|
| if (!menuHelpWindowEnable) height = 0;
|
| return height;
|
| };
|
|
|
| Scene_Menu.prototype.isRightInputMode = function() {
|
| return !leftInputMode;
|
| };
|
|
|
| Scene_MenuBase.prototype.createCancelButton = function() {
|
| this._cancelButton = new Sprite_Button("cancel");
|
| this._cancelButton.x = leftInputMode ? 4 : Graphics.boxWidth - this._cancelButton.width - 4;
|
| this._cancelButton.y = this.buttonY();
|
| this.addWindow(this._cancelButton);
|
| };
|
|
|
| Scene_MenuBase.prototype.createPageButtons = function() {
|
| this._pageupButton = new Sprite_Button("pageup");
|
| this._pagedownButton = new Sprite_Button("pagedown");
|
| if (leftInputMode) {
|
| this._pageupButton.x = Graphics.boxWidth - this._pageupButton.width - this._pagedownButton.width - 8;
|
| } else {
|
| this._pageupButton.x = 4;
|
| }
|
| this._pageupButton.y = this.buttonY();
|
| const pageupRight = this._pageupButton.x + this._pageupButton.width;
|
| this._pagedownButton.x = pageupRight + 4;
|
| this._pagedownButton.y = this.buttonY();
|
| this.addWindow(this._pageupButton);
|
| this.addWindow(this._pagedownButton);
|
| this._pageupButton.setClickHandler(this.previousActor.bind(this));
|
| this._pagedownButton.setClickHandler(this.nextActor.bind(this));
|
| };
|
|
|
| const _Scene_Menu_create = Scene_Menu.prototype.create;
|
| Scene_Menu.prototype.create = function() {
|
| _Scene_Menu_create.apply(this, arguments);
|
| this.createMenuHelpWindow();
|
| if (currencyWindowPosition != "menuCommandBottom") {
|
| this._goldWindow.visible = false;
|
| }
|
| };
|
|
|
| Scene_Menu.prototype.commandWindowRect = function() {
|
| const ww = this.mainCommandWidth();
|
| let wh = this.mainAreaHeight() - this.menuHelpWindowRect().height - this.goldWindowRect().height;
|
| const wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;
|
| const wy = this.mainAreaTop() + this.menuHelpWindowRect().height;
|
| if (currencyWindowPosition != "menuCommandBottom") {
|
| wh += this.goldWindowRect().height
|
| }
|
| return new Rectangle(wx-10, wy, ww-60, wh-10);
|
| };
|
|
|
| Scene_Menu.prototype.goldWindowRect = function() {
|
| const ww = this.mainCommandWidth();
|
| const wh = this.calcWindowHeight(1, true);
|
| const wx = this.isRightInputMode() ? Graphics.boxWidth - ww : 0;
|
| const wy = this.mainAreaBottom() - wh;
|
| return new Rectangle(wx-70, wy-6, ww, wh);
|
| };
|
|
|
| Scene_Menu.prototype.statusWindowRect = function() {
|
| const ww = Graphics.boxWidth - this.mainCommandWidth();
|
| const wh = this.mainAreaHeight() - this.menuHelpWindowRect().height;
|
| const wx = this.isRightInputMode() ? 0 : Graphics.boxWidth - ww;
|
| const wy = this.mainAreaTop() + this.menuHelpWindowRect().height;
|
| return new Rectangle(wx, wy+10, ww-120, wh-20);
|
| };
|
|
|
| Scene_Menu.prototype.createMenuHelpWindow = function() {
|
| const rect = this.menuHelpWindowRect();
|
| this._menuHelpWindow = new Window_MenuHelp(rect);
|
| this.addWindow(this._menuHelpWindow);
|
| };
|
|
|
| Scene_Menu.prototype.menuHelpWindowRect = function() {
|
| const wx = 0;
|
| const wy = this.mainAreaTop();
|
| const ww = Graphics.boxWidth;
|
| const wh = this.calcMenuHelpWindowHeight();
|
| return new Rectangle(wx+100, wy-10, ww-100, wh);
|
| };
|
|
|
| const _Scene_Menu_update = Scene_Menu.prototype.update;
|
| Scene_Menu.prototype.update = function() {
|
| _Scene_Menu_update.apply(this, arguments);
|
|
|
| const helpText = menuHelpLists[this._commandWindow.currentName()] ? menuHelpLists[this._commandWindow.currentName()] : "";
|
| this._menuHelpWindow.setText(helpText);
|
| };
|
|
|
| Scene_ItemBase.prototype.actorWindowRect = function() {
|
| const wx = 0;
|
| const wy = Math.min(this.mainAreaTop(), this.helpAreaTop());
|
| const ww = Graphics.boxWidth - this.mainCommandWidth();
|
| const wh = Graphics.boxHeight - this.buttonAreaHeight() - this.calcMenuHelpWindowHeight();
|
| return new Rectangle(wx, wy, ww, wh);
|
| };
|
|
|
|
|
| Window_Command.prototype.currentName = function() {
|
| return this.currentData() ? this.currentData().name : null;
|
| };
|
|
|
|
|
| Window_StatusBase.prototype.drawStandingPicture = function(
|
| pictureName, x, y, width, height, sx, sy, scaleX, scaleY
|
| ) {
|
| width = width || 200;
|
| height = height || 200;
|
| sx = sx || 0;
|
| sy = sy || 0;
|
| const bitmap = ImageManager.loadPicture(pictureName);
|
| const pw = width;
|
| const ph = height;
|
| let sw = Math.min(width, pw);
|
| let sh = Math.min(height, ph);
|
| let dx = Math.floor(x + Math.max(width - pw, 0) / 2);
|
| let dy = Math.floor(y + Math.max(height - ph, 0) / 2);
|
| let dw = Math.min(width, pw);
|
| let dh = Math.min(height, ph);
|
|
|
|
|
| if (sx < 0) {
|
| dx += sx * -1 * scaleX;
|
| sw -= sx * -1 * scaleX;
|
| dw -= sx * -1 * scaleX;
|
| sx = 0;
|
| }
|
| if (sy < 0) {
|
| dy += sy * -1 * scaleY;
|
| sh -= sy * -1 * scaleY;
|
| dh -= sy * -1 * scaleY;
|
| sy = 0;
|
| }
|
|
|
| bitmap.addLoadListener(function() {
|
| this.contents.blt(bitmap, sx, sy, sw / scaleX, sh / scaleY, dx, dy, dw, dh);
|
| }.bind(this));
|
| };
|
|
|
| Window_StatusBase.prototype.exDrawActorSimpleStatus = function(actor, x, y, width) {
|
| const lineHeight = this.lineHeight();
|
| if (actorNameLH > -1) this.drawActorName(actor, x + actorNameX, y + lineHeight * actorNameLH, width - actorNameX);
|
| if (actorLevelLH > -1 && $gameSwitches.value(102)) {
|
| this.drawActorLevel(actor, x + actorLevelX, y + lineHeight * actorLevelLH);
|
| }
|
| if (actorIconLH > -1) this.drawActorIcons(actor, x + actorIconX, y + lineHeight * actorIconLH, width - actorIconX);
|
| if (actorClassLH > -1) this.drawActorClass(actor, x + actorClassX, y + lineHeight * actorClassLH, width - actorClassX);
|
| if (actorGaugeLH > -1) this.placeBasicGauges(actor, x + actorGaugeX, y + lineHeight * actorGaugeLH);
|
| };
|
|
|
| Window_MenuStatus.prototype.drawItemImage = function(index) {
|
| const actor = this.actor(index);
|
| const rect = this.itemRect(index);
|
|
|
| this.changePaintOpacity(actor.isBattleMember());
|
|
|
| let mPicture = ExMenuScreenBase.getImageName(actor.actorId());
|
| if (mPicture && showStandingPicture) {
|
| const width = rect.width - 2;
|
| const height = rect.height - 2;
|
| const x = rect.x + 1;
|
| const y = rect.y + 1;
|
| const sx = (Number(mPicture.x) + menuWindowPictureX) * -1;
|
| const sy = (Number(mPicture.y) + menuWindowPictureY) * -1;
|
| let scaleX = Number(mPicture.scaleX) / 100;
|
| let scaleY = Number(mPicture.scaleY) / 100;
|
|
|
| scaleX *= menuWindowPictureScale / 100;
|
| scaleY *= menuWindowPictureScale / 100;
|
|
|
| if (ExMenuScreenBase.getHpRate(actor.actorId()) > Number(mPicture.pinchPercentage) || !mPicture.pinchImageName) {
|
|
|
| this.drawStandingPicture(String(mPicture.imageName), x, y, width, height, sx, sy, scaleX, scaleY);
|
| } else {
|
|
|
| this.drawStandingPicture(String(mPicture.pinchImageName), x, y, width, height, sx, sy, scaleX, scaleY);
|
| }
|
| } else {
|
| let width = ImageManager.faceWidth;
|
|
|
| if (rect.width - 2 < width) {
|
| width = rect.width - 2;
|
| }
|
| const height = rect.height - 2;
|
| const x = rect.x + rect.width - width - 1;
|
| const y = rect.y + 1;
|
| this.drawActorFace(actor, x, y, width, height);
|
| }
|
| this.changePaintOpacity(true);
|
| };
|
|
|
| Window_MenuStatus.prototype.drawItemStatus = function(index) {
|
| const actor = this.actor(index);
|
| const rect = this.itemRect(index);
|
| const x = rect.x + 2;
|
| const y = rect.y + 2;
|
| const width = rect.width - 4;
|
|
|
|
|
| const mPicture = ExMenuScreenBase.getImageName(actor.actorId());
|
| if (mPicture && showStandingPicture) {
|
| let pictureName = null;
|
|
|
| if (ExMenuScreenBase.getHpRate(actor.actorId()) > Number(mPicture.pinchPercentage) || !mPicture.pinchImageName) {
|
| pictureName = String(mPicture.imageName);
|
| } else {
|
| pictureName = String(mPicture.pinchImageName);
|
| }
|
| const bitmap = ImageManager.loadPicture(pictureName);
|
| bitmap.addLoadListener(function() {
|
| this.exDrawActorSimpleStatus(actor, x, y, width);
|
| }.bind(this));
|
| } else {
|
| this.exDrawActorSimpleStatus(actor, x, y, width);
|
| }
|
| };
|
|
|
| Window_MenuStatus.prototype.numVisibleRows = function() {
|
| return numVisibleRows;
|
| };
|
|
|
| Window_MenuStatus.prototype.maxCols = function() {
|
| return maxCols;
|
| };
|
|
|
| Window_MenuStatus.prototype.drawActorLevel = function(actor, x, y) {
|
| this.changeTextColor(ColorManager.systemColor());
|
| this.drawText(TextManager.levelA, x, y, 48);
|
| this.resetTextColor();
|
| this.drawText(actor.level, x + lvPadding, y, 36, "right");
|
| };
|
|
|
| Window_MenuStatus.prototype.refreshCursorForAll = function() {
|
| const maxItems = this.maxItems();
|
| if (maxItems > 0) {
|
| const rect = this.itemRect(0);
|
|
|
|
|
| let maxRectCnt = maxItems;
|
| if (maxRectCnt > maxCols) {
|
| maxRectCnt = Math.ceil(maxRectCnt / maxCols) * maxCols;
|
| }
|
| rect.enlarge(this.itemRect(maxRectCnt - 1));
|
|
|
| this.setCursorRect(rect.x, rect.y, rect.width, rect.height);
|
| } else {
|
| this.setCursorRect(0, 0, 0, 0);
|
| }
|
| };
|
|
|
|
|
|
|
|
|
|
|
|
|
| function Window_MenuHelp() {
|
| this.initialize(...arguments);
|
| }
|
|
|
| Window_MenuHelp.prototype = Object.create(Window_Base.prototype);
|
| Window_MenuHelp.prototype.constructor = Window_MenuHelp;
|
|
|
| Window_MenuHelp.prototype.initialize = function(rect) {
|
| Window_Base.prototype.initialize.call(this, rect);
|
| this.refresh();
|
| };
|
|
|
| Window_MenuHelp.prototype.setText = function(text) {
|
| this._text = text;
|
| this.refresh();
|
| };
|
|
|
| Window_MenuHelp.prototype.clear = function() {
|
| this.setText("");
|
| };
|
|
|
| Window_MenuHelp.prototype.refresh = function() {
|
| this.contents.clear();
|
| this.contents.fontSize = this.getFontSize();
|
|
|
| this.drawLeftBlock();
|
|
|
| this.drawRightBlock();
|
|
|
| this.drawCurrency();
|
|
|
| this.drawMenuHelp();
|
| this.contents.fontSize = $gameSystem.mainFontSize();
|
| };
|
|
|
| Window_MenuHelp.prototype.getFontSize = function() {
|
| return !leftBlockLabel && !rightBlockLabel ? $gameSystem.mainFontSize() : menuHelpWindowFontSize;
|
| };
|
|
|
| Window_MenuHelp.prototype.drawLeftBlock = function() {
|
| if (!leftBlockLabel) return;
|
| const y = -6;
|
| const oneThirdWidth = Math.floor(this.innerWidth / 3);
|
| this.changeTextColor(this.systemColor());
|
| this.drawText(leftBlockLabel, 0, y, this.contents.measureTextWidth(leftBlockLabel), leftBlockAlign);
|
| this.resetTextColor();
|
| this.drawText(eval(leftBlockValue), this.contents.measureTextWidth(leftBlockLabel), y, oneThirdWidth * 1.5 - this.contents.measureTextWidth(leftBlockLabel), leftBlockAlign);
|
| };
|
|
|
| Window_MenuHelp.prototype.drawRightBlock = function() {
|
| if (!rightBlockLabel) return;
|
| const y = -6;
|
| const oneThirdWidth = Math.floor(this.innerWidth / 3);
|
| this.changeTextColor(this.systemColor());
|
| this.drawText(rightBlockLabel, oneThirdWidth * 1.5, y, this.contents.measureTextWidth(rightBlockLabel), rightBlockAlign);
|
| this.resetTextColor();
|
| this.drawText(eval(rightBlockValue), this.contents.measureTextWidth(rightBlockLabel) + oneThirdWidth * 1.5, y, oneThirdWidth * 1.5 - this.contents.measureTextWidth(rightBlockLabel), rightBlockAlign);
|
| };
|
|
|
| Window_MenuHelp.prototype.drawCurrency = function() {
|
| const y = !leftBlockLabel && !rightBlockLabel ? 0 : 24;
|
| const oneThirdWidth = Math.floor(this.innerWidth / 3);
|
|
|
| if (currencyWindowPosition == "helpWindowRightBottom") {
|
|
|
| const currencyUnit = TextManager.currencyUnit;
|
| this.drawCurrencyValue($gameParty.gold(), currencyUnit, oneThirdWidth * 1.5, y, oneThirdWidth * 1.5);
|
| } else {
|
|
|
| if (!rightBottomBlockLabel) return;
|
| this.changeTextColor(this.systemColor());
|
| this.drawText(rightBottomBlockLabel, oneThirdWidth * 1.5, y, this.contents.measureTextWidth(rightBottomBlockLabel), rightBottomBlockAlign);
|
| this.resetTextColor();
|
| this.drawText(eval(rightBottomBlockValue), this.contents.measureTextWidth(rightBottomBlockLabel) + oneThirdWidth * 1.5, y, oneThirdWidth * 1.5 - this.contents.measureTextWidth(rightBottomBlockLabel), rightBottomBlockAlign);
|
| }
|
| };
|
|
|
| Window_MenuHelp.prototype.drawMenuHelp = function() {
|
| const y = !leftBlockLabel && !rightBlockLabel ? 0 : 24;
|
| const oneThirdWidth = Math.floor(this.innerWidth / 3);
|
|
|
| if (leftBottomBlockLabel != "") {
|
|
|
| this.changeTextColor(this.systemColor());
|
| this.drawText(leftBottomBlockLabel, 0, y, this.contents.measureTextWidth(leftBottomBlockLabel), leftBottomBlockAlign);
|
| this.resetTextColor();
|
| this.drawText(eval(leftBottomBlockValue), this.contents.measureTextWidth(leftBottomBlockLabel), y, oneThirdWidth * 1.5 - this.contents.measureTextWidth(leftBottomBlockLabel), leftBottomBlockAlign);
|
| } else {
|
|
|
| this.resetTextColor();
|
| this.drawText(this._text ? this._text : "", 0, y, this.innerWidth - oneThirdWidth * 1.5, leftBottomBlockAlign);
|
| }
|
| };
|
|
|
|
|
|
|
| const _Window_StatusBase_placeGauge = Window_StatusBase.prototype.placeGauge;
|
| Window_StatusBase.prototype.placeGauge = function(actor, type, x, y) {
|
|
|
| if (this.constructor.name === "Window_MenuStatus" || this.constructor.name === "Window_MenuActor") {
|
| const key = "actor%1-gauge-%2".format(actor.actorId(), type);
|
| const sprite = this.createInnerSprite(key, Sprite_GaugeExMenuBase);
|
| sprite.setup(actor, type);
|
| sprite.move(x, y);
|
| sprite.show();
|
| } else {
|
| _Window_StatusBase_placeGauge.apply(this, arguments);
|
| }
|
| };
|
|
|
|
|
|
|
|
|
|
|
|
|
| function Sprite_GaugeExMenuBase() {
|
| this.initialize(...arguments);
|
| }
|
|
|
| Sprite_GaugeExMenuBase.prototype = Object.create(Sprite_Gauge.prototype);
|
| Sprite_GaugeExMenuBase.prototype.constructor = Sprite_GaugeExMenuBase;
|
|
|
| Sprite_GaugeExMenuBase.prototype.bitmapWidth = function() {
|
| return gaugeWidth;
|
| };
|
| })();
|
|
|