RMMV Text being display when refreshed but not on initialization...

ginfubawuba

Veteran
Veteran
Joined
Dec 1, 2017
Messages
75
Reaction score
12
First Language
English
Primarily Uses
RMMV
I added a window the the equip menu that is suppose to display text.

The problem is that the box is blank until I change which character is being displayed.

It seems like "refreshActor" is working, but I have no Idea how to make the text appear when the window is first created...

=================================

(function() {

Scene_Equip.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this.createHelpWindow();
this.createStatusWindow();
this.createCommandWindow();
this.createSlotWindow();
this.createItemWindow();
this.createGimmickWindow();
this.refreshActor();
};

Scene_Equip.prototype.createGimmickWindow = function() {
this._gimmickWindow = new Window_EquipGimmick(0, 100);

this.addWindow(this._gimmickWindow);
};

Scene_Equip.prototype.refreshActor = function() {
var actor = this.actor();
this._statusWindow.setActor(actor);
this._slotWindow.setActor(actor);
this._itemWindow.setActor(actor);
this._gimmickWindow.setActor(actor);
};


// Window_EquipGimmick
//
// The window for selecting a command on the equipment screen.

function Window_EquipGimmick() {
this.initialize.apply(this, arguments);
}

Window_EquipGimmick.prototype = Object.create(Window_Base.prototype);
Window_EquipGimmick.prototype.constructor = Window_EquipGimmick;

Window_EquipGimmick.prototype.initialize = function(x, y) {

var width = this.windowWidth();
var height = this.windowHeight();
Window_Base.prototype.initialize.call(this, x, 396, width, height);

this._actor = null;

};

Window_EquipGimmick.prototype.windowWidth = function() {
return 312;
};

Window_EquipGimmick.prototype.windowHeight = function() {
return 269;
};


Window_EquipGimmick.prototype.setActor = function(actor) {
if (this._actor !== actor) {
this._actor = actor;

this.contents.clear();

this.drawTextEx( "" + actor.description, 0, 0);
}

};
 

ginfubawuba

Veteran
Veteran
Joined
Dec 1, 2017
Messages
75
Reaction score
12
First Language
English
Primarily Uses
RMMV
I have been stuck on this for a while and don't even know where to start...
 

Latest Threads

Latest Profile Posts

When can we get this?
RPG Maker MZ Saturn.png
Saturn port when?
I'm new to rpgmaker mv, link me some good stuff to learn.
Finally, I have graduated from college and now I can put a lot more work into my game, after having not worked on it for the better part of a year.
post so i can change my profile picture ^^
Creating Some art for a fighter game.

Forum statistics

Threads
117,067
Messages
1,104,267
Members
153,042
Latest member
jetrotal
Top