summaryrefslogtreecommitdiff
path: root/src/gui/windows/charcreatedialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-11 18:42:28 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-11 18:42:28 +0300
commit751428a29cad693c3d35bde413393d2c5802c14e (patch)
tree60b4f8aa46a9298df772015349d1e30a536acf22 /src/gui/windows/charcreatedialog.cpp
parentad914acb8d9e3430407820d8e95e3165b2c06860 (diff)
downloadmanaplus-751428a29cad693c3d35bde413393d2c5802c14e.tar.gz
manaplus-751428a29cad693c3d35bde413393d2c5802c14e.tar.bz2
manaplus-751428a29cad693c3d35bde413393d2c5802c14e.tar.xz
manaplus-751428a29cad693c3d35bde413393d2c5802c14e.zip
Fix buttons position in char create dialog in very small screen size.
Diffstat (limited to 'src/gui/windows/charcreatedialog.cpp')
-rw-r--r--src/gui/windows/charcreatedialog.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 4c3b917a9..d51c8158e 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -725,8 +725,20 @@ void CharCreateDialog::setButtonsPosition(const int w, const int h)
{
if (mainGraphics->getHeight() < 480)
{
- mCreateButton->setPosition(340, 150);
- mCancelButton->setPosition(340, 160 + mCreateButton->getHeight());
+ if (mMaxPoints)
+ {
+ mCreateButton->setPosition(337, 160);
+ mCancelButton->setPosition(337 + mCreateButton->getWidth(), 160);
+ }
+ else
+ {
+ mCancelButton->setPosition(
+ w / 2,
+ 160);
+ mCreateButton->setPosition(
+ mCancelButton->getX() - 5 - mCreateButton->getWidth(),
+ 160);
+ }
}
else
{