Coder Social home page Coder Social logo

godot_device_screen_simulator's Introduction

Device Screen Simulator

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.

portrait landscape


Settings

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)

settings


List of devices

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.

list of 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)},


FAQ

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.

godot_device_screen_simulator's People

Contributors

muzzug avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.