How do you have multiple windows open at once and overlap them?

Green

Villager
Member
Joined
Jun 28, 2015
Messages
6
Reaction score
0
First Language
English
Primarily Uses
I have a HUD in my game that I am working on and I am an amateur at javascript (I really don't know what I'm doing). I have made a decent and functional HUD.


The way that I made my HUD is such that there is a window on which I draw the contents of my HUD and then I hide the window skin, leaving the elements I desire. Obviously, this is built on Window_Base and Scene_Map (from Soul's tutorial).


The problem with this is that I am unable to see any message windows that open, my HUD has priority to these windows in rendering. How can I make sure that my HUD is on the bottom layer of the Scene_Map?


Thanks.


EDIT: Just to clarify, the HUD is sized to take up the entire display.
 
Last edited by a moderator:

Green

Villager
Member
Joined
Jun 28, 2015
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Bump


I noticed that the menu can overlap the HUD and I believe, based on the code, that this is on a different scene. I drew my HUD onto the Scene_Map directly and I think that message windows do the same thing, which is why the message window is invisible. So, my hypothesis is that I need to separate the HUD into its own Scene and have this render on the bottom. Unfortunately, I don't completely understand the code when I look at it and I don't know what I'm supposed to do to change this.


Could someone point me to where in the code the Scenes are actually executed? I took a look at SceneManager, but I couldn't really distinguish where this was.
 

Green

Villager
Member
Joined
Jun 28, 2015
Messages
6
Reaction score
0
First Language
English
Primarily Uses
UPDATE: So, by more clearly defining the shape of the UI and creating multiple windows with small boundaries, I have managed to fit the message box in by resizing it, but it still would be much easier if I could somehow have given priority of display to one of the windows on Scene_Map.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
You could probably just change the Z value of the Window/Sprite to a higher value.


Scenes are handled by the Scene_XXX objects but most of their contents esp the windows have their own code contained in the Window_XXX objects
 

Green

Villager
Member
Joined
Jun 28, 2015
Messages
6
Reaction score
0
First Language
English
Primarily Uses
You could probably just change the Z value of the Window/Sprite to a higher value.
I took a look around for z values and I couldn't find anything pertaining to MV, but I did for VX Ace.


However, your reference to these z values led me to this, which has solved the issue! :D :




If anyone is having the same issue, essentially what solved the problem is instead of using addWindow() in the Scene_xxx.prototype.start function, I used addChild(), the effects of which you can read about in ^. This moved my HUD to the lowest layer of Scene_Map. 
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Oh I never realized they removed the Z value in MV. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,883
Messages
1,017,232
Members
137,607
Latest member
Maddo
Top