diff options
Diffstat (limited to 'src/main.cpp')
-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) |