3 GP
3、AddStatusWindow
作者:水無月冰鏡_水水│2014-01-12 01:27:56│巴幣:6│人氣:212
/*-----------------------------------------------------------------------------------------------
MP(EP)とFPの表示項目設定とウィンドウ描画設定スクリプトです。
使用方法:
ユニットやクラスにパラメータを設定してください。
(パーセント指定可のものは数値以外に'10%'という風に
設定する事でパーセント指定する事が可能です)
作成者:
o-to
更新履歴:
2016/01/06:新規作成
2016/01/11:
所持アイテムが満杯じゃないユニットとのアイテム交換時にエラーとなる不具合修整
リアルタイム戦闘時、EP・FPが攻撃途中で途切れる戦闘だとモーションが狂う不具合修整
CB氏のクラス説明スクリプトと競合しないようにEPとFPの描画を修正
--------------------------------------------------------------------------*/
(function() {
// EPゲージ素材や表記名の宣言
OT_EPFrameSetting = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge.png'
, GaugeImg2 : 'Gauge2.png'
, GaugeImgID : 1
, GaugeImgX : 8
, GaugeImgY : -38
, GaugeImgWidth : 100
, DrawSide : true
, FontColor : 0x00ffff
};
OT_EPFrameSetting1 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge1.png'
, GaugeImg2 : 'Gauge2.png'
, GaugeImgID : 1
, GaugeImgX : 8
, GaugeImgY : -38
, GaugeImgWidth : 100
, GaugeImgHeight: 100
, DrawSide : true
, FontColor : 0x00ffff
};
Start = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge4.png'
, GaugeImg2 : 'Gauge4.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 100
, GaugeImgHeight: 100
, DrawSide : true
, FontColor : 0x00ffff
};
Select = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge5.png'
, GaugeImg2 : 'Gauge5.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 100
, GaugeImgHeight: 100
, DrawSide : true
, FontColor : 0x00ffff
};
None = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge6.png'
, GaugeImg2 : 'Gauge6.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 100
, GaugeImgHeight: 100
, DrawSide : true
, FontColor : 0x00ffff
};
OT_EPFrameSetting2 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge4.png'
, GaugeImg2 : 'Gauge4.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 100
, GaugeImgHeight: 100
, DrawSide : true
, FontColor : 0x00ffff
};
// FPゲージ素材や表記名の宣言
OT_FPFrameSetting = {
Name : 'FP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge.png'
, GaugeImg2 : 'Gauge2.png'
, GaugeImgID : 2
, GaugeImgX : 8
, GaugeImgY : -24
, GaugeImgWidth : 100
, DrawSide : true
, FontColor : 0xffa000
, CheckString : ''
, UseString : '(消費)'
};
// フレーム素材の宣言
OT_EnergyFrameSetting = {
Material : 'OT_AddStatus'
, WindowImg : 'window.png'
, WindowWidth : 300
, WindowHeight : 32
};
// マップ内でのフレーム素材の宣言
OT_SimpleFrameSetting = {
Material : 'OT_AddStatus'
, WindowImg : 'window2.png'
, WindowHeight : 24
, GaugeImg : 'Gauge2.png'
, GaugeImgX : 54
, GaugeImgY : 5
, GaugeImgWidth : 60
, GaugeImgEpID : 1
, GaugeImgFpID : 2
};
None1 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge3.png'
, GaugeImg2 : 'Gauge3.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 100
, GaugeImgHeight: 100
, DrawSide : true
, FontColor : 0x00ffff
};
None2 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge7.png'
, GaugeImg2 : 'Gauge7.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 100
, GaugeImgHeight: 100
, DrawSide : true
, FontColor : 0x00ffff
};
None3 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge0.png'
, GaugeImg2 : 'Gauge0.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None4 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge8.png'
, GaugeImg2 : 'Gauge8.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
OT_EPFrameSetting4 = {
Name : 'FP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge9.png'
, GaugeImg2 : 'Gauge9.png'
, GaugeImgID : 2
, GaugeImgX : 8
, GaugeImgY : -24
, GaugeImgWidth : 100
, DrawSide : true
, FontColor : 0xffa000
, CheckString : ''
, UseString : '(消費)'
};
None5 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge10.png'
, GaugeImg2 : 'Gauge10.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None6 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge11.png'
, GaugeImg2 : 'Gauge11.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None7 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge12.png'
, GaugeImg2 : 'Gauge12.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
OT_EPFrameSetting5 = {
Name : 'FP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge13.png'
, GaugeImg2 : 'Gauge13.png'
, GaugeImgID : 2
, GaugeImgX : 8
, GaugeImgY : -24
, GaugeImgWidth : 100
, DrawSide : true
, FontColor : 0xffa000
, CheckString : ''
, UseString : '(消費)'
};
OT_EPFrameSetting14 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge14.png'
, GaugeImg2 : 'Gauge14.png'
, GaugeImgID : 1
, GaugeImgX : 8
, GaugeImgY : -38
, GaugeImgWidth : 100
, GaugeImgHeight: 100
, DrawSide : true
, FontColor : 0x00ffff
};
None15= {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge15.png'
, GaugeImg2 : 'Gauge15.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None16 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge16.png'
, GaugeImg2 : 'Gauge16.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None17 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge17.png'
, GaugeImg2 : 'Gauge17.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None18 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge18.png'
, GaugeImg2 : 'Gauge18.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None19 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge19.png'
, GaugeImg2 : 'Gauge19.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None20 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge20.png'
, GaugeImg2 : 'Gauge20.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None21 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge21.png'
, GaugeImg2 : 'Gauge21.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None22 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge22.png'
, GaugeImg2 : 'Gauge22.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None23 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge23.png'
, GaugeImg2 : 'Gauge23.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None24 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge24.png'
, GaugeImg2 : 'Gauge24.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None25 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge25.png'
, GaugeImg2 : 'Gauge25.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None26 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge26.png'
, GaugeImg2 : 'Gauge26.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None27 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge27.png'
, GaugeImg2 : 'Gauge27.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None28 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge28.png'
, GaugeImg2 : 'Gauge28.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None29 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge29.png'
, GaugeImg2 : 'Gauge29.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None30 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge30.png'
, GaugeImg2 : 'Gauge30.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None31 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge31.png'
, GaugeImg2 : 'Gauge31.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
None32 = {
Name : 'EP'
, Material : 'OT_AddStatus'
, GaugeImg : 'Gauge32.png'
, GaugeImg2 : 'Gauge32.png'
, GaugeImgID : 1
, GaugeImgX : 0
, GaugeImgY : 0
, GaugeImgWidth : 220
, GaugeImgHeight: 22
, DrawSide : true
, FontColor : 0x00ffff
};
/////////////////////////////////////////////
// EP・FP用のウィンドウを作成する
var alias900 = UnitMenuTopWindow.drawWindow;
UnitMenuTopWindow.drawWindow = function(x, y)
{
var width = OT_EnergyFrameSetting.WindowWidth;
var height = OT_EnergyFrameSetting.WindowHeight;
var pic = root.getMaterialManager().createImage(OT_EnergyFrameSetting.Material, OT_EnergyFrameSetting.WindowImg);
WindowRenderer.drawStretchWindow(x, y - height, width, height + 2, pic);
alias900.call(this, x, y);
};
// ユニットにカーソルを当てた時のミニウィンドウにEPとFPを表示
var alias901 = UnitSimpleRenderer.drawContent;
UnitSimpleRenderer.drawContent = function(x, y, unit, textui)
{
alias901.call(this, x, y, unit, textui);
var width = MapParts.UnitInfo._getWindowWidth();
var height = OT_SimpleFrameSetting.WindowHeight;
var pic = root.getMaterialManager().createImage(OT_SimpleFrameSetting.Material, OT_SimpleFrameSetting.WindowImg);
var d = root.getGameAreaHeight() / 2;
x -= DefineControl.getFaceXPadding();
y -= DefineControl.getFaceYPadding();
if(d < y)
{
y -= height;
}
else
{
y += MapParts.UnitInfo._getWindowHeight();
}
WindowRenderer.drawStretchWindow(x, y, width, height, pic);
var pic2 = root.getMaterialManager().createImage(OT_SimpleFrameSetting.Material, OT_SimpleFrameSetting.GaugeImg);
x += 4;
if(typeof UnitParameter.MEP !== 'undefined')
{
ContentRenderer.drawUnitEpZoneSimple(x, y, unit, pic2);
x += MapParts.UnitInfo._getWindowWidth() / 2;
}
if(typeof UnitParameter.MFP !== 'undefined')
{
ContentRenderer.drawUnitFpZoneSimple(x, y, unit, pic2);
}
};
// EPゲージ描写(シンプル版)
ContentRenderer.drawUnitEpZoneSimple = function(x, y, unit, pic) {
var ep = OT_GetNowEP(unit);
var mep = ParamBonus.getEp(unit);
this.drawEpSimple(x, y, ep, mep);
x += OT_SimpleFrameSetting.GaugeImgX;
y += OT_SimpleFrameSetting.GaugeImgY;
this.drawGauge(x, y, ep, mep, OT_SimpleFrameSetting.GaugeImgEpID, OT_SimpleFrameSetting.GaugeImgWidth, pic);
};
// EP数値描写(シンプル版)
ContentRenderer.drawEpSimple = function(x, y, ep, maxEp) {
var textEp = UnitParameter.MEP.getParameterName();
var dx = [0, 44];
TextRenderer.drawSignText(x + dx[0], y, textEp);
NumberRenderer.drawNumber(x + dx[1], y, ep);
};
// FPゲージ描写(シンプル版)
ContentRenderer.drawUnitFpZoneSimple = function(x, y, unit, pic) {
var fp = OT_GetNowFP(unit);
var mfp = ParamBonus.getFp(unit);
this.drawFpSimple(x, y, fp, mfp);
x += OT_SimpleFrameSetting.GaugeImgX;
y += OT_SimpleFrameSetting.GaugeImgY;
this.drawGauge(x, y, fp, mfp, OT_SimpleFrameSetting.GaugeImgFpID, OT_SimpleFrameSetting.GaugeImgWidth, pic);
};
// FP数値描写(シンプル版)
ContentRenderer.drawFpSimple = function(x, y, fp, maxFp) {
var textFp = UnitParameter.MFP.getParameterName();
var dx = [0, 44];
TextRenderer.drawSignText(x + dx[0], y+1, textFp);
NumberRenderer.drawNumber(x + dx[1], y, fp);
};
//メニューにEPを表示
var alias2 = UnitMenuTopWindow.drawWindowContent;
UnitMenuTopWindow.drawWindowContent = function(x, y) {
alias2.call(this, x, y);
if(typeof UnitParameter.MEP !== 'undefined')
{
this._drawUnitEp(x, y);
}
};
// EP描写
UnitMenuTopWindow._drawUnitEp = function(xBase, yBase) {
var x = xBase + OT_EPFrameSetting.GaugeImgX;
var y = yBase + OT_EPFrameSetting.GaugeImgY;
var pic = root.getMaterialManager().createImage(OT_EPFrameSetting.Material, OT_EPFrameSetting.GaugeImg);
// ContentRenderer.drawUnitEpZone(x, y, this._unit, pic);
};
// ゲージ描写
ContentRenderer.drawUnitEpZone = function(x, y, unit, pic) {
var ep = OT_GetNowEP(unit);
var mep = ParamBonus.getEp(unit);
var rep = OT_GetEPRecoveryAll(unit);
var x2,y2;
if( !OT_FPFrameSetting.DrawSide )
{
x2 = x;
y2 = y + 20;
}
else
{
x = x;
y = y;
x2 = x + 160;
y2 = y + 6;
}
this.drawEp(x, y, ep, mep, rep);
this.drawGauge(x2, y2, ep, mep, OT_EPFrameSetting.GaugeImgID, OT_EPFrameSetting.GaugeImgWidth, pic);
};
// 数値描写
ContentRenderer.drawEp = function(x, y, ep, maxEp, RecoveryEp) {
var textEp = UnitParameter.MEP.getParameterName();
var textSlash = '/';
var textRecovery = '(' + RecoveryEp + ')';
var dx = [0, 44, 60, 98, 106];
var textui = InfoWindow.getWindowTextUI();
var color = textui.getColor();
var font = textui.getFont();
TextRenderer.drawSignText(x + dx[0], y, textEp);
NumberRenderer.drawNumber(x + dx[1], y, ep);
TextRenderer.drawSignText(x + dx[2], y, textSlash);
NumberRenderer.drawNumber(x + dx[3], y, maxEp);
TextRenderer.drawKeywordText(x + dx[4], y+1, textRecovery, -1, OT_EPFrameSetting.FontColor, font);
};
// アイテム名の下に消費EPを表示
var alias3 = ItemListScrollbar.drawScrollContent;
ItemListScrollbar.drawScrollContent = function(x, y, object, isSelect, index)
{
alias3.call(this, x, y, object, isSelect, index);
if(typeof UnitParameter.MEP !== 'undefined')
{
var color = OT_EPFrameSetting.FontColor;
var color2 = 0x000000;
var textui = this.getParentTextUI();
var font = textui.getFont();
var iconWidth = GraphicsFormat.ICON_WIDTH + 5;
var height = 13;
var numEP = OT_GetStringUseEP(object);
if(numEP != 0)
{
var text = OT_EPFrameSetting.Name + numEP;
x += OT_EPFrameSetting.TextX;
y += OT_EPFrameSetting.TextY;
TextRenderer.drawKeywordText(x + iconWidth + 1, y + height +1, text, -1, color2, font);
TextRenderer.drawKeywordText(x + iconWidth, y + height, text, -1, color, font);
}
}
};
//メニューにFPを表示
var alias4 = UnitMenuTopWindow.drawWindowContent;
UnitMenuTopWindow.drawWindowContent = function(x, y) {
alias4.call(this, x, y);
if(typeof UnitParameter.MFP !== 'undefined')
{
this._drawUnitFp(x, y);
}
};
// FP描写
UnitMenuTopWindow._drawUnitFp = function(xBase, yBase) {
var x = xBase + OT_FPFrameSetting.GaugeImgX;
var y = yBase + OT_FPFrameSetting.GaugeImgY;
var pic = root.getMaterialManager().createImage(OT_FPFrameSetting.Material, OT_FPFrameSetting.GaugeImg);
// ContentRenderer.drawUnitFpZone(x, y, this._unit, pic);
};
// ゲージ描写
ContentRenderer.drawUnitFpZone = function(x, y, unit, pic) {
var fp = OT_GetNowFP(unit);
var mfp = ParamBonus.getFp(unit);
var rfp = OT_GetFPRecoveryAll(unit);
var x2,y2;
if( !OT_FPFrameSetting.DrawSide )
{
x2 = x;
y2 = y + 20;
}
else
{
x = x;
y = y;
x2 = x + 160;
y2 = y + 6;
}
this.drawFp(x, y, fp, mfp, rfp);
this.drawGauge(x2, y2, fp, mfp, OT_FPFrameSetting.GaugeImgID, OT_FPFrameSetting.GaugeImgWidth, pic);
};
// 数値描写
ContentRenderer.drawFp = function(x, y, fp, maxFp, RecoveryFp) {
var textFp = UnitParameter.MFP.getParameterName();
var textSlash = '/';
var textRecovery = '(' + RecoveryFp + ')';
var dx = [0, 44, 60, 98, 106];
var textui = InfoWindow.getWindowTextUI();
var color = textui.getColor();
var font = textui.getFont();
TextRenderer.drawSignText(x + dx[0], y+1, textFp);
NumberRenderer.drawNumber(x + dx[1], y, fp);
TextRenderer.drawSignText(x + dx[2], y, textSlash);
NumberRenderer.drawNumber(x + dx[3], y, maxFp);
TextRenderer.drawKeywordText(x + dx[4], y+1, textRecovery, -1, OT_FPFrameSetting.FontColor, font);
};
// アイテム名の下に消費FPを表示
var alias5 = ItemListScrollbar.drawScrollContent;
ItemListScrollbar.drawScrollContent = function(x, y, object, isSelect, index)
{
alias5.call(this, x, y, object, isSelect, index);
if(typeof UnitParameter.MFP !== 'undefined')
{
var color = OT_FPFrameSetting.FontColor;
var color2 = 0x000000;
var textui = this.getParentTextUI();
var font = textui.getFont();
var iconWidth = GraphicsFormat.ICON_WIDTH + 5;
var height = 13;
var numEP = 0;
var numFP = OT_GetStringUseFP(object);
var text = '';
if(typeof OT_GetStringUseEP !== 'undefined') numEP = OT_GetStringUseEP(object);
// EPが存在していたら右側にずらす
if(numEP != 0)
{
iconWidth += 50;
}
if(numFP != 0)
{
text = OT_FPFrameSetting.Name + numFP;
if( OT_GetCheckOnlyFP(object) )
{
text += OT_FPFrameSetting.CheckString;
}
else
{
text += OT_FPFrameSetting.UseString;
}
x += OT_FPFrameSetting.TextX;
y += OT_FPFrameSetting.TextY;
TextRenderer.drawKeywordText(x + iconWidth + 1, y + height +1, text, -1, color2, font);
TextRenderer.drawKeywordText(x + iconWidth, y + height, text, -1, color, font);
}
}
};
var ailas6 = UnitStatusScrollbar._isParameterDisplayable;
UnitStatusScrollbar._isParameterDisplayable = function(index)
{
// ユニットメニューでの表示ではEPを取り除く
if (ParamGroup.getParameterType(index) === ParamType.MEP) {
return false;
}
// ユニットメニューでの表示ではFPを取り除く
if (ParamGroup.getParameterType(index) === ParamType.MFP) {
return false;
}
return ailas6.call(this, index);
};
})();
引用網址:https://home.gamer.com.tw/TrackBack.php?sn=2306768
All rights reserved. 版權所有,保留一切權利