Added love.window.setPosition(x, y [, displayindex]), love.window.getPosition, and optional x and y fields for t.window in love.conf and for the flags table in love.window.set/getMode (resolves issue #930.)

This commit is contained in:
Alex Szpakowski
2014-09-19 16:19:55 -03:00
parent 3d7a3c2c3c
commit b75e1bdeaa
8 changed files with 130 additions and 9 deletions
+8
View File
@@ -60,6 +60,8 @@ public:
SETTING_HIGHDPI,
SETTING_SRGB,
SETTING_REFRESHRATE,
SETTING_X,
SETTING_Y,
SETTING_MAX_ENUM
};
@@ -122,6 +124,9 @@ public:
virtual void getDesktopDimensions(int displayindex, int &width, int &height) const = 0;
virtual void setPosition(int x, int y, int displayindex) = 0;
virtual void getPosition(int &x, int &y, int &displayindex) = 0;
virtual bool isCreated() const = 0;
virtual void setWindowTitle(const std::string &title) = 0;
@@ -205,6 +210,9 @@ struct WindowSettings
bool highdpi; // false
bool sRGB; // false
double refreshrate; // 0.0
bool useposition; // false
int x; // 0
int y; // 0
}; // WindowSettings