Un-break
This commit is contained in:
@@ -158,11 +158,9 @@ namespace ReWindow
|
||||
RWindow(const std::string& title, int width, int height);
|
||||
RWindow(const std::string& title, int width, int height, RenderingAPI renderer);
|
||||
|
||||
static Vector2 GetMouseCoordinates()
|
||||
Vector2 GetMouseCoordinates() const
|
||||
{
|
||||
if (singleton != nullptr)
|
||||
return singleton->getCursorPos();
|
||||
return Vector2::NaN;
|
||||
return getCursorPos();
|
||||
}
|
||||
|
||||
|
||||
@@ -230,7 +228,9 @@ namespace ReWindow
|
||||
RenderingAPI renderer;
|
||||
bool open = false;
|
||||
bool resizable;
|
||||
static RWindow* singleton;
|
||||
|
||||
//You can't do this because you can't initialize a static member inside the class constructor.
|
||||
//static RWindow* singleton;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -33,23 +33,16 @@ namespace ReWindow {
|
||||
title = "ReWindow Application";
|
||||
width = 640;
|
||||
height = 480;
|
||||
RWindow::singleton = this;
|
||||
}
|
||||
|
||||
RWindow::RWindow(const std::string& title, int width, int height) : flags(false,false,false,false) {
|
||||
this->title = title;
|
||||
this->width = width;
|
||||
this->height = height;
|
||||
|
||||
RWindow::singleton = this;
|
||||
|
||||
}
|
||||
|
||||
RWindow::RWindow(const std::string& title, int width, int height, RenderingAPI renderer) :
|
||||
title(title), width(width), height(height), renderer(renderer)
|
||||
{
|
||||
RWindow::singleton = this;
|
||||
}
|
||||
title(title), width(width), height(height), renderer(renderer) {}
|
||||
|
||||
void RWindow::raise() const { XRaiseWindow(display, window); }
|
||||
void RWindow::lower() const { XLowerWindow(display, window); }
|
||||
|
Reference in New Issue
Block a user