mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 17:19:27 +00:00
47 lines
717 B
C++
47 lines
717 B
C++
#ifndef RAYLIB_CPP_WINDOW_HPP_
|
|
#define RAYLIB_CPP_WINDOW_HPP_
|
|
|
|
#include <string>
|
|
#include "raylib.h"
|
|
|
|
namespace raylib {
|
|
class Window {
|
|
public:
|
|
Window(int width, int height, const std::string& title = "raylib", bool lateInit = false) {
|
|
if (!lateInit) {
|
|
Init(width, height, title);
|
|
}
|
|
};
|
|
|
|
~Window() {
|
|
Close();
|
|
};
|
|
|
|
void Init(int width, int height, const std::string& title) {
|
|
InitWindow(width, height, title.c_str());
|
|
}
|
|
|
|
bool ShouldClose() {
|
|
return WindowShouldClose();
|
|
};
|
|
|
|
void Close() {
|
|
CloseWindow();
|
|
};
|
|
|
|
static bool IsReady() {
|
|
return IsWindowReady();
|
|
};
|
|
|
|
void BeginDrawing() {
|
|
::BeginDrawing();
|
|
}
|
|
void EndDrawing() {
|
|
::EndDrawing();
|
|
}
|
|
|
|
};
|
|
}
|
|
|
|
#endif
|