mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 17:19:27 +00:00
Add doxygen comments
This commit is contained in:
@@ -25,6 +25,14 @@ class Window {
|
||||
/**
|
||||
* Initialize window and OpenGL context.
|
||||
*
|
||||
* @param width The width of the window.
|
||||
* @param height The height of the window.
|
||||
* @param title The desired title of the window.
|
||||
* @param flags The ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details.
|
||||
*
|
||||
* @see ::SetConfigFlags()
|
||||
* @see ConfigFlags
|
||||
*
|
||||
* @throws raylib::RaylibException Thrown if the window failed to initiate.
|
||||
*/
|
||||
Window(int width, int height, const std::string& title = "raylib", unsigned int flags = 0) {
|
||||
@@ -41,11 +49,19 @@ class Window {
|
||||
/**
|
||||
* Initializes the window.
|
||||
*
|
||||
* @param width The width of the window.
|
||||
* @param height The height of the window.
|
||||
* @param title The desired title of the window.
|
||||
* @param flags The ConfigFlags to set prior to initializing the window. See SetConfigFlags for more details.
|
||||
*
|
||||
* @see ::SetConfigFlags()
|
||||
* @see ConfigFlags
|
||||
*
|
||||
* @throws raylib::RaylibException Thrown if the window failed to initiate.
|
||||
*/
|
||||
inline void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0) {
|
||||
if (flags != 0) {
|
||||
SetConfigFlags(flags);
|
||||
::SetConfigFlags(flags);
|
||||
}
|
||||
::InitWindow(width, height, title.c_str());
|
||||
if (!::IsWindowReady()) {
|
||||
@@ -405,6 +421,13 @@ class Window {
|
||||
return ::IsWindowReady();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the configuration flags for raylib.
|
||||
*
|
||||
* @param flags The ConfigFlags to apply to the configuration.
|
||||
*
|
||||
* @see ::SetConfigFlags
|
||||
*/
|
||||
inline void SetConfigFlags(unsigned int flags) {
|
||||
::SetConfigFlags(flags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user