Device Screen Simulator is designed to change the resolution of the game during testing.
It allows you to select from different types of mobile devices and adjusts the screen resolution to the resolution of the selected device.
It also allows you to change Stretch Mode, Stretch Aspect and Stretch Shrink.
I don't know how to get the Stretch Mode, Stretch Aspect and Stretch Shrink settings yet, so I've set some basic values hardcoded.
You can edit them in res://addons/device_screen_simulator/autoload.gd
show_key - key to show/hide the settings window
reset_key - key to return the view to default settings
default_stretch_aspect - set the default Stretch Aspect
default value is disabled
default_stretch_mode - setting the default Stretch Mode default value is ignore
default_stretch_shrink - setting the default Stretch Shrink
default value is 1
default_screen_orientation - setting the window orientation
default value is 0 (portrait)
The devices that can be selected are in the dictionary at res://addons/device_screen_simulator/autoload.gd.
Currently, the list contains only current selling iPhones. The list is for testing purposes and I plan to expand it to include more devices.
Extending the list with custom device types is easy - just add custom devices to the dictionary in the format:
"device name" : { "resolution" : Vector2(width, height)},
Why is the "resolution" field in the next dictionary?
In the future, I would like the display appearance of the device (various cropping, notch, corner rounding, etc) to be displayed within the plugin. This way there will also be a preview image of the display within the nested dictionary.
Can I suggest a device I want to add to the list?
Yeah, right. Just open issue. I will add new devices as needed.