赞 | 1 |
VIP | 0 |
好人卡 | 0 |
积分 | 12 |
经验 | 4019 |
最后登录 | 2024-10-23 |
在线时间 | 153 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1246
- 在线时间
- 153 小时
- 注册时间
- 2006-2-12
- 帖子
- 226
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
如图我的立绘被切头了,插件预留的js定义的代码如下:// Declare Constants
const maxExp = '-------';
const lineHeight = this.lineHeight();
const gaugeLineHeight = this.gaugeLineHeight();
const basicDataHeight = lineHeight * 6.5;
const actor = this._actor;
const padding = this.itemPadding();
const halfWidth = this.innerWidth / 2;
let rect = new Rectangle(0, 0, halfWidth, this.innerHeight);
let x = 0;
let y = 0;
// Draw Actor Graphic
this.drawActorGraphic(0, this.innerWidth / 2);
// Declare Smaller Data Area
let sx = rect.x;
let sy = Math.max(rect.y, rect.y + (rect.height - basicDataHeight));
let sw = rect.width;
let sh = rect.y + rect.height - sy;
// Draw Actor Name
this.drawItemDarkRect(0, sy, sw, lineHeight, 2);
this.drawText(actor.name(), sx, sy, sw, 'center');
// Draw Actor Level
sx = rect.x + Math.round((rect.width - 128) / 2);
sy += lineHeight;
this.drawItemDarkRect(0, sy, sw, lineHeight);
this.drawActorLevel(actor, sx, sy);
// Draw Actor Class
const className = actor.currentClass().name;
sx = rect.x + Math.round((rect.width - this.textSizeEx(className).width) / 2);
sy += lineHeight;
this.drawItemDarkRect(0, sy, sw, lineHeight);
this.drawTextEx(className, sx, sy, sw);
// Draw Actor Icons
sx = rect.x + Math.round((rect.width - 144) / 2);
sy += lineHeight;
this.drawItemDarkRect(0, sy, sw, lineHeight);
this.drawActorIcons(actor, sx, sy);
// Draw Gauges
sx = rect.x + Math.round((rect.width - 128) / 2);
sy += lineHeight;
this.drawItemDarkRect(0, sy, sw, this.innerHeight - sy);
this.placeGauge(actor, "hp", sx, sy);
sy += gaugeLineHeight;
this.placeGauge(actor, "mp", sx, sy);
sy += gaugeLineHeight;
if ($dataSystem.optDisplayTp) {
this.placeGauge(actor, "tp", sx, sy);
}
// Declare Second Half
rect = new Rectangle(halfWidth, 0, halfWidth, this.innerHeight);
// Draw EXP
this.changeTextColor(ColorManager.systemColor());
this.drawItemDarkRect(rect.x, rect.y, rect.width, lineHeight, 2);
this.drawText(TextManager.exp, rect.x, rect.y, rect.width, 'center');
const expHeight = lineHeight * 5;
this.drawItemDarkRect(rect.x, rect.y + lineHeight * 1, rect.width, lineHeight * 2);
this.drawItemDarkRect(rect.x, rect.y + lineHeight * 3, rect.width, lineHeight * 2);
const expTotal = TextManager.expTotal.format(TextManager.exp);
const expNext = TextManager.expNext.format(TextManager.level);
this.changeTextColor(ColorManager.systemColor());
this.drawText(expTotal, rect.x + padding, rect.y + lineHeight * 1, rect.width - padding * 2);
this.drawText(expNext, rect.x + padding, rect.y + lineHeight * 3, rect.width - padding * 2);
this.resetTextColor();
const expTotalValue = actor.currentExp();
const expNextValue = actor.isMaxLevel() ? maxExp : actor.nextRequiredExp();
this.drawText(expTotalValue, rect.x + padding, rect.y + lineHeight * 1, rect.width - padding * 2, 'right');
this.drawText(expNextValue, rect.x + padding, rect.y + lineHeight * 3, rect.width - padding * 2, 'right');
// Declare Parameters
const params1 = this.getParameterList(1);
const nameWidth = rect.width - padding * 2 - this.textWidth('88888');
// Draw Parameters 1
x = rect.x + padding;
y = rect.y + expHeight;
this.changeTextColor(ColorManager.systemColor());
this.drawItemDarkRect(rect.x, y, rect.width, lineHeight, 2);
this.drawText(TextManager.statusMenuBiography, rect.x, y, rect.width, 'center');
this.resetTextColor();
paramWidth = rect.width - (padding * 2);
for (const paramId of params1) {
this.changeTextColor(ColorManager.systemColor());
this.drawItemDarkRect(rect.x, y + lineHeight * 1, rect.width, lineHeight);
this.drawParamName(paramId, x, y + lineHeight * 1, nameWidth);
this.resetTextColor();
this.drawParamValue(paramId, x, y + lineHeight * 1, paramWidth);
y += lineHeight;
}
this.drawItemDarkRect(rect.x, y, rect.width, this.innerHeight - y);
// Declare Constants
const maxExp = '-------';
const lineHeight = this.lineHeight();
const gaugeLineHeight = this.gaugeLineHeight();
const basicDataHeight = lineHeight * 6.5;
const actor = this._actor;
const padding = this.itemPadding();
const halfWidth = this.innerWidth / 2;
let rect = new Rectangle(0, 0, halfWidth, this.innerHeight);
let x = 0;
let y = 0;
// Draw Actor Graphic
this.drawActorGraphic(0, this.innerWidth / 2);
// Declare Smaller Data Area
let sx = rect.x;
let sy = Math.max(rect.y, rect.y + (rect.height - basicDataHeight));
let sw = rect.width;
let sh = rect.y + rect.height - sy;
// Draw Actor Name
this.drawItemDarkRect(0, sy, sw, lineHeight, 2);
this.drawText(actor.name(), sx, sy, sw, 'center');
// Draw Actor Level
sx = rect.x + Math.round((rect.width - 128) / 2);
sy += lineHeight;
this.drawItemDarkRect(0, sy, sw, lineHeight);
this.drawActorLevel(actor, sx, sy);
// Draw Actor Class
const className = actor.currentClass().name;
sx = rect.x + Math.round((rect.width - this.textSizeEx(className).width) / 2);
sy += lineHeight;
this.drawItemDarkRect(0, sy, sw, lineHeight);
this.drawTextEx(className, sx, sy, sw);
// Draw Actor Icons
sx = rect.x + Math.round((rect.width - 144) / 2);
sy += lineHeight;
this.drawItemDarkRect(0, sy, sw, lineHeight);
this.drawActorIcons(actor, sx, sy);
// Draw Gauges
sx = rect.x + Math.round((rect.width - 128) / 2);
sy += lineHeight;
this.drawItemDarkRect(0, sy, sw, this.innerHeight - sy);
this.placeGauge(actor, "hp", sx, sy);
sy += gaugeLineHeight;
this.placeGauge(actor, "mp", sx, sy);
sy += gaugeLineHeight;
if ($dataSystem.optDisplayTp) {
this.placeGauge(actor, "tp", sx, sy);
}
// Declare Second Half
rect = new Rectangle(halfWidth, 0, halfWidth, this.innerHeight);
// Draw EXP
this.changeTextColor(ColorManager.systemColor());
this.drawItemDarkRect(rect.x, rect.y, rect.width, lineHeight, 2);
this.drawText(TextManager.exp, rect.x, rect.y, rect.width, 'center');
const expHeight = lineHeight * 5;
this.drawItemDarkRect(rect.x, rect.y + lineHeight * 1, rect.width, lineHeight * 2);
this.drawItemDarkRect(rect.x, rect.y + lineHeight * 3, rect.width, lineHeight * 2);
const expTotal = TextManager.expTotal.format(TextManager.exp);
const expNext = TextManager.expNext.format(TextManager.level);
this.changeTextColor(ColorManager.systemColor());
this.drawText(expTotal, rect.x + padding, rect.y + lineHeight * 1, rect.width - padding * 2);
this.drawText(expNext, rect.x + padding, rect.y + lineHeight * 3, rect.width - padding * 2);
this.resetTextColor();
const expTotalValue = actor.currentExp();
const expNextValue = actor.isMaxLevel() ? maxExp : actor.nextRequiredExp();
this.drawText(expTotalValue, rect.x + padding, rect.y + lineHeight * 1, rect.width - padding * 2, 'right');
this.drawText(expNextValue, rect.x + padding, rect.y + lineHeight * 3, rect.width - padding * 2, 'right');
// Declare Parameters
const params1 = this.getParameterList(1);
const nameWidth = rect.width - padding * 2 - this.textWidth('88888');
// Draw Parameters 1
x = rect.x + padding;
y = rect.y + expHeight;
this.changeTextColor(ColorManager.systemColor());
this.drawItemDarkRect(rect.x, y, rect.width, lineHeight, 2);
this.drawText(TextManager.statusMenuBiography, rect.x, y, rect.width, 'center');
this.resetTextColor();
paramWidth = rect.width - (padding * 2);
for (const paramId of params1) {
this.changeTextColor(ColorManager.systemColor());
this.drawItemDarkRect(rect.x, y + lineHeight * 1, rect.width, lineHeight);
this.drawParamName(paramId, x, y + lineHeight * 1, nameWidth);
this.resetTextColor();
this.drawParamValue(paramId, x, y + lineHeight * 1, paramWidth);
y += lineHeight;
}
this.drawItemDarkRect(rect.x, y, rect.width, this.innerHeight - y);
|
|