Coordination

Since window would be shown on top of the graphic if no viewport is set, how would you set another window to show right under it?

I'm thinking of

@new_window.y = (-272 - @existing window.y)

Though there should be a better way to do the above. : D
well, if the window is using it's own sprite, just set it's z to be lower than the other... or set the other's z to be higher...


if not, well, I think order of drawing matters too for objects having the same z and y... so if they are, then just draw the lower one first
By "on top of / under" do you mean higher than and lower than? And what do you mean by "the graphic"? Changing the y coordinate does not influence whether windows are on a higher or lower "layer".


If you're using the y coordinate (you just want to get windows to display above/below each other vertically, like the help window and the skill window, or something), it would be something like this:

Code:
@bottom_window.y = @top_window.y + @top_window.height
@bottom_window.y = @top_window.y + @top_window.height
Yea, that makes sense since the window's position moves up as its y-value becomes more negative, and I got the z/depth coordination, just a bit curious about the default behavior of class Window. Since when you put them at (0,0) - coordinate without a modified viewport, they would be shown from top-left of the screen to down-right of specified height and width. A better question might be, what's the max. and min. value for x/y coordination for class Window to appear on the screen without overlapping the display. And seems like class Sprite behaves the same way as the class Window in term of x/y-coordination.
You have a set screen size. You can place your windows anywhere you want on the screen, and you make sure they don't overlap by setting their width/height/x/y, taking into account other windows that will be visible at the same time.


z-coordinate has nothing to do with it.
Yea, thanks, I got that. What is the set screen size? 544 x 444?
By default, it's 544 x 416. With scripts you can enlarge that to 640 x 480.


This info is in the help file - F1 while in the editor.
Yea, didn't get the right keyword to display that info.

Edit: k, thread can be closed, thank you.
It's under Resource Requirements, where it talks about the size of assets for things like the title screen. Or, that's where I initially saw it - it's probably in a few other places as well (like the Graphics module, which tells you how to go about resizing it)


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/coordination.21807/