the refresh method of the image contains the this.drawTextEx(text,x,y) can we see the refresh method of the custom window please?
can you please put this in a decent ways (code tag) and.......PLEASE make a readable font size?
Oh, I don't have a refresh method in the custom window. How can I add it? I see there's refresh methods in Window_Base and Window_Help.
It doesn't have to be drawTextEx, I don't actually know what the difference is between that and drawText.
//-----------------------------------------------------------------------------// Window_CommEv//function Window_CommEv() { this.initialize.apply(this, arguments);}Window_CommEv.prototype = Object.create(Window_Command.prototype);Window_CommEv.prototype.constructor = Window_CommEv;Window_CommEv.prototype.initialize = function() { Window_Command.prototype.initialize.call(this, 0, 0); this.updatePlacement(); this.openness = 0; this.open();};Window_CommEv.prototype.windowWidth = function() { return 240;};Window_CommEv.prototype.updatePlacement = function() { this.x = (Graphics.boxWidth - this.width) / 2; this.y = (Graphics.boxHeight - this.height) / 2;};Window_CommEv.prototype.refresh = function() { this.contents.clear(); this.drawTextEx(this._text, this.textPadding(), 0);};Window_CommEv.prototype.makeCommandList = function() { this.drawTextEx("text", 0, 0); if (eval(ENABLED1)){ this.addCommand(COMM_EV_NAME1, 'COMM_EV_1'); } if (eval(ENABLED2)){ this.addCommand(COMM_EV_NAME2, 'COMM_EV_2'); } if (eval(ENABLED3)){ this.addCommand(COMM_EV_NAME3, 'COMM_EV_3'); } if (eval(ENABLED4)){ this.addCommand(COMM_EV_NAME4, 'COMM_EV_4'); } if (eval(ENABLED5)){ this.addCommand(COMM_EV_NAME5, 'COMM_EV_5'); } if (eval(ENABLED6)){ this.addCommand(COMM_EV_NAME6, 'COMM_EV_6'); } if (eval(ENABLED7)){ this.addCommand(COMM_EV_NAME7, 'COMM_EV_7'); } if (eval(ENABLED8)){ this.addCommand(COMM_EV_NAME8, 'COMM_EV_8'); }};I took the refresh from Window_Help, but I'm sure that's not how to do it.
Window_CommEv.prototype.initialize = function() { Window_Command.prototype.initialize.call(this, 0, 0); this.updatePlacement(); this.refresh(); this.openness = 0; this.open();};Window_CommEv.prototype.refresh = function() { Window_Base.call(this); this.drawtextEx('\\c[9]Hello World\\c[0]');}EDIT: I forgot to delete a drawText in other part of the code. Anyways, it freezes when I open the scene, I'll see what I can do about that.
EDIT2: I tried this:
Window_CommEv.prototype.initialize = function() { Window_Command.prototype.initialize.call(this, 0, 0); this.updatePlacement(); this.refresh(); this.openness = 0; this.open();};Window_CommEv.prototype.refresh = function() { Window_Base.prototype.refresh.call(this); this.drawtextEx('\\c[9]Hello World\\c[0]');}Now it doesn't freeze, but there's a "TypeError. Cannot read property 'call' of undefined
I guess, a newbie's guess
this.drawTextEx("Hey", 1, 1);
the last two arguments should be numeric (in this case changed into 1, 1)