創作內容

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. 版權所有,保留一切權利

相關創作

留言共 0 篇留言

我要留言提醒:您尚未登入,請先登入再留言

3喜歡★hjklhjklhjka 可決定是否刪除您的留言,請勿發表違反站規文字。

前一篇:魔王與女勇者的前世※42... 後一篇:魔王與女勇者的前世※43...

追蹤私訊切換新版閱覽

作品資料夾

┌───幼獅職訓遊戲開發─── (0)

├Vmware (0)

├Linux系統 (0)

├資料庫系統 (0)

├Windows系統 (0)

├Cisco網路 (0)

├網路概論 (0)

├程式語言 (2)

├遊戲腳本語言 (0)

├AR/VR (0)

├Unity (0)

├架構整合&專題製作 (0)

└───幼獅職訓遊戲開發─── (0)

┌───SrpgStudio─── (0)
├其一、測試製作的進度報告 (11)
├其二、修改的圖片部分素材 (8)
├其三、修改未分類文章 (25)

└───SrpgStudio─── (0)

┌────自創輕小說區──── (0)

├無敵爸媽俏女兒 (0)

├【新】這才不是我想要的異世界之旅! (0)
├其零、前言 (1)
├其一、序章 (2)
├其二、初始之地 (2)

├【再編】魔王與女勇者的前世 (1)
├其一、魔王是神族?勇者是女武神? (8)
├其二、洛基現身?諸神黃昏的前兆? (9)
├其三、新婚鬧劇?女武神們的日常? (8)
├其四、恐怖情人?史維特萊德的戀情? (8)
├其五、新的姿態?歐菲斯的決意? (5)
├其六、新的力量?威德克的抉擇? (0)
├其六、時空之謎?瓦爾特洛德的感情? (9)
├其七、我們的女兒?時空女神的覺醒? (9)
├其八、愉快的家族生活?最後的幸福? (9)
└其九、世界開始崩壞?女武神的試煉? (8)

├魔王與女勇者的前世2 (0)
├其一、序章篇 (9)
├其零、故事大綱與角色設定介紹 (4)
└其二、日常篇其1 (2)

├糟糕魔王與糊塗的公主們 (0)
├其一、序章 (5)
├其二、第一章 (6)
├其三、第二章 (5)

├那天我所遇見的她 (暫停更新) (8)
├其一、序章 (2)

├戰極姬之夢 (暫停更新) (25)

├小說角色設定 (大部分人設置放) (6)

└────自創輕小說區──── (0)

┌────個人興趣區──── (0)

├小屋心得 (6)

├隨時幻想 (16)

├ニコニコ動画相關 (2)

├我所看過的動畫之一 (10)

├隨手練畫塗鴉 (24)

├現實心得 (24)

└────個人興趣區──── (0)

┌────學習區──── (0)

├Java相關 (2)

├Unity相關 (2)

└────學習區──── (0)

未分類 (12)

kktwtwyufoo大家
魔法世界的記事更新了,歡迎大家有空的話記得,來我的小屋走走看看唄!看更多我要大聲說4小時前


face基於日前微軟官方表示 Internet Explorer 不再支援新的網路標準,可能無法使用新的應用程式來呈現網站內容,在瀏覽器支援度及網站安全性的雙重考量下,為了讓巴友們有更好的使用體驗,巴哈姆特即將於 2019年9月2日 停止支援 Internet Explorer 瀏覽器的頁面呈現和功能。
屆時建議您使用下述瀏覽器來瀏覽巴哈姆特:
。Google Chrome(推薦)
。Mozilla Firefox
。Microsoft Edge(Windows10以上的作業系統版本才可使用)

face我們了解您不想看到廣告的心情⋯ 若您願意支持巴哈姆特永續經營,請將 gamer.com.tw 加入廣告阻擋工具的白名單中,謝謝 !【教學】