summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-29 21:26:43 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-30 02:25:05 +0300
commitca9e91c47d2a5ca4027329311b00a12f5647b5d6 (patch)
tree4c2a7076bfdac36b603cb9fbb214f0cbecd8f356 /src/gui
parenteeda67071df6b6a2021292b1aeea4e16903c4007 (diff)
downloadmv-ca9e91c47d2a5ca4027329311b00a12f5647b5d6.tar.gz
mv-ca9e91c47d2a5ca4027329311b00a12f5647b5d6.tar.bz2
mv-ca9e91c47d2a5ca4027329311b00a12f5647b5d6.tar.xz
mv-ca9e91c47d2a5ca4027329311b00a12f5647b5d6.zip
Add option to show player name at top or at bottom.
Add also enum for badge draw type.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/tabs/setup_players.cpp21
-rw-r--r--src/gui/widgets/tabs/setup_players.h1
2 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/widgets/tabs/setup_players.cpp b/src/gui/widgets/tabs/setup_players.cpp
index 4f9d8f856..97865c91e 100644
--- a/src/gui/widgets/tabs/setup_players.cpp
+++ b/src/gui/widgets/tabs/setup_players.cpp
@@ -63,10 +63,21 @@ static const char *const visibleNamesList[] =
N_("show on selection")
};
+static const int topDownListSize = 2;
+
+static const char *const topDownList[] =
+{
+ // TRANSLATORS: show on top or down
+ N_("top"),
+ // TRANSLATORS: show on top or down
+ N_("buttom")
+};
+
Setup_Players::Setup_Players(const Widget2 *const widget) :
SetupTabScroll(widget),
mBadgesList(new NamesModel),
- mVisibleNamesList(new NamesModel)
+ mVisibleNamesList(new NamesModel),
+ mVisibleNamesPosList(new NamesModel)
{
// TRANSLATORS: settings tab name
setName(_("Players"));
@@ -102,6 +113,13 @@ Setup_Players::Setup_Players(const Widget2 *const widget) :
"visiblenames", this, "visiblenamesEvent",
mVisibleNamesList, 150);
+ mVisibleNamesPosList->fillFromArray(&topDownList[0],
+ topDownListSize);
+ // TRANSLATORS: settings option
+ new SetupItemDropDown(_("Show player names at"), "",
+ "visiblenamespos", this, "visiblenamesposEvent",
+ mVisibleNamesPosList, 150);
+
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Auto move names"), "",
"moveNames", this, "moveNamesEvent");
@@ -176,6 +194,7 @@ Setup_Players::~Setup_Players()
{
delete2(mBadgesList);
delete2(mVisibleNamesList);
+ delete2(mVisibleNamesPosList);
}
void Setup_Players::externalUpdated()
diff --git a/src/gui/widgets/tabs/setup_players.h b/src/gui/widgets/tabs/setup_players.h
index 506983381..d29d41781 100644
--- a/src/gui/widgets/tabs/setup_players.h
+++ b/src/gui/widgets/tabs/setup_players.h
@@ -43,6 +43,7 @@ class Setup_Players final : public SetupTabScroll
private:
NamesModel *mBadgesList;
NamesModel *mVisibleNamesList;
+ NamesModel *mVisibleNamesPosList;
};
#endif // GUI_WIDGETS_TABS_SETUP_PLAYERS_H