Browse Source

Added method Desktop::getOrientationsEnabled()

tags/2021-05-28
jules 8 years ago
parent
commit
851b3e6db1
2 changed files with 10 additions and 0 deletions
  1. +5
    -0
      modules/juce_gui_basics/components/juce_Desktop.cpp
  2. +5
    -0
      modules/juce_gui_basics/components/juce_Desktop.h

+ 5
- 0
modules/juce_gui_basics/components/juce_Desktop.cpp View File

@@ -401,6 +401,11 @@ void Desktop::setOrientationsEnabled (const int newOrientations)
}
}
int Desktop::getOrientationsEnabled() const noexcept
{
return allowedOrientations;
}
bool Desktop::isOrientationEnabled (const DisplayOrientation orientation) const noexcept
{
// Make sure you only pass one valid flag in here...


+ 5
- 0
modules/juce_gui_basics/components/juce_Desktop.h View File

@@ -312,6 +312,11 @@ public:
*/
void setOrientationsEnabled (int allowedOrientations);
/** Returns the set of orientations the display is allowed to rotate to.
@see setOrientationsEnabled
*/
int getOrientationsEnabled() const noexcept;
/** Returns whether the display is allowed to auto-rotate to the given orientation.
Each orientation can be enabled using setOrientationEnabled(). By default, all orientations are allowed.
*/


Loading…
Cancel
Save