jeuxdeproust

Warper
Member
Joined
Jul 18, 2017
Messages
2
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hey all,

Currently adding some oomph (or attempting to) to my menus. I like using pictures, so I'm trying to do that. In most cases, it works fine. In some cases, there's a strange thing where the code seems fine, you open a menu, the window is shown and there is no picture. However, if you scroll down and then back up (for example, in Yanfly's Status Menu Core, going from 'Status' to 'Parameters,' and then back to 'Status'), the image appears just fine.

Why doesn't the image appear in the first place? Why does it only appear when the window changes and then changes back?

Here's where I'm inserting my code for YEP_StatusMenuCore.js -- instead of the text for 'Level' appearing I leave the Database input empty (so when the text is drawn, it draws nothing) and then use a picture of a rendered piece of text instead.

After defining my own drawPicture function:

in the snippet for Window_StatusInfo.prototype.drawGeneralParam = function() {}

Right underneath
this.drawText(TextManager.level, dx, rect.y, dw, 'left');

I'll add
this.drawPictureSMC('Textbit_Level', dx, rect.y); (Textbit_Level is the name of the png)

The code clearly works to some extent, just not on the initial appearance of the window.

Anyone know how to fix it, or why it's acting this way? In other windows, this has never been an issue, and the picture loads on every initial appearance of the window.

Well, after googling studiously I found a solution.

https://forums.rpgmakerweb.com/inde...wing-in-the-first-place-in-menu-solved.93711/

However, it does seem to be an inelegant one. Is there a way to reserve an image only when a menu is called, so as not to clog up memory?
 
Last edited by a moderator:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,757
Reaction score
8,749
First Language
English
Primarily Uses
RMMV
@jeuxdeproust I merged your posts as we ask members to go back and edit a post, rather than posting again so soon.
 

Latest Threads

Latest Profile Posts

Is it necroposting if I ask for more info in my own months old thread? All the information in the thread is relevant
JRPG TextBox HTML - Part 2:
So I'm resuming work on the Shadowstar Trilogy. I've decided that it will take place between the end of G4 and the start of G5, and two of the Lost Rulers will be Twilight Sparkle and Sunset Shimmer (who is the moon princess in my AU).
Been working on some sprites, My favorite out of all of them is this guy, his name is Moss:

Forum statistics

Threads
108,960
Messages
1,040,888
Members
141,423
Latest member
KAVKA
Top