Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions include/Window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ class 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.
* @param logLevel The the current threshold (minimum) log level
*
* @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) {
Init(width, height, title, flags);
Window(int width, int height, const std::string& title = "raylib", unsigned int flags = 0, TraceLogLevel logLevel = LOG_ALL) {
Init(width, height, title, flags, logLevel);
}

/**
Expand All @@ -55,10 +56,11 @@ class Window {
*
* @throws raylib::RaylibException Thrown if the window failed to initiate.
*/
static void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0) {
static void Init(int width = 800, int height = 450, const std::string& title = "raylib", unsigned int flags = 0, TraceLogLevel logLevel = LOG_ALL) {
if (flags != 0) {
::SetConfigFlags(flags);
}
::SetTraceLogLevel(logLevel);
::InitWindow(width, height, title.c_str());
if (!::IsWindowReady()) {
throw RaylibException("Failed to create Window");
Expand Down