Game Maker window and room are rectangle 但 room is a square in testing

Game Maker window and room are rectangle but room is a square in testing

我的项目中有不同大小的房间。一个房间是一个长方形,800×400。我已将 window 设置为 800 x 400,但房间的尺寸为 400 x 400,左侧和右侧有黑色空间。 为什么会这样,我该如何解决?

您需要调整大小 window、应用程序界面和图形界面大小。

window_set_size(room_width, room_height);
surface_resize(application_surface, room_width, room_height);
display_set_gui_size(room_width, room_height);

(例如,在 Room start 事件中)

至于为什么(如果您仍然感兴趣的话;)) Game Maker 使用您在游戏中打开的第一个房间的尺寸。所有其他房间将显示在相同的 window.