Stage setResolution and resize


I found these 2 methods in openfl._v2.display.Stage:

public function resize (width:Int, height:Int):Void {
	lime_stage_resize_window (__handle, width, height);
public function setResolution (width:Int, height:Int):Void {
	lime_stage_set_resolution(__handle, width, height);

They work perfectly and are very useful, but seems to be deprecated in openfl.display.Stage. Is there anything that performs the same function as these two in openfl next? I would really need them.


These were sort of shoe-horned in, they aren’t part of the Flash API, moving forward, the plan is to expose additional functionality through the Lime API instead of the OpenFL API. For “next” targets (HTML5, Flash, native -Dnext for now) the Lime API is completely available, and helps clarify when you’re doing a Lime behavior, or a Flash-y behavior.

The Lime “Window” class should have a “resize” method. As for display mode switching, that is not officially supported in Lime 2 right now, but is something I would like to see. It’s a little more nuanced than a “set resolution” because it’s really a “go full screen and force this display mode” which may or may not be compatible with the current video card driver and monitor, so we also need additional methods to list the available modes, and we need to decide what to do in case of an invalid mode, and we need to handle multi-monitor setups properly. It’s nothing impossibly complicated, but will take some time to step through in a nice way

Thanks, good to know.

I suppose the supported resolution might be limited by openfl.system.Capabilities.screenResolutionX and Y, or maybe there are other ways to find out at the native level.