summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/playerbox.cpp12
-rw-r--r--src/gui/widgets/tabs/setup_other.cpp3
2 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index ff865bdbe..21617c57b 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -40,8 +40,8 @@ PlayerBox::PlayerBox(Being *const being, const std::string &skin,
mSelectedBackground(),
mSkin(nullptr),
mSelectedSkin(nullptr),
- mOffsetX(-16),
- mOffsetY(-32),
+ mOffsetX(-mapTileSize / 2),
+ mOffsetY(-mapTileSize),
mDrawBackground(false),
mSelected(false)
{
@@ -57,8 +57,8 @@ PlayerBox::PlayerBox(const std::string &skin,
mSelectedBackground(),
mSkin(nullptr),
mSelectedSkin(nullptr),
- mOffsetX(-16),
- mOffsetY(-32),
+ mOffsetX(-mapTileSize / 2),
+ mOffsetY(-mapTileSize),
mDrawBackground(false),
mSelected(false)
{
@@ -94,8 +94,8 @@ void PlayerBox::init(std::string name, std::string selectedName)
if (mSkin)
{
mDrawBackground = (mSkin->getOption("drawbackground") != 0);
- mOffsetX = mSkin->getOption("offsetX", -16);
- mOffsetY = mSkin->getOption("offsetY", -32);
+ mOffsetX = mSkin->getOption("offsetX", -mapTileSize / 2);
+ mOffsetY = mSkin->getOption("offsetY", -mapTileSize);
mFrameSize = mSkin->getOption("frameSize", 2);
}
if (selectedName.empty())
diff --git a/src/gui/widgets/tabs/setup_other.cpp b/src/gui/widgets/tabs/setup_other.cpp
index ec4e2fe06..b59edfd4a 100644
--- a/src/gui/widgets/tabs/setup_other.cpp
+++ b/src/gui/widgets/tabs/setup_other.cpp
@@ -28,6 +28,7 @@
#include "gui/widgets/scrollarea.h"
#include "configuration.h"
+#include "map.h"
#include "utils/gettext.h"
@@ -161,7 +162,7 @@ Setup_Other::Setup_Other(const Widget2 *const widget) :
// TRANSLATORS: settings option
new SetupItemIntTextField(_("Scroll radius"), "", "ScrollRadius",
- this, "ScrollRadiusEvent", 0, 32);
+ this, "ScrollRadiusEvent", 0, mapTileSize);
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Auto resize minimaps"), "", "autoresizeminimaps",