My sampleWindow isn't showing up in the Scene_Menu, instead it's showing the default Gold_Window where it should be.
This is the code that I'm using:
function Window_Sample() { this.initialize.apply(this, arguments);};Window_Sample.prototype = Object.create(Window_Base.prototype);Window_Sample.prototype.constructor = Window_Sample;Window_Sample.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_Sample.prototype.windowWidth = function() { return 240;};Window_Sample.prototype.windowHeight = function() { return this.fittingHeight(1);};Window_Sample.prototype.refresh = function() { var x = this.textPadding(); var width = this.contents.width - this.textPadding() * 2; this.contents.clear(); this.drawTextEx("Test Text",0,0));Window_Sample.prototype.open = function() { this.refresh(); Window_Base.prototype.open.call(this);};Scene_Menu.prototype.create = function() { Scene_MenuBase.prototype.create.call(this); this.createCommandWindow(); this.createSampleWindow(); this.createStatusWindow();};Scene_Menu.prototype.createSampleWindow = function() { this._sampleWindow = new Window_Sample(0,0); this._sampleWindow.y = Graphics.boxHeight - this._sampleWindow.height; this.addWindow(this._sampleWindow);};Thanks to anyone that makes helps or at least makes an attempt to help me! I really appreciate it. 😀
This is the code that I'm using:
function Window_Sample() { this.initialize.apply(this, arguments);};Window_Sample.prototype = Object.create(Window_Base.prototype);Window_Sample.prototype.constructor = Window_Sample;Window_Sample.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_Sample.prototype.windowWidth = function() { return 240;};Window_Sample.prototype.windowHeight = function() { return this.fittingHeight(1);};Window_Sample.prototype.refresh = function() { var x = this.textPadding(); var width = this.contents.width - this.textPadding() * 2; this.contents.clear(); this.drawTextEx("Test Text",0,0));Window_Sample.prototype.open = function() { this.refresh(); Window_Base.prototype.open.call(this);};Scene_Menu.prototype.create = function() { Scene_MenuBase.prototype.create.call(this); this.createCommandWindow(); this.createSampleWindow(); this.createStatusWindow();};Scene_Menu.prototype.createSampleWindow = function() { this._sampleWindow = new Window_Sample(0,0); this._sampleWindow.y = Graphics.boxHeight - this._sampleWindow.height; this.addWindow(this._sampleWindow);};Thanks to anyone that makes helps or at least makes an attempt to help me! I really appreciate it. 😀