Ax209
Member
Hi everyone. I'm sure this is really simple to most of you but I just can't wrap my head around some of the new stuff. I'm sure it's there but I'm struggling to find it.
So I have a game, with a camera of 600 x 400. Now, I wanted to double the size on the screen, make it look more pixellated, so I made the viewport 1200 x 800.
Much like GMS 1.x this works lovely. However I've run into a hickup when placing buttons. Normally I'd go for the following...
x = view_xview+view_hview-64.
This would ensure that the buttons would always be at the right of the screen, with always the same space towards the edge of the window, regardless of how I changed the resolution. Now, I've been playing with some new functions. Such as the camera_get_view_width/height and view_get_hport. The problem with these functions is that they consistently return the length of the window and not the length in the room itself. So instead of returning 600, they give me 1200 and my button is nowhere to be seen.
I can think of ways to work around this, even with a changing resolution, if I set everything up well enough in advance, but if there's a built-in-function then i'd rather use that.
Cheers in advance.
So I have a game, with a camera of 600 x 400. Now, I wanted to double the size on the screen, make it look more pixellated, so I made the viewport 1200 x 800.
Much like GMS 1.x this works lovely. However I've run into a hickup when placing buttons. Normally I'd go for the following...
x = view_xview+view_hview-64.
This would ensure that the buttons would always be at the right of the screen, with always the same space towards the edge of the window, regardless of how I changed the resolution. Now, I've been playing with some new functions. Such as the camera_get_view_width/height and view_get_hport. The problem with these functions is that they consistently return the length of the window and not the length in the room itself. So instead of returning 600, they give me 1200 and my button is nowhere to be seen.
I can think of ways to work around this, even with a changing resolution, if I set everything up well enough in advance, but if there's a built-in-function then i'd rather use that.
Cheers in advance.