Utility/Enums: Change WindowStyleFlags to the new flags format

This commit is contained in:
Lynix
2016-11-27 02:28:39 +01:00
parent 0070e691b0
commit 1db3d60cea
8 changed files with 35 additions and 24 deletions

View File

@@ -7,6 +7,8 @@
#ifndef NAZARA_ENUMS_UTILITY_HPP
#define NAZARA_ENUMS_UTILITY_HPP
#include <Nazara/Core/Flags.hpp>
namespace Nz
{
enum AnimationType
@@ -430,20 +432,29 @@ namespace Nz
WindowEventType_Max = WindowEventType_TextEntered
};
enum WindowStyleFlags
enum WindowStyle
{
WindowStyle_None = 0x0, ///< Window has no border nor titlebar.
WindowStyle_Fullscreen = 0x1, ///< At the window creation, the OS tries to set it in fullscreen.
WindowStyle_None, ///< Window has no border nor titlebar.
WindowStyle_Fullscreen, ///< At the window creation, the OS tries to set it in fullscreen.
WindowStyle_Closable = 0x2, ///< Allows the window to be closed by a button in the titlebar, generating a Quit event.
WindowStyle_Resizable = 0x4, ///< Allows the window to be resized by dragging its corners or by a button of the titlebar.
WindowStyle_Titlebar = 0x8, ///< Adds a titlebar to the window, this option is automatically enabled if buttons of the titlebar are enabled.
WindowStyle_Closable, ///< Allows the window to be closed by a button in the titlebar, generating a Quit event.
WindowStyle_Resizable, ///< Allows the window to be resized by dragging its corners or by a button of the titlebar.
WindowStyle_Titlebar, ///< Adds a titlebar to the window, this option is automatically enabled if buttons of the titlebar are enabled.
WindowStyle_Threaded = 0x10, ///< Runs the window into a thread, allowing the application to keep updating while resizing/dragging the window.
WindowStyle_Threaded, ///< Runs the window into a thread, allowing the application to keep updating while resizing/dragging the window.
WindowStyle_Default = WindowStyle_Closable | WindowStyle_Resizable | WindowStyle_Titlebar,
WindowStyle_Max = WindowStyle_Threaded*2-1
WindowStyle_Max = WindowStyle_Threaded
};
template<>
struct EnableFlagsOperators<WindowStyle>
{
static constexpr bool value = true;
};
using WindowStyleFlags = Flags<WindowStyle>;
constexpr WindowStyleFlags WindowStyle_Default = WindowStyle_Closable | WindowStyle_Resizable | WindowStyle_Titlebar;
}
#endif // NAZARA_ENUMS_UTILITY_HPP