• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM How to keep Contents fullscale when resizing the window

Hello, i'm currently Trying to create a "Software" with GM, just a little personal Project. I'm trying to get the effect something similar to some programs, in which when you drag the edges and resize the window, the contents inside the Window aren't scaled to the new size but rather keep their original Size and Forms including Text and other things. Whats the Easiest way to Achieve something like this?

I'm assuming i'd have to do something with surfaces? In which the Surface is created to the Width and Height of the screen? Or do i have to use the Draw GUI and scale it accordingly still?
 
Last edited:
C

CreatorAtNight

Guest
I think for what you want to do is just make sure the room_width is always the same as the window_get_width();
You can do that like this: room_set_width(rm_room, window_get_width());
Same goes for the height.
 
I think for what you want to do is just make sure the room_width is always the same as the window_get_width();
You can do that like this: room_set_width(rm_room, window_get_width());
Same goes for the height.
Hmm I don't think that's what i want. This is what i was mostly mentioning, an example would be the GM window, if you notice the Resource Trees Stay the Same when Resizing no matter what

FULL SCALE
https://prnt.sc/lkxlbd
Resize
https://prnt.sc/lkxlmh
 
C

CreatorAtNight

Guest
Ah I see, so you want to use window panels inside of the game window. I actually did that before, I don't remember the exact code I used but you basically want to use views for this. You will have a view for every window panel and use a dragable object or mouse position in combination with view position and width to resize the view widths. Let me know if you run into any problems, I can try to dig up my old code.
 
Ah I see, so you want to use window panels inside of the game window. I actually did that before, I don't remember the exact code I used but you basically want to use views for this. You will have a view for every window panel and use a dragable object or mouse position in combination with view position and width to resize the view widths. Let me know if you run into any problems, I can try to dig up my old code.
Well that and Able to Resize the Game Window but not have to resize the App Surface and stuff, basically whatever is drawn at the start is as is when the game window is resized due to dragging corners, MY main issue with Views have always been about what size to use, Since the "Software" is supposed to Start FullScreen Accomodating to the User Ends Screen W+Hs. Someone who starts with a 1920x1080 may not look the same on a laptops screen
 
C

CreatorAtNight

Guest
I made this, it uses surfaces for the 2 window panels, it doesn't allow to drag the game window right now, but that is an easy thing to add, let me know if you need help to do that.

Here is my example project, hope it helps: https://drive.google.com/open?id=1t_r9ZGcMAC0LkDBSo5XYOVblVnGXLxmq

EDIT: I've updated the example project so you can resize the game window as well.
 
Last edited by a moderator:
I made this, it uses surfaces for the 2 window panels, it doesn't allow to drag the game window right now, but that is an easy thing to add, let me know if you need help to do that.

Here is my example project, hope it helps: https://drive.google.com/open?id=1t_r9ZGcMAC0LkDBSo5XYOVblVnGXLxmq

EDIT: I've updated the example project so you can resize the game window as well.
Sorry For the Super Late Response, Gotten super busy over the Holidays, Hope you Enjoyed yours (If you're in the states).

This is exactly what i was looking for something along these lines, I noticed a Few bugs, But i'll Look more into it to try and Find a Solution for them. I'll look over them tonight and see if can Come up With Something. I like the Resizeable Surfaces inside as well, it will Definitely Help. I'll Let you know if i can make something out of it following your example!
 
C

CreatorAtNight

Guest
I'm not in the states, but still had some good days, thanks! :)

And yeah, it was quite a quick an dirty example, so there will be some bugs, let me know if you need any help with that. Glad I could help you so far.
 
Top