I have created my own gold window with the code below which works perfectly.
The only thing is that the original gold window is still visible as well. As Shown in image below.
How would I go about removing the original window? Its something in the rpg_scenes.js right?
My Code:
The only thing is that the original gold window is still visible as well. As Shown in image below.
How would I go about removing the original window? Its something in the rpg_scenes.js right?
My Code:
Code:
(function() {
var _Scene_Menu_start = Scene_Menu.prototype.start;
Scene_Menu.prototype.start = function() {
_Scene_Menu_start.call(this);
this._UICGoldWin = new UIC_goldWindow(30, 100);
this.addWindow(this._UICGoldWin);
};
function UIC_goldWindow() {
this.initialize.apply(this, arguments);
};
UIC_goldWindow.prototype = Object.create(Window_Base.prototype);
UIC_goldWindow.prototype.constructor = UIC_goldWindow;
UIC_goldWindow.prototype.initialize = function(x, y) {
Window_Base.prototype.initialize.call(this, x, y, this.windowWidth(), this.windowHeight());
this.refresh();
};
UIC_goldWindow.prototype.refresh = function() {
this.contents.clear();
this.drawIcon(313, 0, 0);
this.drawText($gameParty.gold(), Window_Base._iconWidth + 8, 0, this.windowHeight(), this.windowWidth() - (Window_Base._iconWidth + 8), 'left');
}
UIC_goldWindow.prototype.windowWidth = function() {
return 250;
}
UIC_goldWindow.prototype.windowHeight = function() {
return this.fittingHeight(1);
}
})();