Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use an enum to represent screen orientation in the Project Settings #48939

Merged
merged 1 commit into from
May 24, 2021

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 21, 2021

master version of #48943 (not backwards compatible).

  • Tweak the setting property hint to be more informative.
  • Make the setting a "basic" setting so it appears when Advanced Settings is disabled.
  • Remove redundant orientation setting in the iOS export preset. The project setting is now used (like on Android).

Projects upgrading from a previous version will have to set the screen orientation again in the Project Settings if it wasn't set to the default value ("landscape").

This closes #45422.

Comment on lines +503 to +504
case DisplayServer::SCREEN_LANDSCAPE:
orientations += "<string>UIInterfaceOrientationLandscapeLeft</string>\n";
Copy link
Member Author

@Calinou Calinou May 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can anyone confirm that SCREEN_LANDSCAPE has the left side of the device pointing upwards? I'm just guessing here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://developer.apple.com/documentation/uikit/uiinterfaceorientation/landscapeleft seems about right. But I can't test it at the moment.

Comment on lines +509 to +510
case DisplayServer::SCREEN_REVERSE_LANDSCAPE:
orientations += "<string>UIInterfaceOrientationLandscapeRight</string>\n";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above – it should be the opposite.

core/config/project_settings.cpp Outdated Show resolved Hide resolved
@Calinou Calinou force-pushed the screen-orientation-use-enum branch from 10c052d to c5d9134 Compare May 24, 2021 16:12
- Tweak the setting property hint to be more informative.
- Make the setting a "basic" setting so it appears when Advanced Settings
  is disabled.
- Remove redundant orientation setting in the iOS export preset.
  The project setting is now used (like on Android).

Projects upgrading from a previous version will have to set the
screen orientation again in the Project Settings if it wasn't set
to the default value ("landscape").
@Calinou Calinou force-pushed the screen-orientation-use-enum branch from c5d9134 to 660952a Compare May 24, 2021 16:53
@akien-mga akien-mga merged commit af03e9c into godotengine:master May 24, 2021
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the screen-orientation-use-enum branch August 3, 2021 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants