summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-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