Eu estive a criar essa:
//-----------------------------------------------------------------------------
// Window_Hud
//
// The window for displaying the party's gold.
function Window_Hud() {
this.initialize.apply(this, arguments);
}
Window_Hud.prototype = Object.create(Window_Base.prototype);
Window_Hud.prototype.constructor = Window_Hud;
Window_Hud.prototype.initialize = function(x, y) {
var width = this.windowWidth();
var height = this.windowHeight();
Window_Base.prototype.initialize.call(this, x, y, width, height);
this.refresh();
};
Window_Hud.prototype.Hp = function() {
width = SceneManager._screenWidth * 0.25;
x=0;
y=50;
var actor = $gameParty.members()[0];
var color1 = this.hpGaugeColor1();
var color2 = this.hpGaugeColor2();
this.drawGauge(x, 0, width, actor.hpRate(), this.textColor(10), this.textColor(2));
this.changeTextColor(this.systemColor());
this.drawText(TextManager.hpA, x, 0, 44);
this.drawCurrentAndMax(actor.hp, actor.mhp, x, 0, width,
this.hpColor(actor), this.normalColor());
this.drawGauge(x, y, width, actor.mpRate(), color1, color2);
this.changeTextColor(this.systemColor());
this.drawText(TextManager.mpA, x, y, 100);
this.drawCurrentAndMax(actor.mp, actor.mmp, x, y, width,
this.mpColor(actor), this.normalColor());
};
Window_Hud.prototype.windowWidth = function() {
return SceneManager._screenWidth * 0.3;
};
Window_Hud.prototype.windowHeight = function() {
return SceneManager._screenHeight * 0.2;
};
Window_Hud.prototype.refresh = function() {
var x = this.textPadding();
var width = this.contents.width - this.textPadding() * 2;
this.contents.clear();
this.contents.drawText(this.Hp(), 0, 0, width, this.lineHeight(), 'left');
};
;
Window_Hud.prototype.open = function() {
this.refresh();
Window_Base.prototype.open.call(this);
};
var oldSceneMap_start = Scene_Map.prototype.start;
Scene_Map.prototype.start = function() {
oldSceneMap_start.call(this);
this.createhudWindow();
}
Scene_Map.prototype.createhudWindow = function() {
this._hudWindow = new Window_Hud();
this._hudWindow.x = 0;
this._hudWindow.y = 0;
this.addChild(this._hudWindow);
};
var oldSceneMap_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function() {
oldSceneMap_update.call(this);
if (this._hudWindow !== undefined) {
this._hudWindow.refresh();
}
};