diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 00:40:06 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 00:40:06 +0100 |
commit | b67c1813727cbc913eb063dea48ca109844f52fe (patch) | |
tree | 838758acbb8026d4093d2832408d63d1884d2974 /src | |
parent | 2b8ac68c822fe842756cf36e5f8476585a093560 (diff) | |
download | mana-b67c1813727cbc913eb063dea48ca109844f52fe.tar.gz mana-b67c1813727cbc913eb063dea48ca109844f52fe.tar.bz2 mana-b67c1813727cbc913eb063dea48ca109844f52fe.tar.xz mana-b67c1813727cbc913eb063dea48ca109844f52fe.zip |
Center the dialogs during the login sequence again
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index a9206505..97f2a277 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -649,16 +649,11 @@ void accountLogin(Network *network, LoginData *loginData) config.setValue("remember", loginData->remember); } -inline int MIN(int x, int y) -{ - return x < y ? x : y; -} - -void positionDialog(Window *dialog, int screenWidth, int screenHeight) +static void positionDialog(Window *dialog, int screenWidth, int screenHeight) { dialog->setPosition( - MIN(screenWidth * 5 / 8, screenWidth - dialog->getWidth()), - MIN(screenHeight * 5 / 8, screenHeight - dialog->getHeight())); + (screenWidth - dialog->getWidth()) / 2, + (screenHeight - dialog->getHeight()) / 2); } void charLogin(Network *network, LoginData *loginData) |