From e754d2d1f4f45238974d2136baf5eff0058784a4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 30 Jan 2012 01:11:09 +0300 Subject: Fix buttons position while resizing in server selection screen. --- src/client.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 0a47b2bee..0e62d9a52 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2368,13 +2368,30 @@ void Client::resizeVideo(int width, int height) if (mainGraphics->resize(width, height)) { - gui->videoResized(); + if (gui) + gui->videoResized(); if (mDesktop) mDesktop->setSize(width, height); if (mSetupButton) - mSetupButton->setPosition(width - mSetupButton->getWidth() - 3, 3); + { +// mSetupButton->setPosition(width - mSetupButton->getWidth() - 3, 3); + + int x = width - mSetupButton->getWidth() - 3; + mSetupButton->setPosition(x, 3); + +#ifndef WIN32 + x -= mPerfomanceButton->getWidth() + 6; + mPerfomanceButton->setPosition(x, 3); + + x -= mVideoButton->getWidth() + 6; + mVideoButton->setPosition(x, 3); + + x -= mThemesButton->getWidth() + 6; + mThemesButton->setPosition(x, 3); +#endif + } if (mGame) mGame->videoResized(width, height); -- cgit v1.2.3-60-g2f50