function Window_DashStamina() { this.initialize.apply(this, arguments); }
// Inherit from base window
Window_DashStamina.prototype = Object.create(Window_Base.prototype);
// Set Constructor
Window_DashStamina.prototype.constructor = Window_DashStamina;
// Constructor
Window_DashStamina.prototype.initialize = function(x, y, width, height) {
Window_Base.prototype.initialize.call(this, x, y, width, height);
this._helpWindow = null;
this._handlers = {};
this._touching = false;
this.deactivate();
alert('window created');
};
// Update
Window_DashStamina.prototype.update = function() {
Window_Base.prototype.update.call(this);
console.log('updating'); // Erm... How do I hook this into the window_base update without an alias (because we inherit from Window_Base)... This is never called.
// Update stamina bar
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var alias_SceneMapOnMapLoaded = Scene_Map.prototype.onMapLoaded;
Scene_Map.prototype.onMapLoaded = function() {
alias_SceneMapOnMapLoaded.apply(this, arguments);
this.dashStaminaWindow = new Window_DashStamina(10,10,100,64);
}