mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 10:59:00 +00:00
Add Window functions
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
namespace raylib {
|
||||
class Window {
|
||||
public:
|
||||
Window(int width, int height, const std::string& title = "raylib", bool lateInit = false) {
|
||||
Window(int width = 800, int height = 450, const std::string& title = "raylib", bool lateInit = false) {
|
||||
if (!lateInit) {
|
||||
Init(width, height, title);
|
||||
}
|
||||
@@ -40,6 +40,42 @@ namespace raylib {
|
||||
::EndDrawing();
|
||||
}
|
||||
|
||||
bool IsMinimized() {
|
||||
return ::IsWindowMinimized();
|
||||
}
|
||||
bool IsResized() {
|
||||
return ::IsWindowResized();
|
||||
}
|
||||
bool IsHidden() {
|
||||
return ::IsWindowHidden();
|
||||
}
|
||||
void ToggleFullscreen() {
|
||||
return ::ToggleFullscreen();
|
||||
}
|
||||
void Unhide() {
|
||||
return ::UnhideWindow();
|
||||
}
|
||||
void Hide() {
|
||||
return ::HideWindow();
|
||||
}
|
||||
void SetIcon(Image image) {
|
||||
SetWindowIcon(image);
|
||||
}
|
||||
void SetTitle(const std::string& title) {
|
||||
::SetWindowTitle(title.c_str());
|
||||
}
|
||||
void SetPosition(int x, int y) {
|
||||
::SetWindowPosition(x, y);
|
||||
}
|
||||
void SetMonitor(int monitor) {
|
||||
::SetWindowMonitor(monitor);
|
||||
}
|
||||
void SetMinSize(int width, int height) {
|
||||
::SetWindowMinSize(width, height);
|
||||
}
|
||||
void SetSize(int width, int height) {
|
||||
::SetWindowSize(width, height);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user