summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-10-16 01:58:12 +0300
committerAndrei Karas <akaras@inbox.ru>2016-10-16 01:58:12 +0300
commit036df13f60e4d5c4e30d92c09fa376c147a68e9c (patch)
treea976693604fb050bb0f81681621e797a8162f6c6 /src/gui/widgets/tabs
parentbdc9cb6d5886af2bf068bfb5ea37f724f0cecae6 (diff)
downloadmv-036df13f60e4d5c4e30d92c09fa376c147a68e9c.tar.gz
mv-036df13f60e4d5c4e30d92c09fa376c147a68e9c.tar.bz2
mv-036df13f60e4d5c4e30d92c09fa376c147a68e9c.tar.xz
mv-036df13f60e4d5c4e30d92c09fa376c147a68e9c.zip
Add option to show player name only for selected player.s20161017
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/setup_players.cpp22
-rw-r--r--src/gui/widgets/tabs/setup_players.h1
2 files changed, 20 insertions, 3 deletions
diff --git a/src/gui/widgets/tabs/setup_players.cpp b/src/gui/widgets/tabs/setup_players.cpp
index 0ed677af0..4f6daa272 100644
--- a/src/gui/widgets/tabs/setup_players.cpp
+++ b/src/gui/widgets/tabs/setup_players.cpp
@@ -51,9 +51,22 @@ static const char *const badgesList[] =
N_("show at bottom"),
};
+static const int visibleNamesListSize = 3;
+
+static const char *const visibleNamesList[] =
+{
+ // TRANSLATORS: visible name type
+ N_("hide"),
+ // TRANSLATORS: visible name type
+ N_("show"),
+ // TRANSLATORS: visible name type
+ N_("show on selection")
+};
+
Setup_Players::Setup_Players(const Widget2 *const widget) :
SetupTabScroll(widget),
- mBadgesList(new NamesModel)
+ mBadgesList(new NamesModel),
+ mVisibleNamesList(new NamesModel)
{
// TRANSLATORS: settings tab name
setName(_("Players"));
@@ -82,9 +95,12 @@ Setup_Players::Setup_Players(const Widget2 *const widget) :
new SetupItemCheckBox(_("Target dead players"), "",
"targetDeadPlayers", this, "targetDeadPlayersEvent");
+ mVisibleNamesList->fillFromArray(&visibleNamesList[0],
+ visibleNamesListSize);
// TRANSLATORS: settings option
- new SetupItemCheckBox(_("Visible names"), "",
- "visiblenames", this, "visiblenamesEvent");
+ new SetupItemDropDown(_("Show player names"), "",
+ "visiblenames", this, "visiblenamesEvent",
+ mVisibleNamesList, 150);
// TRANSLATORS: settings option
new SetupItemCheckBox(_("Auto move names"), "",
diff --git a/src/gui/widgets/tabs/setup_players.h b/src/gui/widgets/tabs/setup_players.h
index c2fe43ba6..efc8e6ecd 100644
--- a/src/gui/widgets/tabs/setup_players.h
+++ b/src/gui/widgets/tabs/setup_players.h
@@ -42,6 +42,7 @@ class Setup_Players final : public SetupTabScroll
private:
NamesModel *mBadgesList;
+ NamesModel *mVisibleNamesList;
};
#endif // GUI_WIDGETS_TABS_SETUP_PLAYERS_H