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 Posts

Latest Profile Posts

both love and pain have no boundaries
Happy Saint Nicholas Day! May there nice stuff in your shoes when you wake up!
Choosing Beggars are the best source of entertainment.
DavidUchina wrote on caethyril's profile.
You chad, thanks a lot for your plugins. You helped me costumize the buttons in my game.
I created the first teaser for my game! I decided to make an animation of Cabaret Helen advertising the Pizza Time Theater, set to an actual radio commercial. But this is no ordinary advertisement...

Forum statistics

Threads
117,216
Messages
1,105,546
Members
153,362
Latest member
Luxxusburger
Top