Added love.window.toPixels(x [, y]) and love.window.fromPixels(x [, y]), for easier conversion between window-space and pixel-space values when highdpi mode is enabled on a retina display in OS X (and in the iOS and Android ports of LÖVE.)

This commit is contained in:
Alex Szpakowski
2014-09-14 15:58:37 -03:00
parent f972c9923f
commit 00944c5f5d
7 changed files with 96 additions and 20 deletions
+5
View File
@@ -85,6 +85,11 @@ public:
double getPixelScale() const;
double toPixels(double x) const;
void toPixels(double wx, double wy, double &px, double &py) const;
double fromPixels(double x) const;
void fromPixels(double px, double py, double &wx, double &wy) const;
const void *getHandle() const;
bool showMessageBox(MessageBoxType type, const std::string &title, const std::string &message, bool attachtowindow);